initNav = function() {
    var navRoot = document.getElementById("nav"); if (navRoot == null) return; var lis = navRoot.getElementsByTagName("li"); for (var i = 0; i < lis.length; i++) {
        lis[i].onmouseover = function() { this.className += " hover"; }
        lis[i].onmouseout = function() { this.className = this.className.replace(" hover", ""); }
    }
}
if (document.all && window.attachEvent)
    attachEvent("onload", initNav); function initTabs() {
        var sets = document.getElementsByTagName("ul"); for (var i = 0; i < sets.length; i++) {
            if (sets[i].className.indexOf("tabset") != -1) {
                var tabs = []; var links = sets[i].getElementsByTagName("li"); for (var j = 0; j < links.length; j++) {
                    if (links[j].className.indexOf("tab") != -1) {
                        tabs.push(links[j]); links[j].tabs = tabs; var a = links[j].getElementsByTagName("a")[0]; var c = document.getElementById(a.href.substr(a.href.indexOf("#") + 1)); if (c) if (links[j].className.indexOf("active") != -1) c.style.display = "block"; else c.style.display = "none"; links[j].onclick = function() {
                            var a = this.getElementsByTagName("a")[0]; var c = document.getElementById(a.href.substr(a.href.indexOf("#") + 1)); if (c) {
                                for (var i = 0; i < this.tabs.length; i++) {
                                    var na = this.tabs[i].getElementsByTagName("a")[0]; var tab = document.getElementById(na.href.substr(na.href.indexOf("#") + 1)); if (tab) { tab.style.display = "none"; }
                                    this.tabs[i].className = this.tabs[i].className.replace("active", "");
                                }
                                this.className += " active"; c.style.display = "block"; return false;
                            }
                        }
                    }
                }
            }
        }
    }
if (window.addEventListener)
    window.addEventListener("load", initTabs, false); else if (window.attachEvent && !window.opera)
    window.attachEvent("onload", initTabs);
//-JQUERY--//
(function(A, w) {
    function ma() { if (!c.isReady) { try { s.documentElement.doScroll("left") } catch (a) { setTimeout(ma, 1); return } c.ready() } } function Qa(a, b) { b.src ? c.ajax({ url: b.src, async: false, dataType: "script" }) : c.globalEval(b.text || b.textContent || b.innerHTML || ""); b.parentNode && b.parentNode.removeChild(b) } function X(a, b, d, f, e, j) {
        var i = a.length; if (typeof b === "object") { for (var o in b) X(a, o, b[o], f, e, d); return a } if (d !== w) { f = !j && f && c.isFunction(d); for (o = 0; o < i; o++) e(a[o], b, f ? d.call(a[o], o, e(a[o], b)) : d, j); return a } return i ?
e(a[0], b) : w
    } function J() { return (new Date).getTime() } function Y() { return false } function Z() { return true } function na(a, b, d) { d[0].type = a; return c.event.handle.apply(b, d) } function oa(a) {
        var b, d = [], f = [], e = arguments, j, i, o, k, n, r; i = c.data(this, "events"); if (!(a.liveFired === this || !i || !i.live || a.button && a.type === "click")) {
            a.liveFired = this; var u = i.live.slice(0); for (k = 0; k < u.length; k++) { i = u[k]; i.origType.replace(O, "") === a.type ? f.push(i.selector) : u.splice(k--, 1) } j = c(a.target).closest(f, a.currentTarget); n = 0; for (r =
j.length; n < r; n++) for (k = 0; k < u.length; k++) { i = u[k]; if (j[n].selector === i.selector) { o = j[n].elem; f = null; if (i.preType === "mouseenter" || i.preType === "mouseleave") f = c(a.relatedTarget).closest(i.selector)[0]; if (!f || f !== o) d.push({ elem: o, handleObj: i }) } } n = 0; for (r = d.length; n < r; n++) { j = d[n]; a.currentTarget = j.elem; a.data = j.handleObj.data; a.handleObj = j.handleObj; if (j.handleObj.origHandler.apply(j.elem, e) === false) { b = false; break } } return b
        } 
    } function pa(a, b) {
        return "live." + (a && a !== "*" ? a + "." : "") + b.replace(/\./g, "`").replace(/ /g,
"&")
    } function qa(a) { return !a || !a.parentNode || a.parentNode.nodeType === 11 } function ra(a, b) { var d = 0; b.each(function() { if (this.nodeName === (a[d] && a[d].nodeName)) { var f = c.data(a[d++]), e = c.data(this, f); if (f = f && f.events) { delete e.handle; e.events = {}; for (var j in f) for (var i in f[j]) c.event.add(this, j, f[j][i], f[j][i].data) } } }) } function sa(a, b, d) {
        var f, e, j; b = b && b[0] ? b[0].ownerDocument || b[0] : s; if (a.length === 1 && typeof a[0] === "string" && a[0].length < 512 && b === s && !ta.test(a[0]) && (c.support.checkClone || !ua.test(a[0]))) {
            e =
true; if (j = c.fragments[a[0]]) if (j !== 1) f = j
        } if (!f) { f = b.createDocumentFragment(); c.clean(a, b, f, d) } if (e) c.fragments[a[0]] = j ? f : 1; return { fragment: f, cacheable: e}
    } function K(a, b) { var d = {}; c.each(va.concat.apply([], va.slice(0, b)), function() { d[this] = a }); return d } function wa(a) { return "scrollTo" in a && a.document ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : false } var c = function(a, b) { return new c.fn.init(a, b) }, Ra = A.jQuery, Sa = A.$, s = A.document, T, Ta = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/, Ua = /^.[^:#\[\.,]*$/, Va = /\S/,
Wa = /^(\s|\u00A0)+|(\s|\u00A0)+$/g, Xa = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, P = navigator.userAgent, xa = false, Q = [], L, $ = Object.prototype.toString, aa = Object.prototype.hasOwnProperty, ba = Array.prototype.push, R = Array.prototype.slice, ya = Array.prototype.indexOf; c.fn = c.prototype = { init: function(a, b) {
    var d, f; if (!a) return this; if (a.nodeType) { this.context = this[0] = a; this.length = 1; return this } if (a === "body" && !b) { this.context = s; this[0] = s.body; this.selector = "body"; this.length = 1; return this } if (typeof a === "string") if ((d = Ta.exec(a)) &&
(d[1] || !b)) if (d[1]) { f = b ? b.ownerDocument || b : s; if (a = Xa.exec(a)) if (c.isPlainObject(b)) { a = [s.createElement(a[1])]; c.fn.attr.call(a, b, true) } else a = [f.createElement(a[1])]; else { a = sa([d[1]], [f]); a = (a.cacheable ? a.fragment.cloneNode(true) : a.fragment).childNodes } return c.merge(this, a) } else { if (b = s.getElementById(d[2])) { if (b.id !== d[2]) return T.find(a); this.length = 1; this[0] = b } this.context = s; this.selector = a; return this } else if (!b && /^\w+$/.test(a)) {
        this.selector = a; this.context = s; a = s.getElementsByTagName(a); return c.merge(this,
a)
    } else return !b || b.jquery ? (b || T).find(a) : c(b).find(a); else if (c.isFunction(a)) return T.ready(a); if (a.selector !== w) { this.selector = a.selector; this.context = a.context } return c.makeArray(a, this)
}, selector: "", jquery: "1.4.2", length: 0, size: function() { return this.length }, toArray: function() { return R.call(this, 0) }, get: function(a) { return a == null ? this.toArray() : a < 0 ? this.slice(a)[0] : this[a] }, pushStack: function(a, b, d) {
    var f = c(); c.isArray(a) ? ba.apply(f, a) : c.merge(f, a); f.prevObject = this; f.context = this.context; if (b ===
"find") f.selector = this.selector + (this.selector ? " " : "") + d; else if (b) f.selector = this.selector + "." + b + "(" + d + ")"; return f
}, each: function(a, b) { return c.each(this, a, b) }, ready: function(a) { c.bindReady(); if (c.isReady) a.call(s, c); else Q && Q.push(a); return this }, eq: function(a) { return a === -1 ? this.slice(a) : this.slice(a, +a + 1) }, first: function() { return this.eq(0) }, last: function() { return this.eq(-1) }, slice: function() { return this.pushStack(R.apply(this, arguments), "slice", R.call(arguments).join(",")) }, map: function(a) {
    return this.pushStack(c.map(this,
function(b, d) { return a.call(b, d, b) }))
}, end: function() { return this.prevObject || c(null) }, push: ba, sort: [].sort, splice: [].splice
}; c.fn.init.prototype = c.fn; c.extend = c.fn.extend = function() {
    var a = arguments[0] || {}, b = 1, d = arguments.length, f = false, e, j, i, o; if (typeof a === "boolean") { f = a; a = arguments[1] || {}; b = 2 } if (typeof a !== "object" && !c.isFunction(a)) a = {}; if (d === b) { a = this; --b } for (; b < d; b++) if ((e = arguments[b]) != null) for (j in e) {
        i = a[j]; o = e[j]; if (a !== o) if (f && o && (c.isPlainObject(o) || c.isArray(o))) {
            i = i && (c.isPlainObject(i) ||
c.isArray(i)) ? i : c.isArray(o) ? [] : {}; a[j] = c.extend(f, i, o)
        } else if (o !== w) a[j] = o
    } return a
}; c.extend({ noConflict: function(a) { A.$ = Sa; if (a) A.jQuery = Ra; return c }, isReady: false, ready: function() { if (!c.isReady) { if (!s.body) return setTimeout(c.ready, 13); c.isReady = true; if (Q) { for (var a, b = 0; a = Q[b++]; ) a.call(s, c); Q = null } c.fn.triggerHandler && c(s).triggerHandler("ready") } }, bindReady: function() {
    if (!xa) {
        xa = true; if (s.readyState === "complete") return c.ready(); if (s.addEventListener) {
            s.addEventListener("DOMContentLoaded",
L, false); A.addEventListener("load", c.ready, false)
        } else if (s.attachEvent) { s.attachEvent("onreadystatechange", L); A.attachEvent("onload", c.ready); var a = false; try { a = A.frameElement == null } catch (b) { } s.documentElement.doScroll && a && ma() } 
    } 
}, isFunction: function(a) { return $.call(a) === "[object Function]" }, isArray: function(a) { return $.call(a) === "[object Array]" }, isPlainObject: function(a) {
    if (!a || $.call(a) !== "[object Object]" || a.nodeType || a.setInterval) return false; if (a.constructor && !aa.call(a, "constructor") && !aa.call(a.constructor.prototype,
"isPrototypeOf")) return false; var b; for (b in a); return b === w || aa.call(a, b)
}, isEmptyObject: function(a) { for (var b in a) return false; return true }, error: function(a) { throw a; }, parseJSON: function(a) {
    if (typeof a !== "string" || !a) return null; a = c.trim(a); if (/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return A.JSON && A.JSON.parse ? A.JSON.parse(a) : (new Function("return " +
a))(); else c.error("Invalid JSON: " + a)
}, noop: function() { }, globalEval: function(a) { if (a && Va.test(a)) { var b = s.getElementsByTagName("head")[0] || s.documentElement, d = s.createElement("script"); d.type = "text/javascript"; if (c.support.scriptEval) d.appendChild(s.createTextNode(a)); else d.text = a; b.insertBefore(d, b.firstChild); b.removeChild(d) } }, nodeName: function(a, b) { return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase() }, each: function(a, b, d) {
    var f, e = 0, j = a.length, i = j === w || c.isFunction(a); if (d) if (i) for (f in a) {
        if (b.apply(a[f],
d) === false) break
    } else for (; e < j; ) { if (b.apply(a[e++], d) === false) break } else if (i) for (f in a) { if (b.call(a[f], f, a[f]) === false) break } else for (d = a[0]; e < j && b.call(d, e, d) !== false; d = a[++e]); return a
}, trim: function(a) { return (a || "").replace(Wa, "") }, makeArray: function(a, b) { b = b || []; if (a != null) a.length == null || typeof a === "string" || c.isFunction(a) || typeof a !== "function" && a.setInterval ? ba.call(b, a) : c.merge(b, a); return b }, inArray: function(a, b) {
    if (b.indexOf) return b.indexOf(a); for (var d = 0, f = b.length; d < f; d++) if (b[d] ===
a) return d; return -1
}, merge: function(a, b) { var d = a.length, f = 0; if (typeof b.length === "number") for (var e = b.length; f < e; f++) a[d++] = b[f]; else for (; b[f] !== w; ) a[d++] = b[f++]; a.length = d; return a }, grep: function(a, b, d) { for (var f = [], e = 0, j = a.length; e < j; e++) !d !== !b(a[e], e) && f.push(a[e]); return f }, map: function(a, b, d) { for (var f = [], e, j = 0, i = a.length; j < i; j++) { e = b(a[j], j, d); if (e != null) f[f.length] = e } return f.concat.apply([], f) }, guid: 1, proxy: function(a, b, d) {
    if (arguments.length === 2) if (typeof b === "string") { d = a; a = d[b]; b = w } else if (b &&
!c.isFunction(b)) { d = b; b = w } if (!b && a) b = function() { return a.apply(d || this, arguments) }; if (a) b.guid = a.guid = a.guid || b.guid || c.guid++; return b
}, uaMatch: function(a) { a = a.toLowerCase(); a = /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || !/compatible/.test(a) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec(a) || []; return { browser: a[1] || "", version: a[2] || "0"} }, browser: {}
}); P = c.uaMatch(P); if (P.browser) { c.browser[P.browser] = true; c.browser.version = P.version } if (c.browser.webkit) c.browser.safari =
true; if (ya) c.inArray = function(a, b) { return ya.call(b, a) }; T = c(s); if (s.addEventListener) L = function() { s.removeEventListener("DOMContentLoaded", L, false); c.ready() }; else if (s.attachEvent) L = function() { if (s.readyState === "complete") { s.detachEvent("onreadystatechange", L); c.ready() } }; (function() {
    c.support = {}; var a = s.documentElement, b = s.createElement("script"), d = s.createElement("div"), f = "script" + J(); d.style.display = "none"; d.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
    var e = d.getElementsByTagName("*"), j = d.getElementsByTagName("a")[0]; if (!(!e || !e.length || !j)) {
        c.support = { leadingWhitespace: d.firstChild.nodeType === 3, tbody: !d.getElementsByTagName("tbody").length, htmlSerialize: !!d.getElementsByTagName("link").length, style: /red/.test(j.getAttribute("style")), hrefNormalized: j.getAttribute("href") === "/a", opacity: /^0.55$/.test(j.style.opacity), cssFloat: !!j.style.cssFloat, checkOn: d.getElementsByTagName("input")[0].value === "on", optSelected: s.createElement("select").appendChild(s.createElement("option")).selected,
            parentNode: d.removeChild(d.appendChild(s.createElement("div"))).parentNode === null, deleteExpando: true, checkClone: false, scriptEval: false, noCloneEvent: true, boxModel: null
        }; b.type = "text/javascript"; try { b.appendChild(s.createTextNode("window." + f + "=1;")) } catch (i) { } a.insertBefore(b, a.firstChild); if (A[f]) { c.support.scriptEval = true; delete A[f] } try { delete b.test } catch (o) { c.support.deleteExpando = false } a.removeChild(b); if (d.attachEvent && d.fireEvent) {
            d.attachEvent("onclick", function k() {
                c.support.noCloneEvent =
false; d.detachEvent("onclick", k)
            }); d.cloneNode(true).fireEvent("onclick")
        } d = s.createElement("div"); d.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>"; a = s.createDocumentFragment(); a.appendChild(d.firstChild); c.support.checkClone = a.cloneNode(true).cloneNode(true).lastChild.checked; c(function() { var k = s.createElement("div"); k.style.width = k.style.paddingLeft = "1px"; s.body.appendChild(k); c.boxModel = c.support.boxModel = k.offsetWidth === 2; s.body.removeChild(k).style.display = "none" }); a = function(k) {
            var n =
s.createElement("div"); k = "on" + k; var r = k in n; if (!r) { n.setAttribute(k, "return;"); r = typeof n[k] === "function" } return r
        }; c.support.submitBubbles = a("submit"); c.support.changeBubbles = a("change"); a = b = d = e = j = null
    } 
})(); c.props = { "for": "htmlFor", "class": "className", readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", colspan: "colSpan", tabindex: "tabIndex", usemap: "useMap", frameborder: "frameBorder" }; var G = "jQuery" + J(), Ya = 0, za = {}; c.extend({ cache: {}, expando: G, noData: { embed: true, object: true,
    applet: true
}, data: function(a, b, d) { if (!(a.nodeName && c.noData[a.nodeName.toLowerCase()])) { a = a == A ? za : a; var f = a[G], e = c.cache; if (!f && typeof b === "string" && d === w) return null; f || (f = ++Ya); if (typeof b === "object") { a[G] = f; e[f] = c.extend(true, {}, b) } else if (!e[f]) { a[G] = f; e[f] = {} } a = e[f]; if (d !== w) a[b] = d; return typeof b === "string" ? a[b] : a } }, removeData: function(a, b) {
    if (!(a.nodeName && c.noData[a.nodeName.toLowerCase()])) {
        a = a == A ? za : a; var d = a[G], f = c.cache, e = f[d]; if (b) { if (e) { delete e[b]; c.isEmptyObject(e) && c.removeData(a) } } else {
            if (c.support.deleteExpando) delete a[c.expando];
            else a.removeAttribute && a.removeAttribute(c.expando); delete f[d]
        } 
    } 
} 
}); c.fn.extend({ data: function(a, b) {
    if (typeof a === "undefined" && this.length) return c.data(this[0]); else if (typeof a === "object") return this.each(function() { c.data(this, a) }); var d = a.split("."); d[1] = d[1] ? "." + d[1] : ""; if (b === w) { var f = this.triggerHandler("getData" + d[1] + "!", [d[0]]); if (f === w && this.length) f = c.data(this[0], a); return f === w && d[1] ? this.data(d[0]) : f } else return this.trigger("setData" + d[1] + "!", [d[0], b]).each(function() {
        c.data(this,
a, b)
    })
}, removeData: function(a) { return this.each(function() { c.removeData(this, a) }) } 
}); c.extend({ queue: function(a, b, d) { if (a) { b = (b || "fx") + "queue"; var f = c.data(a, b); if (!d) return f || []; if (!f || c.isArray(d)) f = c.data(a, b, c.makeArray(d)); else f.push(d); return f } }, dequeue: function(a, b) { b = b || "fx"; var d = c.queue(a, b), f = d.shift(); if (f === "inprogress") f = d.shift(); if (f) { b === "fx" && d.unshift("inprogress"); f.call(a, function() { c.dequeue(a, b) }) } } }); c.fn.extend({ queue: function(a, b) {
    if (typeof a !== "string") { b = a; a = "fx" } if (b ===
w) return c.queue(this[0], a); return this.each(function() { var d = c.queue(this, a, b); a === "fx" && d[0] !== "inprogress" && c.dequeue(this, a) })
}, dequeue: function(a) { return this.each(function() { c.dequeue(this, a) }) }, delay: function(a, b) { a = c.fx ? c.fx.speeds[a] || a : a; b = b || "fx"; return this.queue(b, function() { var d = this; setTimeout(function() { c.dequeue(d, b) }, a) }) }, clearQueue: function(a) { return this.queue(a || "fx", []) } 
}); var Aa = /[\n\t]/g, ca = /\s+/, Za = /\r/g, $a = /href|src|style/, ab = /(button|input)/i, bb = /(button|input|object|select|textarea)/i,
cb = /^(a|area)$/i, Ba = /radio|checkbox/; c.fn.extend({ attr: function(a, b) { return X(this, a, b, true, c.attr) }, removeAttr: function(a) { return this.each(function() { c.attr(this, a, ""); this.nodeType === 1 && this.removeAttribute(a) }) }, addClass: function(a) {
    if (c.isFunction(a)) return this.each(function(n) { var r = c(this); r.addClass(a.call(this, n, r.attr("class"))) }); if (a && typeof a === "string") for (var b = (a || "").split(ca), d = 0, f = this.length; d < f; d++) {
        var e = this[d]; if (e.nodeType === 1) if (e.className) {
            for (var j = " " + e.className + " ",
i = e.className, o = 0, k = b.length; o < k; o++) if (j.indexOf(" " + b[o] + " ") < 0) i += " " + b[o]; e.className = c.trim(i)
        } else e.className = a
    } return this
}, removeClass: function(a) {
    if (c.isFunction(a)) return this.each(function(k) { var n = c(this); n.removeClass(a.call(this, k, n.attr("class"))) }); if (a && typeof a === "string" || a === w) for (var b = (a || "").split(ca), d = 0, f = this.length; d < f; d++) {
        var e = this[d]; if (e.nodeType === 1 && e.className) if (a) {
            for (var j = (" " + e.className + " ").replace(Aa, " "), i = 0, o = b.length; i < o; i++) j = j.replace(" " + b[i] + " ",
" "); e.className = c.trim(j)
        } else e.className = ""
    } return this
}, toggleClass: function(a, b) {
    var d = typeof a, f = typeof b === "boolean"; if (c.isFunction(a)) return this.each(function(e) { var j = c(this); j.toggleClass(a.call(this, e, j.attr("class"), b), b) }); return this.each(function() {
        if (d === "string") for (var e, j = 0, i = c(this), o = b, k = a.split(ca); e = k[j++]; ) { o = f ? o : !i.hasClass(e); i[o ? "addClass" : "removeClass"](e) } else if (d === "undefined" || d === "boolean") {
            this.className && c.data(this, "__className__", this.className); this.className =
this.className || a === false ? "" : c.data(this, "__className__") || ""
        } 
    })
}, hasClass: function(a) { a = " " + a + " "; for (var b = 0, d = this.length; b < d; b++) if ((" " + this[b].className + " ").replace(Aa, " ").indexOf(a) > -1) return true; return false }, val: function(a) {
    if (a === w) {
        var b = this[0]; if (b) {
            if (c.nodeName(b, "option")) return (b.attributes.value || {}).specified ? b.value : b.text; if (c.nodeName(b, "select")) {
                var d = b.selectedIndex, f = [], e = b.options; b = b.type === "select-one"; if (d < 0) return null; var j = b ? d : 0; for (d = b ? d + 1 : e.length; j < d; j++) {
                    var i =
e[j]; if (i.selected) { a = c(i).val(); if (b) return a; f.push(a) } 
                } return f
            } if (Ba.test(b.type) && !c.support.checkOn) return b.getAttribute("value") === null ? "on" : b.value; return (b.value || "").replace(Za, "")
        } return w
    } var o = c.isFunction(a); return this.each(function(k) {
        var n = c(this), r = a; if (this.nodeType === 1) {
            if (o) r = a.call(this, k, n.val()); if (typeof r === "number") r += ""; if (c.isArray(r) && Ba.test(this.type)) this.checked = c.inArray(n.val(), r) >= 0; else if (c.nodeName(this, "select")) {
                var u = c.makeArray(r); c("option", this).each(function() {
                    this.selected =
c.inArray(c(this).val(), u) >= 0
                }); if (!u.length) this.selectedIndex = -1
            } else this.value = r
        } 
    })
} 
}); c.extend({ attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attr: function(a, b, d, f) {
    if (!a || a.nodeType === 3 || a.nodeType === 8) return w; if (f && b in c.attrFn) return c(a)[b](d); f = a.nodeType !== 1 || !c.isXMLDoc(a); var e = d !== w; b = f && c.props[b] || b; if (a.nodeType === 1) {
        var j = $a.test(b); if (b in a && f && !j) {
            if (e) {
                b === "type" && ab.test(a.nodeName) && a.parentNode && c.error("type property can't be changed");
                a[b] = d
            } if (c.nodeName(a, "form") && a.getAttributeNode(b)) return a.getAttributeNode(b).nodeValue; if (b === "tabIndex") return (b = a.getAttributeNode("tabIndex")) && b.specified ? b.value : bb.test(a.nodeName) || cb.test(a.nodeName) && a.href ? 0 : w; return a[b]
        } if (!c.support.style && f && b === "style") { if (e) a.style.cssText = "" + d; return a.style.cssText } e && a.setAttribute(b, "" + d); a = !c.support.hrefNormalized && f && j ? a.getAttribute(b, 2) : a.getAttribute(b); return a === null ? w : a
    } return c.style(a, b, d)
} 
}); var O = /\.(.*)$/, db = function(a) {
    return a.replace(/[^\w\s\.\|`]/g,
function(b) { return "\\" + b })
}; c.event = { add: function(a, b, d, f) {
    if (!(a.nodeType === 3 || a.nodeType === 8)) {
        if (a.setInterval && a !== A && !a.frameElement) a = A; var e, j; if (d.handler) { e = d; d = e.handler } if (!d.guid) d.guid = c.guid++; if (j = c.data(a)) {
            var i = j.events = j.events || {}, o = j.handle; if (!o) j.handle = o = function() { return typeof c !== "undefined" && !c.event.triggered ? c.event.handle.apply(o.elem, arguments) : w }; o.elem = a; b = b.split(" "); for (var k, n = 0, r; k = b[n++]; ) {
                j = e ? c.extend({}, e) : { handler: d, data: f }; if (k.indexOf(".") > -1) {
                    r = k.split(".");
                    k = r.shift(); j.namespace = r.slice(0).sort().join(".")
                } else { r = []; j.namespace = "" } j.type = k; j.guid = d.guid; var u = i[k], z = c.event.special[k] || {}; if (!u) { u = i[k] = []; if (!z.setup || z.setup.call(a, f, r, o) === false) if (a.addEventListener) a.addEventListener(k, o, false); else a.attachEvent && a.attachEvent("on" + k, o) } if (z.add) { z.add.call(a, j); if (!j.handler.guid) j.handler.guid = d.guid } u.push(j); c.event.global[k] = true
            } a = null
        } 
    } 
}, global: {}, remove: function(a, b, d, f) {
    if (!(a.nodeType === 3 || a.nodeType === 8)) {
        var e, j = 0, i, o, k, n, r, u, z = c.data(a),
C = z && z.events; if (z && C) {
            if (b && b.type) { d = b.handler; b = b.type } if (!b || typeof b === "string" && b.charAt(0) === ".") { b = b || ""; for (e in C) c.event.remove(a, e + b) } else {
                for (b = b.split(" "); e = b[j++]; ) {
                    n = e; i = e.indexOf(".") < 0; o = []; if (!i) { o = e.split("."); e = o.shift(); k = new RegExp("(^|\\.)" + c.map(o.slice(0).sort(), db).join("\\.(?:.*\\.)?") + "(\\.|$)") } if (r = C[e]) if (d) {
                        n = c.event.special[e] || {}; for (B = f || 0; B < r.length; B++) {
                            u = r[B]; if (d.guid === u.guid) {
                                if (i || k.test(u.namespace)) { f == null && r.splice(B--, 1); n.remove && n.remove.call(a, u) } if (f !=
null) break
                            } 
                        } if (r.length === 0 || f != null && r.length === 1) { if (!n.teardown || n.teardown.call(a, o) === false) Ca(a, e, z.handle); delete C[e] } 
                    } else for (var B = 0; B < r.length; B++) { u = r[B]; if (i || k.test(u.namespace)) { c.event.remove(a, n, u.handler, B); r.splice(B--, 1) } } 
                } if (c.isEmptyObject(C)) { if (b = z.handle) b.elem = null; delete z.events; delete z.handle; c.isEmptyObject(z) && c.removeData(a) } 
            } 
        } 
    } 
}, trigger: function(a, b, d, f) {
    var e = a.type || a; if (!f) {
        a = typeof a === "object" ? a[G] ? a : c.extend(c.Event(e), a) : c.Event(e); if (e.indexOf("!") >= 0) {
            a.type =
e = e.slice(0, -1); a.exclusive = true
        } if (!d) { a.stopPropagation(); c.event.global[e] && c.each(c.cache, function() { this.events && this.events[e] && c.event.trigger(a, b, this.handle.elem) }) } if (!d || d.nodeType === 3 || d.nodeType === 8) return w; a.result = w; a.target = d; b = c.makeArray(b); b.unshift(a)
    } a.currentTarget = d; (f = c.data(d, "handle")) && f.apply(d, b); f = d.parentNode || d.ownerDocument; try { if (!(d && d.nodeName && c.noData[d.nodeName.toLowerCase()])) if (d["on" + e] && d["on" + e].apply(d, b) === false) a.result = false } catch (j) { } if (!a.isPropagationStopped() &&
f) c.event.trigger(a, b, f, true); else if (!a.isDefaultPrevented()) { f = a.target; var i, o = c.nodeName(f, "a") && e === "click", k = c.event.special[e] || {}; if ((!k._default || k._default.call(d, a) === false) && !o && !(f && f.nodeName && c.noData[f.nodeName.toLowerCase()])) { try { if (f[e]) { if (i = f["on" + e]) f["on" + e] = null; c.event.triggered = true; f[e]() } } catch (n) { } if (i) f["on" + e] = i; c.event.triggered = false } } 
}, handle: function(a) {
    var b, d, f, e; a = arguments[0] = c.event.fix(a || A.event); a.currentTarget = this; b = a.type.indexOf(".") < 0 && !a.exclusive;
    if (!b) { d = a.type.split("."); a.type = d.shift(); f = new RegExp("(^|\\.)" + d.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)") } e = c.data(this, "events"); d = e[a.type]; if (e && d) { d = d.slice(0); e = 0; for (var j = d.length; e < j; e++) { var i = d[e]; if (b || f.test(i.namespace)) { a.handler = i.handler; a.data = i.data; a.handleObj = i; i = i.handler.apply(this, arguments); if (i !== w) { a.result = i; if (i === false) { a.preventDefault(); a.stopPropagation() } } if (a.isImmediatePropagationStopped()) break } } } return a.result
}, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
    fix: function(a) {
        if (a[G]) return a; var b = a; a = c.Event(b); for (var d = this.props.length, f; d; ) { f = this.props[--d]; a[f] = b[f] } if (!a.target) a.target = a.srcElement || s; if (a.target.nodeType === 3) a.target = a.target.parentNode; if (!a.relatedTarget && a.fromElement) a.relatedTarget = a.fromElement === a.target ? a.toElement : a.fromElement; if (a.pageX == null && a.clientX != null) {
            b = s.documentElement; d = s.body; a.pageX = a.clientX + (b && b.scrollLeft || d && d.scrollLeft || 0) - (b && b.clientLeft || d && d.clientLeft || 0); a.pageY = a.clientY + (b && b.scrollTop ||
d && d.scrollTop || 0) - (b && b.clientTop || d && d.clientTop || 0)
        } if (!a.which && (a.charCode || a.charCode === 0 ? a.charCode : a.keyCode)) a.which = a.charCode || a.keyCode; if (!a.metaKey && a.ctrlKey) a.metaKey = a.ctrlKey; if (!a.which && a.button !== w) a.which = a.button & 1 ? 1 : a.button & 2 ? 3 : a.button & 4 ? 2 : 0; return a
    }, guid: 1E8, proxy: c.proxy, special: { ready: { setup: c.bindReady, teardown: c.noop }, live: { add: function(a) { c.event.add(this, a.origType, c.extend({}, a, { handler: oa })) }, remove: function(a) {
        var b = true, d = a.origType.replace(O, ""); c.each(c.data(this,
"events").live || [], function() { if (d === this.origType.replace(O, "")) return b = false }); b && c.event.remove(this, a.origType, oa)
    } 
    }, beforeunload: { setup: function(a, b, d) { if (this.setInterval) this.onbeforeunload = d; return false }, teardown: function(a, b) { if (this.onbeforeunload === b) this.onbeforeunload = null } }}
    }; var Ca = s.removeEventListener ? function(a, b, d) { a.removeEventListener(b, d, false) } : function(a, b, d) { a.detachEvent("on" + b, d) }; c.Event = function(a) {
        if (!this.preventDefault) return new c.Event(a); if (a && a.type) {
            this.originalEvent =
a; this.type = a.type
        } else this.type = a; this.timeStamp = J(); this[G] = true
    }; c.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = Z; var a = this.originalEvent; if (a) { a.preventDefault && a.preventDefault(); a.returnValue = false } }, stopPropagation: function() { this.isPropagationStopped = Z; var a = this.originalEvent; if (a) { a.stopPropagation && a.stopPropagation(); a.cancelBubble = true } }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = Z; this.stopPropagation() }, isDefaultPrevented: Y, isPropagationStopped: Y,
        isImmediatePropagationStopped: Y
    }; var Da = function(a) { var b = a.relatedTarget; try { for (; b && b !== this; ) b = b.parentNode; if (b !== this) { a.type = a.data; c.event.handle.apply(this, arguments) } } catch (d) { } }, Ea = function(a) { a.type = a.data; c.event.handle.apply(this, arguments) }; c.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function(a, b) { c.event.special[a] = { setup: function(d) { c.event.add(this, b, d && d.selector ? Ea : Da, a) }, teardown: function(d) { c.event.remove(this, b, d && d.selector ? Ea : Da) } } }); if (!c.support.submitBubbles) c.event.special.submit =
{ setup: function() { if (this.nodeName.toLowerCase() !== "form") { c.event.add(this, "click.specialSubmit", function(a) { var b = a.target, d = b.type; if ((d === "submit" || d === "image") && c(b).closest("form").length) return na("submit", this, arguments) }); c.event.add(this, "keypress.specialSubmit", function(a) { var b = a.target, d = b.type; if ((d === "text" || d === "password") && c(b).closest("form").length && a.keyCode === 13) return na("submit", this, arguments) }) } else return false }, teardown: function() { c.event.remove(this, ".specialSubmit") } };
    if (!c.support.changeBubbles) {
        var da = /textarea|input|select/i, ea, Fa = function(a) { var b = a.type, d = a.value; if (b === "radio" || b === "checkbox") d = a.checked; else if (b === "select-multiple") d = a.selectedIndex > -1 ? c.map(a.options, function(f) { return f.selected }).join("-") : ""; else if (a.nodeName.toLowerCase() === "select") d = a.selectedIndex; return d }, fa = function(a, b) {
            var d = a.target, f, e; if (!(!da.test(d.nodeName) || d.readOnly)) {
                f = c.data(d, "_change_data"); e = Fa(d); if (a.type !== "focusout" || d.type !== "radio") c.data(d, "_change_data",
e); if (!(f === w || e === f)) if (f != null || e) { a.type = "change"; return c.event.trigger(a, b, d) } 
            } 
        }; c.event.special.change = { filters: { focusout: fa, click: function(a) { var b = a.target, d = b.type; if (d === "radio" || d === "checkbox" || b.nodeName.toLowerCase() === "select") return fa.call(this, a) }, keydown: function(a) { var b = a.target, d = b.type; if (a.keyCode === 13 && b.nodeName.toLowerCase() !== "textarea" || a.keyCode === 32 && (d === "checkbox" || d === "radio") || d === "select-multiple") return fa.call(this, a) }, beforeactivate: function(a) {
            a = a.target; c.data(a,
"_change_data", Fa(a))
        } 
        }, setup: function() { if (this.type === "file") return false; for (var a in ea) c.event.add(this, a + ".specialChange", ea[a]); return da.test(this.nodeName) }, teardown: function() { c.event.remove(this, ".specialChange"); return da.test(this.nodeName) } 
        }; ea = c.event.special.change.filters
    } s.addEventListener && c.each({ focus: "focusin", blur: "focusout" }, function(a, b) {
        function d(f) { f = c.event.fix(f); f.type = b; return c.event.handle.call(this, f) } c.event.special[b] = { setup: function() {
            this.addEventListener(a,
d, true)
        }, teardown: function() { this.removeEventListener(a, d, true) } }
        }); c.each(["bind", "one"], function(a, b) { c.fn[b] = function(d, f, e) { if (typeof d === "object") { for (var j in d) this[b](j, f, d[j], e); return this } if (c.isFunction(f)) { e = f; f = w } var i = b === "one" ? c.proxy(e, function(k) { c(this).unbind(k, i); return e.apply(this, arguments) }) : e; if (d === "unload" && b !== "one") this.one(d, f, e); else { j = 0; for (var o = this.length; j < o; j++) c.event.add(this[j], d, i, f) } return this } }); c.fn.extend({ unbind: function(a, b) {
            if (typeof a === "object" &&
!a.preventDefault) for (var d in a) this.unbind(d, a[d]); else { d = 0; for (var f = this.length; d < f; d++) c.event.remove(this[d], a, b) } return this
        }, delegate: function(a, b, d, f) { return this.live(b, d, f, a) }, undelegate: function(a, b, d) { return arguments.length === 0 ? this.unbind("live") : this.die(b, null, d, a) }, trigger: function(a, b) { return this.each(function() { c.event.trigger(a, b, this) }) }, triggerHandler: function(a, b) { if (this[0]) { a = c.Event(a); a.preventDefault(); a.stopPropagation(); c.event.trigger(a, b, this[0]); return a.result } },
            toggle: function(a) { for (var b = arguments, d = 1; d < b.length; ) c.proxy(a, b[d++]); return this.click(c.proxy(a, function(f) { var e = (c.data(this, "lastToggle" + a.guid) || 0) % d; c.data(this, "lastToggle" + a.guid, e + 1); f.preventDefault(); return b[e].apply(this, arguments) || false })) }, hover: function(a, b) { return this.mouseenter(a).mouseleave(b || a) } 
        }); var Ga = { focus: "focusin", blur: "focusout", mouseenter: "mouseover", mouseleave: "mouseout" }; c.each(["live", "die"], function(a, b) {
            c.fn[b] = function(d, f, e, j) {
                var i, o = 0, k, n, r = j || this.selector,
u = j ? this : c(this.context); if (c.isFunction(f)) { e = f; f = w } for (d = (d || "").split(" "); (i = d[o++]) != null; ) { j = O.exec(i); k = ""; if (j) { k = j[0]; i = i.replace(O, "") } if (i === "hover") d.push("mouseenter" + k, "mouseleave" + k); else { n = i; if (i === "focus" || i === "blur") { d.push(Ga[i] + k); i += k } else i = (Ga[i] || i) + k; b === "live" ? u.each(function() { c.event.add(this, pa(i, r), { data: f, selector: r, handler: e, origType: i, origHandler: e, preType: n }) }) : u.unbind(pa(i, r), e) } } return this
            } 
        }); c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a, b) { c.fn[b] = function(d) { return d ? this.bind(b, d) : this.trigger(b) }; if (c.attrFn) c.attrFn[b] = true }); A.attachEvent && !A.addEventListener && A.attachEvent("onunload", function() { for (var a in c.cache) if (c.cache[a].handle) try { c.event.remove(c.cache[a].handle.elem) } catch (b) { } }); (function() {
    function a(g) { for (var h = "", l, m = 0; g[m]; m++) { l = g[m]; if (l.nodeType === 3 || l.nodeType === 4) h += l.nodeValue; else if (l.nodeType !== 8) h += a(l.childNodes) } return h } function b(g, h, l, m, q, p) {
        q = 0; for (var v = m.length; q < v; q++) {
            var t = m[q];
            if (t) { t = t[g]; for (var y = false; t; ) { if (t.sizcache === l) { y = m[t.sizset]; break } if (t.nodeType === 1 && !p) { t.sizcache = l; t.sizset = q } if (t.nodeName.toLowerCase() === h) { y = t; break } t = t[g] } m[q] = y } 
        } 
    } function d(g, h, l, m, q, p) { q = 0; for (var v = m.length; q < v; q++) { var t = m[q]; if (t) { t = t[g]; for (var y = false; t; ) { if (t.sizcache === l) { y = m[t.sizset]; break } if (t.nodeType === 1) { if (!p) { t.sizcache = l; t.sizset = q } if (typeof h !== "string") { if (t === h) { y = true; break } } else if (k.filter(h, [t]).length > 0) { y = t; break } } t = t[g] } m[q] = y } } } var f = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e = 0, j = Object.prototype.toString, i = false, o = true; [0, 0].sort(function() { o = false; return 0 }); var k = function(g, h, l, m) {
    l = l || []; var q = h = h || s; if (h.nodeType !== 1 && h.nodeType !== 9) return []; if (!g || typeof g !== "string") return l; for (var p = [], v, t, y, S, H = true, M = x(h), I = g; (f.exec(""), v = f.exec(I)) !== null; ) { I = v[3]; p.push(v[1]); if (v[2]) { S = v[3]; break } } if (p.length > 1 && r.exec(g)) if (p.length === 2 && n.relative[p[0]]) t = ga(p[0] + p[1], h); else for (t = n.relative[p[0]] ? [h] : k(p.shift(), h); p.length; ) {
        g = p.shift(); if (n.relative[g]) g += p.shift();
        t = ga(g, t)
    } else { if (!m && p.length > 1 && h.nodeType === 9 && !M && n.match.ID.test(p[0]) && !n.match.ID.test(p[p.length - 1])) { v = k.find(p.shift(), h, M); h = v.expr ? k.filter(v.expr, v.set)[0] : v.set[0] } if (h) { v = m ? { expr: p.pop(), set: z(m)} : k.find(p.pop(), p.length === 1 && (p[0] === "~" || p[0] === "+") && h.parentNode ? h.parentNode : h, M); t = v.expr ? k.filter(v.expr, v.set) : v.set; if (p.length > 0) y = z(t); else H = false; for (; p.length; ) { var D = p.pop(); v = D; if (n.relative[D]) v = p.pop(); else D = ""; if (v == null) v = h; n.relative[D](y, v, M) } } else y = [] } y || (y = t); y || k.error(D ||
g); if (j.call(y) === "[object Array]") if (H) if (h && h.nodeType === 1) for (g = 0; y[g] != null; g++) { if (y[g] && (y[g] === true || y[g].nodeType === 1 && E(h, y[g]))) l.push(t[g]) } else for (g = 0; y[g] != null; g++) y[g] && y[g].nodeType === 1 && l.push(t[g]); else l.push.apply(l, y); else z(y, l); if (S) { k(S, q, l, m); k.uniqueSort(l) } return l
}; k.uniqueSort = function(g) { if (B) { i = o; g.sort(B); if (i) for (var h = 1; h < g.length; h++) g[h] === g[h - 1] && g.splice(h--, 1) } return g }; k.matches = function(g, h) { return k(g, null, null, h) }; k.find = function(g, h, l) {
    var m, q; if (!g) return [];
    for (var p = 0, v = n.order.length; p < v; p++) { var t = n.order[p]; if (q = n.leftMatch[t].exec(g)) { var y = q[1]; q.splice(1, 1); if (y.substr(y.length - 1) !== "\\") { q[1] = (q[1] || "").replace(/\\/g, ""); m = n.find[t](q, h, l); if (m != null) { g = g.replace(n.match[t], ""); break } } } } m || (m = h.getElementsByTagName("*")); return { set: m, expr: g}
}; k.filter = function(g, h, l, m) {
    for (var q = g, p = [], v = h, t, y, S = h && h[0] && x(h[0]); g && h.length; ) {
        for (var H in n.filter) if ((t = n.leftMatch[H].exec(g)) != null && t[2]) {
            var M = n.filter[H], I, D; D = t[1]; y = false; t.splice(1, 1); if (D.substr(D.length -
1) !== "\\") { if (v === p) p = []; if (n.preFilter[H]) if (t = n.preFilter[H](t, v, l, p, m, S)) { if (t === true) continue } else y = I = true; if (t) for (var U = 0; (D = v[U]) != null; U++) if (D) { I = M(D, t, U, v); var Ha = m ^ !!I; if (l && I != null) if (Ha) y = true; else v[U] = false; else if (Ha) { p.push(D); y = true } } if (I !== w) { l || (v = p); g = g.replace(n.match[H], ""); if (!y) return []; break } } 
        } if (g === q) if (y == null) k.error(g); else break; q = g
    } return v
}; k.error = function(g) { throw "Syntax error, unrecognized expression: " + g; }; var n = k.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\))?/
}, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function(g) { return g.getAttribute("href") } },
    relative: { "+": function(g, h) { var l = typeof h === "string", m = l && !/\W/.test(h); l = l && !m; if (m) h = h.toLowerCase(); m = 0; for (var q = g.length, p; m < q; m++) if (p = g[m]) { for (; (p = p.previousSibling) && p.nodeType !== 1; ); g[m] = l || p && p.nodeName.toLowerCase() === h ? p || false : p === h } l && k.filter(h, g, true) }, ">": function(g, h) {
        var l = typeof h === "string"; if (l && !/\W/.test(h)) { h = h.toLowerCase(); for (var m = 0, q = g.length; m < q; m++) { var p = g[m]; if (p) { l = p.parentNode; g[m] = l.nodeName.toLowerCase() === h ? l : false } } } else {
            m = 0; for (q = g.length; m < q; m++) if (p = g[m]) g[m] =
l ? p.parentNode : p.parentNode === h; l && k.filter(h, g, true)
        } 
    }, "": function(g, h, l) { var m = e++, q = d; if (typeof h === "string" && !/\W/.test(h)) { var p = h = h.toLowerCase(); q = b } q("parentNode", h, m, g, p, l) }, "~": function(g, h, l) { var m = e++, q = d; if (typeof h === "string" && !/\W/.test(h)) { var p = h = h.toLowerCase(); q = b } q("previousSibling", h, m, g, p, l) } 
    }, find: { ID: function(g, h, l) { if (typeof h.getElementById !== "undefined" && !l) return (g = h.getElementById(g[1])) ? [g] : [] }, NAME: function(g, h) {
        if (typeof h.getElementsByName !== "undefined") {
            var l = [];
            h = h.getElementsByName(g[1]); for (var m = 0, q = h.length; m < q; m++) h[m].getAttribute("name") === g[1] && l.push(h[m]); return l.length === 0 ? null : l
        } 
    }, TAG: function(g, h) { return h.getElementsByTagName(g[1]) } 
    }, preFilter: { CLASS: function(g, h, l, m, q, p) { g = " " + g[1].replace(/\\/g, "") + " "; if (p) return g; p = 0; for (var v; (v = h[p]) != null; p++) if (v) if (q ^ (v.className && (" " + v.className + " ").replace(/[\t\n]/g, " ").indexOf(g) >= 0)) l || m.push(v); else if (l) h[p] = false; return false }, ID: function(g) { return g[1].replace(/\\/g, "") }, TAG: function(g) { return g[1].toLowerCase() },
        CHILD: function(g) { if (g[1] === "nth") { var h = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2] === "even" && "2n" || g[2] === "odd" && "2n+1" || !/\D/.test(g[2]) && "0n+" + g[2] || g[2]); g[2] = h[1] + (h[2] || 1) - 0; g[3] = h[3] - 0 } g[0] = e++; return g }, ATTR: function(g, h, l, m, q, p) { h = g[1].replace(/\\/g, ""); if (!p && n.attrMap[h]) g[1] = n.attrMap[h]; if (g[2] === "~=") g[4] = " " + g[4] + " "; return g }, PSEUDO: function(g, h, l, m, q) {
            if (g[1] === "not") if ((f.exec(g[3]) || "").length > 1 || /^\w/.test(g[3])) g[3] = k(g[3], null, null, h); else {
                g = k.filter(g[3], h, l, true ^ q); l || m.push.apply(m,
g); return false
            } else if (n.match.POS.test(g[0]) || n.match.CHILD.test(g[0])) return true; return g
        }, POS: function(g) { g.unshift(true); return g } 
    }, filters: { enabled: function(g) { return g.disabled === false && g.type !== "hidden" }, disabled: function(g) { return g.disabled === true }, checked: function(g) { return g.checked === true }, selected: function(g) { return g.selected === true }, parent: function(g) { return !!g.firstChild }, empty: function(g) { return !g.firstChild }, has: function(g, h, l) { return !!k(l[3], g).length }, header: function(g) { return /h\d/i.test(g.nodeName) },
        text: function(g) { return "text" === g.type }, radio: function(g) { return "radio" === g.type }, checkbox: function(g) { return "checkbox" === g.type }, file: function(g) { return "file" === g.type }, password: function(g) { return "password" === g.type }, submit: function(g) { return "submit" === g.type }, image: function(g) { return "image" === g.type }, reset: function(g) { return "reset" === g.type }, button: function(g) { return "button" === g.type || g.nodeName.toLowerCase() === "button" }, input: function(g) { return /input|select|textarea|button/i.test(g.nodeName) } 
    },
    setFilters: { first: function(g, h) { return h === 0 }, last: function(g, h, l, m) { return h === m.length - 1 }, even: function(g, h) { return h % 2 === 0 }, odd: function(g, h) { return h % 2 === 1 }, lt: function(g, h, l) { return h < l[3] - 0 }, gt: function(g, h, l) { return h > l[3] - 0 }, nth: function(g, h, l) { return l[3] - 0 === h }, eq: function(g, h, l) { return l[3] - 0 === h } }, filter: { PSEUDO: function(g, h, l, m) {
        var q = h[1], p = n.filters[q]; if (p) return p(g, l, h, m); else if (q === "contains") return (g.textContent || g.innerText || a([g]) || "").indexOf(h[3]) >= 0; else if (q === "not") {
            h =
h[3]; l = 0; for (m = h.length; l < m; l++) if (h[l] === g) return false; return true
        } else k.error("Syntax error, unrecognized expression: " + q)
    }, CHILD: function(g, h) {
        var l = h[1], m = g; switch (l) {
            case "only": case "first": for (; m = m.previousSibling; ) if (m.nodeType === 1) return false; if (l === "first") return true; m = g; case "last": for (; m = m.nextSibling; ) if (m.nodeType === 1) return false; return true; case "nth": l = h[2]; var q = h[3]; if (l === 1 && q === 0) return true; h = h[0]; var p = g.parentNode; if (p && (p.sizcache !== h || !g.nodeIndex)) {
                    var v = 0; for (m = p.firstChild; m; m =
m.nextSibling) if (m.nodeType === 1) m.nodeIndex = ++v; p.sizcache = h
                } g = g.nodeIndex - q; return l === 0 ? g === 0 : g % l === 0 && g / l >= 0
        } 
    }, ID: function(g, h) { return g.nodeType === 1 && g.getAttribute("id") === h }, TAG: function(g, h) { return h === "*" && g.nodeType === 1 || g.nodeName.toLowerCase() === h }, CLASS: function(g, h) { return (" " + (g.className || g.getAttribute("class")) + " ").indexOf(h) > -1 }, ATTR: function(g, h) {
        var l = h[1]; g = n.attrHandle[l] ? n.attrHandle[l](g) : g[l] != null ? g[l] : g.getAttribute(l); l = g + ""; var m = h[2]; h = h[4]; return g == null ? m === "!=" : m ===
"=" ? l === h : m === "*=" ? l.indexOf(h) >= 0 : m === "~=" ? (" " + l + " ").indexOf(h) >= 0 : !h ? l && g !== false : m === "!=" ? l !== h : m === "^=" ? l.indexOf(h) === 0 : m === "$=" ? l.substr(l.length - h.length) === h : m === "|=" ? l === h || l.substr(0, h.length + 1) === h + "-" : false
    }, POS: function(g, h, l, m) { var q = n.setFilters[h[2]]; if (q) return q(g, l, h, m) } }
    }, r = n.match.POS; for (var u in n.match) {
        n.match[u] = new RegExp(n.match[u].source + /(?![^\[]*\])(?![^\(]*\))/.source); n.leftMatch[u] = new RegExp(/(^(?:.|\r|\n)*?)/.source + n.match[u].source.replace(/\\(\d+)/g, function(g,
h) { return "\\" + (h - 0 + 1) }))
    } var z = function(g, h) { g = Array.prototype.slice.call(g, 0); if (h) { h.push.apply(h, g); return h } return g }; try { Array.prototype.slice.call(s.documentElement.childNodes, 0) } catch (C) { z = function(g, h) { h = h || []; if (j.call(g) === "[object Array]") Array.prototype.push.apply(h, g); else if (typeof g.length === "number") for (var l = 0, m = g.length; l < m; l++) h.push(g[l]); else for (l = 0; g[l]; l++) h.push(g[l]); return h } } var B; if (s.documentElement.compareDocumentPosition) B = function(g, h) {
        if (!g.compareDocumentPosition ||
!h.compareDocumentPosition) { if (g == h) i = true; return g.compareDocumentPosition ? -1 : 1 } g = g.compareDocumentPosition(h) & 4 ? -1 : g === h ? 0 : 1; if (g === 0) i = true; return g
    }; else if ("sourceIndex" in s.documentElement) B = function(g, h) { if (!g.sourceIndex || !h.sourceIndex) { if (g == h) i = true; return g.sourceIndex ? -1 : 1 } g = g.sourceIndex - h.sourceIndex; if (g === 0) i = true; return g }; else if (s.createRange) B = function(g, h) {
        if (!g.ownerDocument || !h.ownerDocument) { if (g == h) i = true; return g.ownerDocument ? -1 : 1 } var l = g.ownerDocument.createRange(), m =
h.ownerDocument.createRange(); l.setStart(g, 0); l.setEnd(g, 0); m.setStart(h, 0); m.setEnd(h, 0); g = l.compareBoundaryPoints(Range.START_TO_END, m); if (g === 0) i = true; return g
    }; (function() {
        var g = s.createElement("div"), h = "script" + (new Date).getTime(); g.innerHTML = "<a name='" + h + "'/>"; var l = s.documentElement; l.insertBefore(g, l.firstChild); if (s.getElementById(h)) {
            n.find.ID = function(m, q, p) {
                if (typeof q.getElementById !== "undefined" && !p) return (q = q.getElementById(m[1])) ? q.id === m[1] || typeof q.getAttributeNode !== "undefined" &&
q.getAttributeNode("id").nodeValue === m[1] ? [q] : w : []
            }; n.filter.ID = function(m, q) { var p = typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id"); return m.nodeType === 1 && p && p.nodeValue === q } 
        } l.removeChild(g); l = g = null
    })(); (function() {
        var g = s.createElement("div"); g.appendChild(s.createComment("")); if (g.getElementsByTagName("*").length > 0) n.find.TAG = function(h, l) { l = l.getElementsByTagName(h[1]); if (h[1] === "*") { h = []; for (var m = 0; l[m]; m++) l[m].nodeType === 1 && h.push(l[m]); l = h } return l }; g.innerHTML = "<a href='#'></a>";
        if (g.firstChild && typeof g.firstChild.getAttribute !== "undefined" && g.firstChild.getAttribute("href") !== "#") n.attrHandle.href = function(h) { return h.getAttribute("href", 2) }; g = null
    })(); s.querySelectorAll && function() { var g = k, h = s.createElement("div"); h.innerHTML = "<p class='TEST'></p>"; if (!(h.querySelectorAll && h.querySelectorAll(".TEST").length === 0)) { k = function(m, q, p, v) { q = q || s; if (!v && q.nodeType === 9 && !x(q)) try { return z(q.querySelectorAll(m), p) } catch (t) { } return g(m, q, p, v) }; for (var l in g) k[l] = g[l]; h = null } } ();
    (function() { var g = s.createElement("div"); g.innerHTML = "<div class='test e'></div><div class='test'></div>"; if (!(!g.getElementsByClassName || g.getElementsByClassName("e").length === 0)) { g.lastChild.className = "e"; if (g.getElementsByClassName("e").length !== 1) { n.order.splice(1, 0, "CLASS"); n.find.CLASS = function(h, l, m) { if (typeof l.getElementsByClassName !== "undefined" && !m) return l.getElementsByClassName(h[1]) }; g = null } } })(); var E = s.compareDocumentPosition ? function(g, h) { return !!(g.compareDocumentPosition(h) & 16) } :
function(g, h) { return g !== h && (g.contains ? g.contains(h) : true) }, x = function(g) { return (g = (g ? g.ownerDocument || g : 0).documentElement) ? g.nodeName !== "HTML" : false }, ga = function(g, h) { var l = [], m = "", q; for (h = h.nodeType ? [h] : h; q = n.match.PSEUDO.exec(g); ) { m += q[0]; g = g.replace(n.match.PSEUDO, "") } g = n.relative[g] ? g + "*" : g; q = 0; for (var p = h.length; q < p; q++) k(g, h[q], l); return k.filter(m, l) }; c.find = k; c.expr = k.selectors; c.expr[":"] = c.expr.filters; c.unique = k.uniqueSort; c.text = a; c.isXMLDoc = x; c.contains = E
})(); var eb = /Until$/, fb = /^(?:parents|prevUntil|prevAll)/,
gb = /,/; R = Array.prototype.slice; var Ia = function(a, b, d) { if (c.isFunction(b)) return c.grep(a, function(e, j) { return !!b.call(e, j, e) === d }); else if (b.nodeType) return c.grep(a, function(e) { return e === b === d }); else if (typeof b === "string") { var f = c.grep(a, function(e) { return e.nodeType === 1 }); if (Ua.test(b)) return c.filter(b, f, !d); else b = c.filter(b, f) } return c.grep(a, function(e) { return c.inArray(e, b) >= 0 === d }) }; c.fn.extend({ find: function(a) {
    for (var b = this.pushStack("", "find", a), d = 0, f = 0, e = this.length; f < e; f++) {
        d = b.length;
        c.find(a, this[f], b); if (f > 0) for (var j = d; j < b.length; j++) for (var i = 0; i < d; i++) if (b[i] === b[j]) { b.splice(j--, 1); break } 
    } return b
}, has: function(a) { var b = c(a); return this.filter(function() { for (var d = 0, f = b.length; d < f; d++) if (c.contains(this, b[d])) return true }) }, not: function(a) { return this.pushStack(Ia(this, a, false), "not", a) }, filter: function(a) { return this.pushStack(Ia(this, a, true), "filter", a) }, is: function(a) { return !!a && c.filter(a, this).length > 0 }, closest: function(a, b) {
    if (c.isArray(a)) {
        var d = [], f = this[0], e, j =
{}, i; if (f && a.length) { e = 0; for (var o = a.length; e < o; e++) { i = a[e]; j[i] || (j[i] = c.expr.match.POS.test(i) ? c(i, b || this.context) : i) } for (; f && f.ownerDocument && f !== b; ) { for (i in j) { e = j[i]; if (e.jquery ? e.index(f) > -1 : c(f).is(e)) { d.push({ selector: i, elem: f }); delete j[i] } } f = f.parentNode } } return d
    } var k = c.expr.match.POS.test(a) ? c(a, b || this.context) : null; return this.map(function(n, r) { for (; r && r.ownerDocument && r !== b; ) { if (k ? k.index(r) > -1 : c(r).is(a)) return r; r = r.parentNode } return null })
}, index: function(a) {
    if (!a || typeof a ===
"string") return c.inArray(this[0], a ? c(a) : this.parent().children()); return c.inArray(a.jquery ? a[0] : a, this)
}, add: function(a, b) { a = typeof a === "string" ? c(a, b || this.context) : c.makeArray(a); b = c.merge(this.get(), a); return this.pushStack(qa(a[0]) || qa(b[0]) ? b : c.unique(b)) }, andSelf: function() { return this.add(this.prevObject) } 
}); c.each({ parent: function(a) { return (a = a.parentNode) && a.nodeType !== 11 ? a : null }, parents: function(a) { return c.dir(a, "parentNode") }, parentsUntil: function(a, b, d) {
    return c.dir(a, "parentNode",
d)
}, next: function(a) { return c.nth(a, 2, "nextSibling") }, prev: function(a) { return c.nth(a, 2, "previousSibling") }, nextAll: function(a) { return c.dir(a, "nextSibling") }, prevAll: function(a) { return c.dir(a, "previousSibling") }, nextUntil: function(a, b, d) { return c.dir(a, "nextSibling", d) }, prevUntil: function(a, b, d) { return c.dir(a, "previousSibling", d) }, siblings: function(a) { return c.sibling(a.parentNode.firstChild, a) }, children: function(a) { return c.sibling(a.firstChild) }, contents: function(a) {
    return c.nodeName(a, "iframe") ?
a.contentDocument || a.contentWindow.document : c.makeArray(a.childNodes)
} 
}, function(a, b) { c.fn[a] = function(d, f) { var e = c.map(this, b, d); eb.test(a) || (f = d); if (f && typeof f === "string") e = c.filter(f, e); e = this.length > 1 ? c.unique(e) : e; if ((this.length > 1 || gb.test(f)) && fb.test(a)) e = e.reverse(); return this.pushStack(e, a, R.call(arguments).join(",")) } }); c.extend({ filter: function(a, b, d) { if (d) a = ":not(" + a + ")"; return c.find.matches(a, b) }, dir: function(a, b, d) {
    var f = []; for (a = a[b]; a && a.nodeType !== 9 && (d === w || a.nodeType !== 1 || !c(a).is(d)); ) {
        a.nodeType ===
1 && f.push(a); a = a[b]
    } return f
}, nth: function(a, b, d) { b = b || 1; for (var f = 0; a; a = a[d]) if (a.nodeType === 1 && ++f === b) break; return a }, sibling: function(a, b) { for (var d = []; a; a = a.nextSibling) a.nodeType === 1 && a !== b && d.push(a); return d } 
}); var Ja = / jQuery\d+="(?:\d+|null)"/g, V = /^\s+/, Ka = /(<([\w:]+)[^>]*?)\/>/g, hb = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i, La = /<([\w:]+)/, ib = /<tbody/i, jb = /<|&#?\w+;/, ta = /<script|<object|<embed|<option|<style/i, ua = /checked\s*(?:[^=]|=\s*.checked.)/i, Ma = function(a, b, d) {
    return hb.test(d) ?
a : b + "></" + d + ">"
}, F = { option: [1, "<select multiple='multiple'>", "</select>"], legend: [1, "<fieldset>", "</fieldset>"], thead: [1, "<table>", "</table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], area: [1, "<map>", "</map>"], _default: [0, "", ""] }; F.optgroup = F.option; F.tbody = F.tfoot = F.colgroup = F.caption = F.thead; F.th = F.td; if (!c.support.htmlSerialize) F._default = [1, "div<div>", "</div>"]; c.fn.extend({ text: function(a) {
    if (c.isFunction(a)) return this.each(function(b) {
        var d =
c(this); d.text(a.call(this, b, d.text()))
    }); if (typeof a !== "object" && a !== w) return this.empty().append((this[0] && this[0].ownerDocument || s).createTextNode(a)); return c.text(this)
}, wrapAll: function(a) { if (c.isFunction(a)) return this.each(function(d) { c(this).wrapAll(a.call(this, d)) }); if (this[0]) { var b = c(a, this[0].ownerDocument).eq(0).clone(true); this[0].parentNode && b.insertBefore(this[0]); b.map(function() { for (var d = this; d.firstChild && d.firstChild.nodeType === 1; ) d = d.firstChild; return d }).append(this) } return this },
    wrapInner: function(a) { if (c.isFunction(a)) return this.each(function(b) { c(this).wrapInner(a.call(this, b)) }); return this.each(function() { var b = c(this), d = b.contents(); d.length ? d.wrapAll(a) : b.append(a) }) }, wrap: function(a) { return this.each(function() { c(this).wrapAll(a) }) }, unwrap: function() { return this.parent().each(function() { c.nodeName(this, "body") || c(this).replaceWith(this.childNodes) }).end() }, append: function() { return this.domManip(arguments, true, function(a) { this.nodeType === 1 && this.appendChild(a) }) },
    prepend: function() { return this.domManip(arguments, true, function(a) { this.nodeType === 1 && this.insertBefore(a, this.firstChild) }) }, before: function() { if (this[0] && this[0].parentNode) return this.domManip(arguments, false, function(b) { this.parentNode.insertBefore(b, this) }); else if (arguments.length) { var a = c(arguments[0]); a.push.apply(a, this.toArray()); return this.pushStack(a, "before", arguments) } }, after: function() {
        if (this[0] && this[0].parentNode) return this.domManip(arguments, false, function(b) {
            this.parentNode.insertBefore(b,
this.nextSibling)
        }); else if (arguments.length) { var a = this.pushStack(this, "after", arguments); a.push.apply(a, c(arguments[0]).toArray()); return a } 
    }, remove: function(a, b) { for (var d = 0, f; (f = this[d]) != null; d++) if (!a || c.filter(a, [f]).length) { if (!b && f.nodeType === 1) { c.cleanData(f.getElementsByTagName("*")); c.cleanData([f]) } f.parentNode && f.parentNode.removeChild(f) } return this }, empty: function() {
        for (var a = 0, b; (b = this[a]) != null; a++) for (b.nodeType === 1 && c.cleanData(b.getElementsByTagName("*")); b.firstChild; ) b.removeChild(b.firstChild);
        return this
    }, clone: function(a) { var b = this.map(function() { if (!c.support.noCloneEvent && !c.isXMLDoc(this)) { var d = this.outerHTML, f = this.ownerDocument; if (!d) { d = f.createElement("div"); d.appendChild(this.cloneNode(true)); d = d.innerHTML } return c.clean([d.replace(Ja, "").replace(/=([^="'>\s]+\/)>/g, '="$1">').replace(V, "")], f)[0] } else return this.cloneNode(true) }); if (a === true) { ra(this, b); ra(this.find("*"), b.find("*")) } return b }, html: function(a) {
        if (a === w) return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(Ja,
"") : null; else if (typeof a === "string" && !ta.test(a) && (c.support.leadingWhitespace || !V.test(a)) && !F[(La.exec(a) || ["", ""])[1].toLowerCase()]) { a = a.replace(Ka, Ma); try { for (var b = 0, d = this.length; b < d; b++) if (this[b].nodeType === 1) { c.cleanData(this[b].getElementsByTagName("*")); this[b].innerHTML = a } } catch (f) { this.empty().append(a) } } else c.isFunction(a) ? this.each(function(e) { var j = c(this), i = j.html(); j.empty().append(function() { return a.call(this, e, i) }) }) : this.empty().append(a); return this
    }, replaceWith: function(a) {
        if (this[0] &&
this[0].parentNode) { if (c.isFunction(a)) return this.each(function(b) { var d = c(this), f = d.html(); d.replaceWith(a.call(this, b, f)) }); if (typeof a !== "string") a = c(a).detach(); return this.each(function() { var b = this.nextSibling, d = this.parentNode; c(this).remove(); b ? c(b).before(a) : c(d).append(a) }) } else return this.pushStack(c(c.isFunction(a) ? a() : a), "replaceWith", a)
    }, detach: function(a) { return this.remove(a, true) }, domManip: function(a, b, d) {
        function f(u) {
            return c.nodeName(u, "table") ? u.getElementsByTagName("tbody")[0] ||
u.appendChild(u.ownerDocument.createElement("tbody")) : u
        } var e, j, i = a[0], o = [], k; if (!c.support.checkClone && arguments.length === 3 && typeof i === "string" && ua.test(i)) return this.each(function() { c(this).domManip(a, b, d, true) }); if (c.isFunction(i)) return this.each(function(u) { var z = c(this); a[0] = i.call(this, u, b ? z.html() : w); z.domManip(a, b, d) }); if (this[0]) {
            e = i && i.parentNode; e = c.support.parentNode && e && e.nodeType === 11 && e.childNodes.length === this.length ? { fragment: e} : sa(a, this, o); k = e.fragment; if (j = k.childNodes.length ===
1 ? (k = k.firstChild) : k.firstChild) { b = b && c.nodeName(j, "tr"); for (var n = 0, r = this.length; n < r; n++) d.call(b ? f(this[n], j) : this[n], n > 0 || e.cacheable || this.length > 1 ? k.cloneNode(true) : k) } o.length && c.each(o, Qa)
        } return this
    } 
}); c.fragments = {}; c.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(a, b) {
    c.fn[a] = function(d) {
        var f = []; d = c(d); var e = this.length === 1 && this[0].parentNode; if (e && e.nodeType === 11 && e.childNodes.length === 1 && d.length === 1) {
            d[b](this[0]);
            return this
        } else { e = 0; for (var j = d.length; e < j; e++) { var i = (e > 0 ? this.clone(true) : this).get(); c.fn[b].apply(c(d[e]), i); f = f.concat(i) } return this.pushStack(f, a, d.selector) } 
    } 
}); c.extend({ clean: function(a, b, d, f) {
    b = b || s; if (typeof b.createElement === "undefined") b = b.ownerDocument || b[0] && b[0].ownerDocument || s; for (var e = [], j = 0, i; (i = a[j]) != null; j++) {
        if (typeof i === "number") i += ""; if (i) {
            if (typeof i === "string" && !jb.test(i)) i = b.createTextNode(i); else if (typeof i === "string") {
                i = i.replace(Ka, Ma); var o = (La.exec(i) || ["",
""])[1].toLowerCase(), k = F[o] || F._default, n = k[0], r = b.createElement("div"); for (r.innerHTML = k[1] + i + k[2]; n--; ) r = r.lastChild; if (!c.support.tbody) { n = ib.test(i); o = o === "table" && !n ? r.firstChild && r.firstChild.childNodes : k[1] === "<table>" && !n ? r.childNodes : []; for (k = o.length - 1; k >= 0; --k) c.nodeName(o[k], "tbody") && !o[k].childNodes.length && o[k].parentNode.removeChild(o[k]) } !c.support.leadingWhitespace && V.test(i) && r.insertBefore(b.createTextNode(V.exec(i)[0]), r.firstChild); i = r.childNodes
            } if (i.nodeType) e.push(i); else e =
c.merge(e, i)
        } 
    } if (d) for (j = 0; e[j]; j++) if (f && c.nodeName(e[j], "script") && (!e[j].type || e[j].type.toLowerCase() === "text/javascript")) f.push(e[j].parentNode ? e[j].parentNode.removeChild(e[j]) : e[j]); else { e[j].nodeType === 1 && e.splice.apply(e, [j + 1, 0].concat(c.makeArray(e[j].getElementsByTagName("script")))); d.appendChild(e[j]) } return e
}, cleanData: function(a) {
    for (var b, d, f = c.cache, e = c.event.special, j = c.support.deleteExpando, i = 0, o; (o = a[i]) != null; i++) if (d = o[c.expando]) {
        b = f[d]; if (b.events) for (var k in b.events) e[k] ?
c.event.remove(o, k) : Ca(o, k, b.handle); if (j) delete o[c.expando]; else o.removeAttribute && o.removeAttribute(c.expando); delete f[d]
    } 
} 
}); var kb = /z-?index|font-?weight|opacity|zoom|line-?height/i, Na = /alpha\([^)]*\)/, Oa = /opacity=([^)]*)/, ha = /float/i, ia = /-([a-z])/ig, lb = /([A-Z])/g, mb = /^-?\d+(?:px)?$/i, nb = /^-?\d/, ob = { position: "absolute", visibility: "hidden", display: "block" }, pb = ["Left", "Right"], qb = ["Top", "Bottom"], rb = s.defaultView && s.defaultView.getComputedStyle, Pa = c.support.cssFloat ? "cssFloat" : "styleFloat", ja =
function(a, b) { return b.toUpperCase() }; c.fn.css = function(a, b) { return X(this, a, b, true, function(d, f, e) { if (e === w) return c.curCSS(d, f); if (typeof e === "number" && !kb.test(f)) e += "px"; c.style(d, f, e) }) }; c.extend({ style: function(a, b, d) {
    if (!a || a.nodeType === 3 || a.nodeType === 8) return w; if ((b === "width" || b === "height") && parseFloat(d) < 0) d = w; var f = a.style || a, e = d !== w; if (!c.support.opacity && b === "opacity") {
        if (e) {
            f.zoom = 1; b = parseInt(d, 10) + "" === "NaN" ? "" : "alpha(opacity=" + d * 100 + ")"; a = f.filter || c.curCSS(a, "filter") || ""; f.filter =
Na.test(a) ? a.replace(Na, b) : b
        } return f.filter && f.filter.indexOf("opacity=") >= 0 ? parseFloat(Oa.exec(f.filter)[1]) / 100 + "" : ""
    } if (ha.test(b)) b = Pa; b = b.replace(ia, ja); if (e) f[b] = d; return f[b]
}, css: function(a, b, d, f) {
    if (b === "width" || b === "height") {
        var e, j = b === "width" ? pb : qb; function i() {
            e = b === "width" ? a.offsetWidth : a.offsetHeight; f !== "border" && c.each(j, function() {
                f || (e -= parseFloat(c.curCSS(a, "padding" + this, true)) || 0); if (f === "margin") e += parseFloat(c.curCSS(a, "margin" + this, true)) || 0; else e -= parseFloat(c.curCSS(a,
"border" + this + "Width", true)) || 0
            })
        } a.offsetWidth !== 0 ? i() : c.swap(a, ob, i); return Math.max(0, Math.round(e))
    } return c.curCSS(a, b, d)
}, curCSS: function(a, b, d) {
    var f, e = a.style; if (!c.support.opacity && b === "opacity" && a.currentStyle) { f = Oa.test(a.currentStyle.filter || "") ? parseFloat(RegExp.$1) / 100 + "" : ""; return f === "" ? "1" : f } if (ha.test(b)) b = Pa; if (!d && e && e[b]) f = e[b]; else if (rb) {
        if (ha.test(b)) b = "float"; b = b.replace(lb, "-$1").toLowerCase(); e = a.ownerDocument.defaultView; if (!e) return null; if (a = e.getComputedStyle(a, null)) f =
a.getPropertyValue(b); if (b === "opacity" && f === "") f = "1"
    } else if (a.currentStyle) { d = b.replace(ia, ja); f = a.currentStyle[b] || a.currentStyle[d]; if (!mb.test(f) && nb.test(f)) { b = e.left; var j = a.runtimeStyle.left; a.runtimeStyle.left = a.currentStyle.left; e.left = d === "fontSize" ? "1em" : f || 0; f = e.pixelLeft + "px"; e.left = b; a.runtimeStyle.left = j } } return f
}, swap: function(a, b, d) { var f = {}; for (var e in b) { f[e] = a.style[e]; a.style[e] = b[e] } d.call(a); for (e in b) a.style[e] = f[e] } 
}); if (c.expr && c.expr.filters) {
            c.expr.filters.hidden = function(a) {
                var b =
a.offsetWidth, d = a.offsetHeight, f = a.nodeName.toLowerCase() === "tr"; return b === 0 && d === 0 && !f ? true : b > 0 && d > 0 && !f ? false : c.curCSS(a, "display") === "none"
            }; c.expr.filters.visible = function(a) { return !c.expr.filters.hidden(a) } 
        } var sb = J(), tb = /<script(.|\s)*?\/script>/gi, ub = /select|textarea/i, vb = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i, N = /=\?(&|$)/, ka = /\?/, wb = /(\?|&)_=.*?(&|$)/, xb = /^(\w+:)?\/\/([^\/?#]+)/, yb = /%20/g, zb = c.fn.load; c.fn.extend({ load: function(a, b, d) {
            if (typeof a !==
"string") return zb.call(this, a); else if (!this.length) return this; var f = a.indexOf(" "); if (f >= 0) { var e = a.slice(f, a.length); a = a.slice(0, f) } f = "GET"; if (b) if (c.isFunction(b)) { d = b; b = null } else if (typeof b === "object") { b = c.param(b, c.ajaxSettings.traditional); f = "POST" } var j = this; c.ajax({ url: a, type: f, dataType: "html", data: b, complete: function(i, o) { if (o === "success" || o === "notmodified") j.html(e ? c("<div />").append(i.responseText.replace(tb, "")).find(e) : i.responseText); d && j.each(d, [i.responseText, o, i]) } }); return this
        },
            serialize: function() { return c.param(this.serializeArray()) }, serializeArray: function() { return this.map(function() { return this.elements ? c.makeArray(this.elements) : this }).filter(function() { return this.name && !this.disabled && (this.checked || ub.test(this.nodeName) || vb.test(this.type)) }).map(function(a, b) { a = c(this).val(); return a == null ? null : c.isArray(a) ? c.map(a, function(d) { return { name: b.name, value: d} }) : { name: b.name, value: a} }).get() } 
        }); c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a, b) { c.fn[b] = function(d) { return this.bind(b, d) } }); c.extend({ get: function(a, b, d, f) { if (c.isFunction(b)) { f = f || d; d = b; b = null } return c.ajax({ type: "GET", url: a, data: b, success: d, dataType: f }) }, getScript: function(a, b) { return c.get(a, null, b, "script") }, getJSON: function(a, b, d) { return c.get(a, b, d, "json") }, post: function(a, b, d, f) { if (c.isFunction(b)) { f = f || d; d = b; b = {} } return c.ajax({ type: "POST", url: a, data: b, success: d, dataType: f }) }, ajaxSetup: function(a) { c.extend(c.ajaxSettings, a) }, ajaxSettings: { url: location.href,
    global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: A.XMLHttpRequest && (A.location.protocol !== "file:" || !A.ActiveXObject) ? function() { return new A.XMLHttpRequest } : function() { try { return new A.ActiveXObject("Microsoft.XMLHTTP") } catch (a) { } }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*"}
}, lastModified: {}, etag: {}, ajax: function(a) {
    function b() {
        e.success &&
e.success.call(k, o, i, x); e.global && f("ajaxSuccess", [x, e])
    } function d() { e.complete && e.complete.call(k, x, i); e.global && f("ajaxComplete", [x, e]); e.global && ! --c.active && c.event.trigger("ajaxStop") } function f(q, p) { (e.context ? c(e.context) : c.event).trigger(q, p) } var e = c.extend(true, {}, c.ajaxSettings, a), j, i, o, k = a && a.context || e, n = e.type.toUpperCase(); if (e.data && e.processData && typeof e.data !== "string") e.data = c.param(e.data, e.traditional); if (e.dataType === "jsonp") {
        if (n === "GET") N.test(e.url) || (e.url += (ka.test(e.url) ?
"&" : "?") + (e.jsonp || "callback") + "=?"); else if (!e.data || !N.test(e.data)) e.data = (e.data ? e.data + "&" : "") + (e.jsonp || "callback") + "=?"; e.dataType = "json"
    } if (e.dataType === "json" && (e.data && N.test(e.data) || N.test(e.url))) { j = e.jsonpCallback || "jsonp" + sb++; if (e.data) e.data = (e.data + "").replace(N, "=" + j + "$1"); e.url = e.url.replace(N, "=" + j + "$1"); e.dataType = "script"; A[j] = A[j] || function(q) { o = q; b(); d(); A[j] = w; try { delete A[j] } catch (p) { } z && z.removeChild(C) } } if (e.dataType === "script" && e.cache === null) e.cache = false; if (e.cache ===
false && n === "GET") { var r = J(), u = e.url.replace(wb, "$1_=" + r + "$2"); e.url = u + (u === e.url ? (ka.test(e.url) ? "&" : "?") + "_=" + r : "") } if (e.data && n === "GET") e.url += (ka.test(e.url) ? "&" : "?") + e.data; e.global && !c.active++ && c.event.trigger("ajaxStart"); r = (r = xb.exec(e.url)) && (r[1] && r[1] !== location.protocol || r[2] !== location.host); if (e.dataType === "script" && n === "GET" && r) {
        var z = s.getElementsByTagName("head")[0] || s.documentElement, C = s.createElement("script"); C.src = e.url; if (e.scriptCharset) C.charset = e.scriptCharset; if (!j) {
            var B =
false; C.onload = C.onreadystatechange = function() { if (!B && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { B = true; b(); d(); C.onload = C.onreadystatechange = null; z && C.parentNode && z.removeChild(C) } } 
        } z.insertBefore(C, z.firstChild); return w
    } var E = false, x = e.xhr(); if (x) {
        e.username ? x.open(n, e.url, e.async, e.username, e.password) : x.open(n, e.url, e.async); try {
            if (e.data || a && a.contentType) x.setRequestHeader("Content-Type", e.contentType); if (e.ifModified) {
                c.lastModified[e.url] && x.setRequestHeader("If-Modified-Since",
c.lastModified[e.url]); c.etag[e.url] && x.setRequestHeader("If-None-Match", c.etag[e.url])
            } r || x.setRequestHeader("X-Requested-With", "XMLHttpRequest"); x.setRequestHeader("Accept", e.dataType && e.accepts[e.dataType] ? e.accepts[e.dataType] + ", */*" : e.accepts._default)
        } catch (ga) { } if (e.beforeSend && e.beforeSend.call(k, x, e) === false) { e.global && ! --c.active && c.event.trigger("ajaxStop"); x.abort(); return false } e.global && f("ajaxSend", [x, e]); var g = x.onreadystatechange = function(q) {
            if (!x || x.readyState === 0 || q === "abort") {
                E ||
d(); E = true; if (x) x.onreadystatechange = c.noop
            } else if (!E && x && (x.readyState === 4 || q === "timeout")) { E = true; x.onreadystatechange = c.noop; i = q === "timeout" ? "timeout" : !c.httpSuccess(x) ? "error" : e.ifModified && c.httpNotModified(x, e.url) ? "notmodified" : "success"; var p; if (i === "success") try { o = c.httpData(x, e.dataType, e) } catch (v) { i = "parsererror"; p = v } if (i === "success" || i === "notmodified") j || b(); else c.handleError(e, x, i, p); d(); q === "timeout" && x.abort(); if (e.async) x = null } 
        }; try {
            var h = x.abort; x.abort = function() {
                x && h.call(x);
                g("abort")
            } 
        } catch (l) { } e.async && e.timeout > 0 && setTimeout(function() { x && !E && g("timeout") }, e.timeout); try { x.send(n === "POST" || n === "PUT" || n === "DELETE" ? e.data : null) } catch (m) { c.handleError(e, x, null, m); d() } e.async || g(); return x
    } 
}, handleError: function(a, b, d, f) { if (a.error) a.error.call(a.context || a, b, d, f); if (a.global) (a.context ? c(a.context) : c.event).trigger("ajaxError", [b, a, f]) }, active: 0, httpSuccess: function(a) {
    try {
        return !a.status && location.protocol === "file:" || a.status >= 200 && a.status < 300 || a.status === 304 || a.status ===
1223 || a.status === 0
    } catch (b) { } return false
}, httpNotModified: function(a, b) { var d = a.getResponseHeader("Last-Modified"), f = a.getResponseHeader("Etag"); if (d) c.lastModified[b] = d; if (f) c.etag[b] = f; return a.status === 304 || a.status === 0 }, httpData: function(a, b, d) {
    var f = a.getResponseHeader("content-type") || "", e = b === "xml" || !b && f.indexOf("xml") >= 0; a = e ? a.responseXML : a.responseText; e && a.documentElement.nodeName === "parsererror" && c.error("parsererror"); if (d && d.dataFilter) a = d.dataFilter(a, b); if (typeof a === "string") if (b ===
"json" || !b && f.indexOf("json") >= 0) a = c.parseJSON(a); else if (b === "script" || !b && f.indexOf("javascript") >= 0) c.globalEval(a); return a
}, param: function(a, b) {
    function d(i, o) { if (c.isArray(o)) c.each(o, function(k, n) { b || /\[\]$/.test(i) ? f(i, n) : d(i + "[" + (typeof n === "object" || c.isArray(n) ? k : "") + "]", n) }); else !b && o != null && typeof o === "object" ? c.each(o, function(k, n) { d(i + "[" + k + "]", n) }) : f(i, o) } function f(i, o) { o = c.isFunction(o) ? o() : o; e[e.length] = encodeURIComponent(i) + "=" + encodeURIComponent(o) } var e = []; if (b === w) b = c.ajaxSettings.traditional;
    if (c.isArray(a) || a.jquery) c.each(a, function() { f(this.name, this.value) }); else for (var j in a) d(j, a[j]); return e.join("&").replace(yb, "+")
} 
}); var la = {}, Ab = /toggle|show|hide/, Bb = /^([+-]=)?([\d+-.]+)(.*)$/, W, va = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; c.fn.extend({ show: function(a, b) {
    if (a || a === 0) return this.animate(K("show", 3), a, b); else {
        a = 0; for (b = this.length; a < b; a++) {
            var d = c.data(this[a], "olddisplay");
            this[a].style.display = d || ""; if (c.css(this[a], "display") === "none") { d = this[a].nodeName; var f; if (la[d]) f = la[d]; else { var e = c("<" + d + " />").appendTo("body"); f = e.css("display"); if (f === "none") f = "block"; e.remove(); la[d] = f } c.data(this[a], "olddisplay", f) } 
        } a = 0; for (b = this.length; a < b; a++) this[a].style.display = c.data(this[a], "olddisplay") || ""; return this
    } 
}, hide: function(a, b) {
    if (a || a === 0) return this.animate(K("hide", 3), a, b); else {
        a = 0; for (b = this.length; a < b; a++) {
            var d = c.data(this[a], "olddisplay"); !d && d !== "none" && c.data(this[a],
"olddisplay", c.css(this[a], "display"))
        } a = 0; for (b = this.length; a < b; a++) this[a].style.display = "none"; return this
    } 
}, _toggle: c.fn.toggle, toggle: function(a, b) { var d = typeof a === "boolean"; if (c.isFunction(a) && c.isFunction(b)) this._toggle.apply(this, arguments); else a == null || d ? this.each(function() { var f = d ? a : c(this).is(":hidden"); c(this)[f ? "show" : "hide"]() }) : this.animate(K("toggle", 3), a, b); return this }, fadeTo: function(a, b, d) { return this.filter(":hidden").css("opacity", 0).show().end().animate({ opacity: b }, a, d) },
    animate: function(a, b, d, f) {
        var e = c.speed(b, d, f); if (c.isEmptyObject(a)) return this.each(e.complete); return this[e.queue === false ? "each" : "queue"](function() {
            var j = c.extend({}, e), i, o = this.nodeType === 1 && c(this).is(":hidden"), k = this; for (i in a) {
                var n = i.replace(ia, ja); if (i !== n) { a[n] = a[i]; delete a[i]; i = n } if (a[i] === "hide" && o || a[i] === "show" && !o) return j.complete.call(this); if ((i === "height" || i === "width") && this.style) { j.display = c.css(this, "display"); j.overflow = this.style.overflow } if (c.isArray(a[i])) {
                    (j.specialEasing =
j.specialEasing || {})[i] = a[i][1]; a[i] = a[i][0]
                } 
            } if (j.overflow != null) this.style.overflow = "hidden"; j.curAnim = c.extend({}, a); c.each(a, function(r, u) { var z = new c.fx(k, j, r); if (Ab.test(u)) z[u === "toggle" ? o ? "show" : "hide" : u](a); else { var C = Bb.exec(u), B = z.cur(true) || 0; if (C) { u = parseFloat(C[2]); var E = C[3] || "px"; if (E !== "px") { k.style[r] = (u || 1) + E; B = (u || 1) / z.cur(true) * B; k.style[r] = B + E } if (C[1]) u = (C[1] === "-=" ? -1 : 1) * u + B; z.custom(B, u, E) } else z.custom(B, u, "") } }); return true
        })
    }, stop: function(a, b) {
        var d = c.timers; a && this.queue([]);
        this.each(function() { for (var f = d.length - 1; f >= 0; f--) if (d[f].elem === this) { b && d[f](true); d.splice(f, 1) } }); b || this.dequeue(); return this
    } 
}); c.each({ slideDown: K("show", 1), slideUp: K("hide", 1), slideToggle: K("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide"} }, function(a, b) { c.fn[a] = function(d, f) { return this.animate(b, d, f) } }); c.extend({ speed: function(a, b, d) {
    var f = a && typeof a === "object" ? a : { complete: d || !d && b || c.isFunction(a) && a, duration: a, easing: d && b || b && !c.isFunction(b) && b }; f.duration = c.fx.off ? 0 : typeof f.duration ===
"number" ? f.duration : c.fx.speeds[f.duration] || c.fx.speeds._default; f.old = f.complete; f.complete = function() { f.queue !== false && c(this).dequeue(); c.isFunction(f.old) && f.old.call(this) }; return f
}, easing: { linear: function(a, b, d, f) { return d + f * a }, swing: function(a, b, d, f) { return (-Math.cos(a * Math.PI) / 2 + 0.5) * f + d } }, timers: [], fx: function(a, b, d) { this.options = b; this.elem = a; this.prop = d; if (!b.orig) b.orig = {} } 
}); c.fx.prototype = { update: function() {
    this.options.step && this.options.step.call(this.elem, this.now, this); (c.fx.step[this.prop] ||
c.fx.step._default)(this); if ((this.prop === "height" || this.prop === "width") && this.elem.style) this.elem.style.display = "block"
}, cur: function(a) { if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) return this.elem[this.prop]; return (a = parseFloat(c.css(this.elem, this.prop, a))) && a > -10000 ? a : parseFloat(c.curCSS(this.elem, this.prop)) || 0 }, custom: function(a, b, d) {
    function f(j) { return e.step(j) } this.startTime = J(); this.start = a; this.end = b; this.unit = d || this.unit || "px"; this.now = this.start;
    this.pos = this.state = 0; var e = this; f.elem = this.elem; if (f() && c.timers.push(f) && !W) W = setInterval(c.fx.tick, 13)
}, show: function() { this.options.orig[this.prop] = c.style(this.elem, this.prop); this.options.show = true; this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()); c(this.elem).show() }, hide: function() { this.options.orig[this.prop] = c.style(this.elem, this.prop); this.options.hide = true; this.custom(this.cur(), 0) }, step: function(a) {
    var b = J(), d = true; if (a || b >= this.options.duration + this.startTime) {
        this.now =
this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; for (var f in this.options.curAnim) if (this.options.curAnim[f] !== true) d = false; if (d) {
            if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; a = c.data(this.elem, "olddisplay"); this.elem.style.display = a ? a : this.options.display; if (c.css(this.elem, "display") === "none") this.elem.style.display = "block" } this.options.hide && c(this.elem).hide(); if (this.options.hide || this.options.show) for (var e in this.options.curAnim) c.style(this.elem,
e, this.options.orig[e]); this.options.complete.call(this.elem)
        } return false
    } else { e = b - this.startTime; this.state = e / this.options.duration; a = this.options.easing || (c.easing.swing ? "swing" : "linear"); this.pos = c.easing[this.options.specialEasing && this.options.specialEasing[this.prop] || a](this.state, e, 0, 1, this.options.duration); this.now = this.start + (this.end - this.start) * this.pos; this.update() } return true
} 
}; c.extend(c.fx, { tick: function() {
    for (var a = c.timers, b = 0; b < a.length; b++) a[b]() || a.splice(b--, 1); a.length ||
c.fx.stop()
}, stop: function() { clearInterval(W); W = null }, speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function(a) { c.style(a.elem, "opacity", a.now) }, _default: function(a) { if (a.elem.style && a.elem.style[a.prop] != null) a.elem.style[a.prop] = (a.prop === "width" || a.prop === "height" ? Math.max(0, a.now) : a.now) + a.unit; else a.elem[a.prop] = a.now } }
}); if (c.expr && c.expr.filters) c.expr.filters.animated = function(a) { return c.grep(c.timers, function(b) { return a === b.elem }).length }; c.fn.offset = "getBoundingClientRect" in s.documentElement ?
function(a) { var b = this[0]; if (a) return this.each(function(e) { c.offset.setOffset(this, a, e) }); if (!b || !b.ownerDocument) return null; if (b === b.ownerDocument.body) return c.offset.bodyOffset(b); var d = b.getBoundingClientRect(), f = b.ownerDocument; b = f.body; f = f.documentElement; return { top: d.top + (self.pageYOffset || c.support.boxModel && f.scrollTop || b.scrollTop) - (f.clientTop || b.clientTop || 0), left: d.left + (self.pageXOffset || c.support.boxModel && f.scrollLeft || b.scrollLeft) - (f.clientLeft || b.clientLeft || 0)} } : function(a) {
    var b =
this[0]; if (a) return this.each(function(r) { c.offset.setOffset(this, a, r) }); if (!b || !b.ownerDocument) return null; if (b === b.ownerDocument.body) return c.offset.bodyOffset(b); c.offset.initialize(); var d = b.offsetParent, f = b, e = b.ownerDocument, j, i = e.documentElement, o = e.body; f = (e = e.defaultView) ? e.getComputedStyle(b, null) : b.currentStyle; for (var k = b.offsetTop, n = b.offsetLeft; (b = b.parentNode) && b !== o && b !== i; ) {
        if (c.offset.supportsFixedPosition && f.position === "fixed") break; j = e ? e.getComputedStyle(b, null) : b.currentStyle;
        k -= b.scrollTop; n -= b.scrollLeft; if (b === d) { k += b.offsetTop; n += b.offsetLeft; if (c.offset.doesNotAddBorder && !(c.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(b.nodeName))) { k += parseFloat(j.borderTopWidth) || 0; n += parseFloat(j.borderLeftWidth) || 0 } f = d; d = b.offsetParent } if (c.offset.subtractsBorderForOverflowNotVisible && j.overflow !== "visible") { k += parseFloat(j.borderTopWidth) || 0; n += parseFloat(j.borderLeftWidth) || 0 } f = j
    } if (f.position === "relative" || f.position === "static") { k += o.offsetTop; n += o.offsetLeft } if (c.offset.supportsFixedPosition &&
f.position === "fixed") { k += Math.max(i.scrollTop, o.scrollTop); n += Math.max(i.scrollLeft, o.scrollLeft) } return { top: k, left: n}
}; c.offset = { initialize: function() {
    var a = s.body, b = s.createElement("div"), d, f, e, j = parseFloat(c.curCSS(a, "marginTop", true)) || 0; c.extend(b.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" }); b.innerHTML = "<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>";
    a.insertBefore(b, a.firstChild); d = b.firstChild; f = d.firstChild; e = d.nextSibling.firstChild.firstChild; this.doesNotAddBorder = f.offsetTop !== 5; this.doesAddBorderForTableAndCells = e.offsetTop === 5; f.style.position = "fixed"; f.style.top = "20px"; this.supportsFixedPosition = f.offsetTop === 20 || f.offsetTop === 15; f.style.position = f.style.top = ""; d.style.overflow = "hidden"; d.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = f.offsetTop === -5; this.doesNotIncludeMarginInBodyOffset = a.offsetTop !== j; a.removeChild(b);
    c.offset.initialize = c.noop
}, bodyOffset: function(a) { var b = a.offsetTop, d = a.offsetLeft; c.offset.initialize(); if (c.offset.doesNotIncludeMarginInBodyOffset) { b += parseFloat(c.curCSS(a, "marginTop", true)) || 0; d += parseFloat(c.curCSS(a, "marginLeft", true)) || 0 } return { top: b, left: d} }, setOffset: function(a, b, d) {
    if (/static/.test(c.curCSS(a, "position"))) a.style.position = "relative"; var f = c(a), e = f.offset(), j = parseInt(c.curCSS(a, "top", true), 10) || 0, i = parseInt(c.curCSS(a, "left", true), 10) || 0; if (c.isFunction(b)) b = b.call(a,
d, e); d = { top: b.top - e.top + j, left: b.left - e.left + i }; "using" in b ? b.using.call(a, d) : f.css(d)
} 
}; c.fn.extend({ position: function() {
    if (!this[0]) return null; var a = this[0], b = this.offsetParent(), d = this.offset(), f = /^body|html$/i.test(b[0].nodeName) ? { top: 0, left: 0} : b.offset(); d.top -= parseFloat(c.curCSS(a, "marginTop", true)) || 0; d.left -= parseFloat(c.curCSS(a, "marginLeft", true)) || 0; f.top += parseFloat(c.curCSS(b[0], "borderTopWidth", true)) || 0; f.left += parseFloat(c.curCSS(b[0], "borderLeftWidth", true)) || 0; return { top: d.top -
f.top, left: d.left - f.left}
    }, offsetParent: function() { return this.map(function() { for (var a = this.offsetParent || s.body; a && !/^body|html$/i.test(a.nodeName) && c.css(a, "position") === "static"; ) a = a.offsetParent; return a }) } 
}); c.each(["Left", "Top"], function(a, b) {
    var d = "scroll" + b; c.fn[d] = function(f) {
        var e = this[0], j; if (!e) return null; if (f !== w) return this.each(function() { if (j = wa(this)) j.scrollTo(!a ? f : c(j).scrollLeft(), a ? f : c(j).scrollTop()); else this[d] = f }); else return (j = wa(e)) ? "pageXOffset" in j ? j[a ? "pageYOffset" :
"pageXOffset"] : c.support.boxModel && j.document.documentElement[d] || j.document.body[d] : e[d]
    } 
}); c.each(["Height", "Width"], function(a, b) {
    var d = b.toLowerCase(); c.fn["inner" + b] = function() { return this[0] ? c.css(this[0], d, false, "padding") : null }; c.fn["outer" + b] = function(f) { return this[0] ? c.css(this[0], d, false, f ? "margin" : "border") : null }; c.fn[d] = function(f) {
        var e = this[0]; if (!e) return f == null ? null : this; if (c.isFunction(f)) return this.each(function(j) { var i = c(this); i[d](f.call(this, j, i[d]())) }); return "scrollTo" in
e && e.document ? e.document.compatMode === "CSS1Compat" && e.document.documentElement["client" + b] || e.document.body["client" + b] : e.nodeType === 9 ? Math.max(e.documentElement["client" + b], e.body["scroll" + b], e.documentElement["scroll" + b], e.body["offset" + b], e.documentElement["offset" + b]) : f === w ? c.css(e, d) : this.css(d, typeof f === "string" ? f : f + "px")
    } 
}); A.jQuery = A.$ = c
    })(window);

    /*--JQUERY-DIMENSION--*/

    (function($) {

        $.dimensions = {
            version: '1.2'
        };
        $.each(['Height', 'Width'], function(i, name) {
            $.fn['inner' + name] = function() {
                if (!this[0]) return;

                var torl = name == 'Height' ? 'Top' : 'Left',
		    borr = name == 'Height' ? 'Bottom' : 'Right';

                return this.is(':visible') ? this[0]['client' + name] : num(this, name.toLowerCase()) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
            };
            $.fn['outer' + name] = function(options) {
                if (!this[0]) return;

                var torl = name == 'Height' ? 'Top' : 'Left',
		    borr = name == 'Height' ? 'Bottom' : 'Right';

                options = $.extend({ margin: false }, options || {});

                var val = this.is(':visible') ?
				this[0]['offset' + name] :
				num(this, name.toLowerCase())
					+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
					+ num(this, 'padding' + torl) + num(this, 'padding' + borr);

                return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
            };
        });
        $.each(['Left', 'Top'], function(i, name) {
            $.fn['scroll' + name] = function(val) {
                if (!this[0]) return;

                return val != undefined ?
			this.each(function() {
			    this == window || this == document ?
					window.scrollTo(
						name == 'Left' ? val : $(window)['scrollLeft'](),
						name == 'Top' ? val : $(window)['scrollTop']()
					) :
					this['scroll' + name] = val;
			}) :
			this[0] == window || this[0] == document ?
				self[(name == 'Left' ? 'pageXOffset' : 'pageYOffset')] ||
					$.boxModel && document.documentElement['scroll' + name] ||
					document.body['scroll' + name] :
				this[0]['scroll' + name];
            };
        });

        $.fn.extend({
            position: function() {
                var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;

                if (elem) {
                    offsetParent = this.offsetParent();
                    offset = this.offset();
                    parentOffset = offsetParent.offset();
                    offset.top -= num(elem, 'marginTop');
                    offset.left -= num(elem, 'marginLeft');
                    parentOffset.top += num(offsetParent, 'borderTopWidth');
                    parentOffset.left += num(offsetParent, 'borderLeftWidth');

                    results = {
                        top: offset.top - parentOffset.top,
                        left: offset.left - parentOffset.left
                    };
                }

                return results;
            },

            offsetParent: function() {
                var offsetParent = this[0].offsetParent;
                while (offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static'))
                    offsetParent = offsetParent.offsetParent;
                return $(offsetParent);
            }
        });

        function num(el, prop) {
            return parseInt($.curCSS(el.jquery ? el[0] : el, prop, true)) || 0;
        };

    })(jQuery);


    /*--JQUERY-EASING-1.2--*/

    jQuery.extend(jQuery.easing,
{
    easeInQuad: function(x, t, b, c, d) {
        return c * (t /= d) * t + b;
    },
    easeOutQuad: function(x, t, b, c, d) {
        return -c * (t /= d) * (t - 2) + b;
    },
    easeInOutQuad: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t + b;
        return -c / 2 * ((--t) * (t - 2) - 1) + b;
    },
    easeInCubic: function(x, t, b, c, d) {
        return c * (t /= d) * t * t + b;
    },
    easeOutCubic: function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t + 1) + b;
    },
    easeInOutCubic: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t + 2) + b;
    },
    easeInQuart: function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t + b;
    },
    easeOutQuart: function(x, t, b, c, d) {
        return -c * ((t = t / d - 1) * t * t * t - 1) + b;
    },
    easeInOutQuart: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
        return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
    },
    easeInQuint: function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t * t + b;
    },
    easeOutQuint: function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
    },
    easeInOutQuint: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
    },
    easeInSine: function(x, t, b, c, d) {
        return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
    },
    easeOutSine: function(x, t, b, c, d) {
        return c * Math.sin(t / d * (Math.PI / 2)) + b;
    },
    easeInOutSine: function(x, t, b, c, d) {
        return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
    },
    easeInExpo: function(x, t, b, c, d) {
        return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
    },
    easeOutExpo: function(x, t, b, c, d) {
        return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
    },
    easeInOutExpo: function(x, t, b, c, d) {
        if (t == 0) return b;
        if (t == d) return b + c;
        if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
        return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
    },
    easeInCirc: function(x, t, b, c, d) {
        return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
    },
    easeOutCirc: function(x, t, b, c, d) {
        return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
    },
    easeInOutCirc: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
        return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
    },
    easeInElastic: function(x, t, b, c, d) {
        var s = 1.70158; var p = 0; var a = c;
        if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;
        if (a < Math.abs(c)) { a = c; var s = p / 4; }
        else var s = p / (2 * Math.PI) * Math.asin(c / a);
        return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
    },
    easeOutElastic: function(x, t, b, c, d) {
        var s = 1.70158; var p = 0; var a = c;
        if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;
        if (a < Math.abs(c)) { a = c; var s = p / 4; }
        else var s = p / (2 * Math.PI) * Math.asin(c / a);
        return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
    },
    easeInOutElastic: function(x, t, b, c, d) {
        var s = 1.70158; var p = 0; var a = c;
        if (t == 0) return b; if ((t /= d / 2) == 2) return b + c; if (!p) p = d * (.3 * 1.5);
        if (a < Math.abs(c)) { a = c; var s = p / 4; }
        else var s = p / (2 * Math.PI) * Math.asin(c / a);
        if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
        return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
    },
    easeInBack: function(x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        return c * (t /= d) * t * ((s + 1) * t - s) + b;
    },
    easeOutBack: function(x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
    },
    easeInOutBack: function(x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
        return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
    },
    easeInBounce: function(x, t, b, c, d) {
        return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
    },
    easeOutBounce: function(x, t, b, c, d) {
        if ((t /= d) < (1 / 2.75)) {
            return c * (7.5625 * t * t) + b;
        } else if (t < (2 / 2.75)) {
            return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
        } else if (t < (2.5 / 2.75)) {
            return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
        } else {
            return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
        }
    },
    easeInOutBounce: function(x, t, b, c, d) {
        if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
        return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;
    }
});

    /*--JQUERY-CODA-SLIDER-1.1.1--*/


    jQuery(function() {
        jQuery("div.csw").prepend("<p class='loading'>Loading...</p>");
    });
    var j = 0;
    jQuery.fn.codaSlider = function(settings) {
        settings = jQuery.extend({
            easeFunc: "expoinout",
            easeTime: 750,
            toolTip: false,
            customNav: false
        }, settings);
        return this.each(function() {
            var container = jQuery(this);
            container.find("p.loading").remove();
            container.removeClass("csw").addClass("stripViewer");
            var panelWidth = container.find("div.panel").width();
            var panelCount = container.find("div.panel").size();
            var stripViewerWidth = panelWidth * panelCount;
            container.find("div.panelContainer").css("width", stripViewerWidth);
            var navWidth = panelCount * 2;
            if (location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
                var cPanel = parseInt(location.hash.slice(1));
                var cnt = -(panelWidth * (cPanel - 1));
                jQuery(this).find("div.panelContainer").css({ left: cnt });
            } else {
                var cPanel = 1;
            };
            container.each(function(i) {

                if (!settings.customNav) {
                    jQuery(this).before("<div class='stripNavL' id='stripNavL" + j + "'><a href='#'>Left</a><\/div>");
                    jQuery(this).after("<div class='stripNavR' id='stripNavR" + j + "'><a href='#'>Right</a><\/div>");

                    jQuery(this).before("<div class='stripNav' id='stripNav" + j + "'><ul><\/ul><\/div>");
                    jQuery(this).find("div.panel").each(function(n) {
                        jQuery("div#stripNav" + j + " ul").append("<li class='tab" + (n + 1) + "'><a href='#" + (n + 1) + "'>" + jQuery(this).attr("title") + "<\/a><\/li>");
                    });
                }
                var navLSelector = settings.customNav ? settings.leftNavSelector : "div#stripNavL" + j + " a";
                jQuery(navLSelector).click(function() {
                    if (cPanel == 1) {
                        var cnt = -(panelWidth * (panelCount - 1));
                        cPanel = panelCount;
                        jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().parent().find("li:last a").addClass("current");
                    } else {
                        cPanel -= 1;
                        var cnt = -(panelWidth * (cPanel - 1));
                        jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().prev().find("a").addClass("current");
                    };
                    $("div.panelContainer").animate({ left: cnt }, settings.easeTime, settings.easeFunc);
                    location.hash = cPanel;
                    return false;
                });
                var navRSelector = settings.customNav ? settings.rightNavSelector : "div#stripNavR" + j + " a";
                jQuery(navRSelector).click(function() {
                    if (cPanel == panelCount) {
                        var cnt = 0;
                        cPanel = 1;
                        jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().parent().find("a:eq(0)").addClass("current");
                    } else {
                        var cnt = -(panelWidth * cPanel);
                        cPanel += 1;
                        jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().next().find("a").addClass("current");
                    };
                    $("div.panelContainer").animate({ left: cnt }, settings.easeTime, settings.easeFunc);
                    location.hash = cPanel;
                    return false;
                });
                jQuery("a.cross-link").click(function() {
                    jQuery(this).parents().find(".stripNav ul li a:eq(" + (parseInt(jQuery(this).attr("href").slice(1)) - 1) + ")").trigger('click');
                });
                jQuery("div#stripNav" + j).css("width", navWidth);

                if (location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
                    jQuery("div#stripNav" + j + " a:eq(" + (location.hash.slice(1) - 1) + ")").addClass("current");
                } else {
                    jQuery("div#stripNav" + j + " a:eq(0)").addClass("current");
                }

            });

            j++;
        });
    };

    (function($) {

        $.extend({
            tabs: {
                remoteCount: 0
            }
        });


        $.fn.tabs = function(initial, settings) {

            if (typeof initial == 'object') settings = initial;
            settings = $.extend({
                initial: (initial && typeof initial == 'number' && initial > 0) ? --initial : 0,
                disabled: null,
                bookmarkable: $.ajaxHistory ? true : false,
                remote: false,
                spinner: 'Loading&#8230;',
                hashPrefix: 'remote-tab-',
                fxFade: null,
                fxSlide: null,
                fxShow: null,
                fxHide: null,
                fxSpeed: 'normal',
                fxShowSpeed: null,
                fxHideSpeed: null,
                fxAutoHeight: false,
                onClick: null,
                onHide: null,
                onShow: null,
                navClass: 'tabs-nav',
                selectedClass: 'tabs-selected',
                disabledClass: 'tabs-disabled',
                containerClass: 'tabs-container',
                hideClass: 'tabs-hide',
                loadingClass: 'tabs-loading',
                tabStruct: 'div'
            }, settings || {});

            $.browser.msie6 = $.browser.msie && ($.browser.version && $.browser.version < 7 || /MSIE 6.0/.test(navigator.userAgent)); // do not check for 6.0 alone, userAgent in Windows Vista has "Windows NT 6.0"

            function unFocus() {
                scrollTo(0, 0);
            }
            return this.each(function() {
                var container = this;
                var nav = $('ul.' + settings.navClass, container);
                nav = nav.size() && nav || $('>ul:eq(0)', container);
                var tabs = $('a', nav);
                if (settings.remote) {
                    tabs.each(function() {
                        var id = settings.hashPrefix + (++$.tabs.remoteCount), hash = '#' + id, url = this.href;
                        this.href = hash;
                        $('<div id="' + id + '" class="' + settings.containerClass + '"></div>').appendTo(container);

                        $(this).bind('loadRemoteTab', function(e, callback) {
                            var $$ = $(this).addClass(settings.loadingClass), span = $('span', this)[0], tabTitle = span.innerHTML;
                            if (settings.spinner) {
                                span.innerHTML = '<em>' + settings.spinner + '</em>';
                            }
                            setTimeout(function() {
                                $(hash).load(url, function() {
                                    if (settings.spinner) {
                                        span.innerHTML = tabTitle;
                                    }
                                    $$.removeClass(settings.loadingClass);
                                    callback && callback();
                                });
                            }, 0);
                        });

                    });
                }
                var containers = $('div.' + settings.containerClass, container);
                containers = containers.size() && containers || $('>' + settings.tabStruct, container);

                nav.is('.' + settings.navClass) || nav.addClass(settings.navClass);
                containers.each(function() {
                    var $$ = $(this);
                    $$.is('.' + settings.containerClass) || $$.addClass(settings.containerClass);
                });
                var hasSelectedClass = $('li', nav).index($('li.' + settings.selectedClass, nav)[0]);
                if (hasSelectedClass >= 0) {
                    settings.initial = hasSelectedClass;
                }
                if (location.hash) {
                    tabs.each(function(i) {
                        if (this.hash == location.hash) {
                            settings.initial = i;
                            if (($.browser.msie || $.browser.opera) && !settings.remote) {
                                var toShow = $(location.hash);
                                var toShowId = toShow.attr('id');
                                toShow.attr('id', '');
                                setTimeout(function() {
                                    toShow.attr('id', toShowId);
                                }, 500);
                            }
                            unFocus();
                            return false;
                        }
                    });
                }
                if ($.browser.msie) {
                    unFocus();
                }

                containers.filter(':eq(' + settings.initial + ')').show().end().not(':eq(' + settings.initial + ')').addClass(settings.hideClass);
                $('li', nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass); // we need to remove classes eventually if hash takes precedence over class

                tabs.eq(settings.initial).trigger('loadRemoteTab').end();

                if (settings.fxAutoHeight) {
                    var _setAutoHeight = function(reset) {
                        var heights = $.map(containers.get(), function(el) {
                            var h, jq = $(el);
                            if (reset) {
                                if ($.browser.msie6) {
                                    el.style.removeExpression('behaviour');
                                    el.style.height = '';
                                    el.minHeight = null;
                                }
                                h = jq.css({ 'min-height': '' }).height();
                            } else {
                                h = jq.height();
                            }
                            return h;
                        }).sort(function(a, b) {
                            return b - a;
                        });
                        if ($.browser.msie6) {
                            containers.each(function() {
                                this.minHeight = heights[0] + 'px';
                                this.style.setExpression('behaviour', 'this.style.height = this.minHeight ? this.minHeight : "1px"'); // using an expression to not make print styles useless
                            });
                        } else {
                            containers.css({ 'min-height': heights[0] + 'px' });
                        }
                    };
                    _setAutoHeight();
                    var cachedWidth = container.offsetWidth;
                    var cachedHeight = container.offsetHeight;
                    var watchFontSize = $('#tabs-watch-font-size').get(0) || $('<span id="tabs-watch-font-size">M</span>').css({ display: 'block', position: 'absolute', visibility: 'hidden' }).appendTo(document.body).get(0);
                    var cachedFontSize = watchFontSize.offsetHeight;
                    setInterval(function() {
                        var currentWidth = container.offsetWidth;
                        var currentHeight = container.offsetHeight;
                        var currentFontSize = watchFontSize.offsetHeight;
                        if (currentHeight > cachedHeight || currentWidth != cachedWidth || currentFontSize != cachedFontSize) {
                            _setAutoHeight((currentWidth > cachedWidth || currentFontSize < cachedFontSize)); // if heights gets smaller reset min-height
                            cachedWidth = currentWidth;
                            cachedHeight = currentHeight;
                            cachedFontSize = currentFontSize;
                        }
                    }, 50);
                }
                var showAnim = {}, hideAnim = {}, showSpeed = settings.fxShowSpeed || settings.fxSpeed, hideSpeed = settings.fxHideSpeed || settings.fxSpeed;
                if (settings.fxSlide || settings.fxFade) {
                    if (settings.fxSlide) {
                        showAnim['height'] = 'show';
                        hideAnim['height'] = 'hide';
                    }
                    if (settings.fxFade) {
                        showAnim['opacity'] = 'show';
                        hideAnim['opacity'] = 'hide';
                    }
                } else {
                    if (settings.fxShow) {
                        showAnim = settings.fxShow;
                    } else {
                        showAnim['min-width'] = 0;
                        showSpeed = 1;
                    }
                    if (settings.fxHide) {
                        hideAnim = settings.fxHide;
                    } else {
                        hideAnim['min-width'] = 0;
                        hideSpeed = 1;
                    }
                }

                var onClick = settings.onClick, onHide = settings.onHide, onShow = settings.onShow;
                tabs.bind('triggerTab', function() {

                    var li = $(this).parents('li:eq(0)');
                    if (container.locked || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass)) {
                        return false;
                    }

                    var hash = this.hash;

                    if ($.browser.msie) {

                        $(this).trigger('click');
                        if (settings.bookmarkable) {
                            $.ajaxHistory.update(hash);
                            location.hash = hash.replace('#', '');
                        }

                    } else if ($.browser.safari) {
                        var tempForm = $('<form action="' + hash + '"><div><input type="submit" value="h" /></div></form>').get(0); // no need to append it to the body
                        tempForm.submit();
                        $(this).trigger('click');
                        if (settings.bookmarkable) {
                            $.ajaxHistory.update(hash);
                        }

                    } else {

                        if (settings.bookmarkable) {
                            location.hash = hash.replace('#', '');
                        } else {
                            $(this).trigger('click');
                        }

                    }

                });
                tabs.bind('disableTab', function() {
                    var li = $(this).parents('li:eq(0)');
                    if ($.browser.safari) {
                        li.animate({ opacity: 0 }, 1, function() {
                            li.css({ opacity: '' });
                        });
                    }
                    li.addClass(settings.disabledClass);

                });
                if (settings.disabled && settings.disabled.length) {
                    for (var i = 0, k = settings.disabled.length; i < k; i++) {
                        tabs.eq(--settings.disabled[i]).trigger('disableTab').end();
                    }
                };
                tabs.bind('enableTab', function() {
                    var li = $(this).parents('li:eq(0)');
                    li.removeClass(settings.disabledClass);
                    if ($.browser.safari) {
                        li.animate({ opacity: 1 }, 1, function() {
                            li.css({ opacity: '' });
                        });
                    }
                });

                tabs.bind('click', function(e) {

                    var trueClick = e.clientX;
                    var clicked = this, li = $(this).parents('li:eq(0)'), toShow = $(this.hash), toHide = containers.filter(':visible');

                    if (container['locked'] || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass) || typeof onClick == 'function' && onClick(this, toShow[0], toHide[0]) === false) {
                        this.blur();
                        return false;
                    }

                    container['locked'] = true;

                    if (toShow.size()) {

                        if ($.browser.msie && settings.bookmarkable) {
                            var toShowId = this.hash.replace('#', '');
                            toShow.attr('id', '');
                            setTimeout(function() {
                                toShow.attr('id', toShowId);
                            }, 0);
                        }

                        var resetCSS = { display: '', overflow: '', height: '' };
                        if (!$.browser.msie) {
                            resetCSS['opacity'] = '';
                        }

                        function switchTab() {
                            if (settings.bookmarkable && trueClick) {
                                $.ajaxHistory.update(clicked.hash);
                            }
                            toHide.animate(hideAnim, hideSpeed, function() { //
                                $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass);
                                toHide.addClass(settings.hideClass).css(resetCSS);
                                if (typeof onHide == 'function') {
                                    onHide(clicked, toShow[0], toHide[0]);
                                }
                                if (!(settings.fxSlide || settings.fxFade || settings.fxShow)) {
                                    toShow.css('display', 'block');
                                }
                                toShow.animate(showAnim, showSpeed, function() {
                                    toShow.removeClass(settings.hideClass).css(resetCSS);
                                    if ($.browser.msie) {
                                        toHide[0].style.filter = '';
                                        toShow[0].style.filter = '';
                                    }
                                    if (typeof onShow == 'function') {
                                        onShow(clicked, toShow[0], toHide[0]);
                                    }
                                    container['locked'] = null;
                                });
                            });
                        }

                        if (!settings.remote) {
                            switchTab();
                        } else {
                            $(clicked).trigger('loadRemoteTab', [switchTab]);
                        }

                    } else {
                        alert('There is no such container.');
                    }

                    var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
                    var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
                    setTimeout(function() {
                        window.scrollTo(scrollX, scrollY);
                    }, 0);

                    this.blur();

                    return settings.bookmarkable && !!trueClick;

                });
                if (settings.bookmarkable) {
                    $.ajaxHistory.initialize(function() {
                        tabs.eq(settings.initial).trigger('click').end();
                    });
                }

            });

        };

        var tabEvents = ['triggerTab', 'disableTab', 'enableTab'];
        for (var i = 0; i < tabEvents.length; i++) {
            $.fn[tabEvents[i]] = (function(tabEvent) {
                return function(tab) {
                    return this.each(function() {
                        var nav = $('ul.tabs-nav', this);
                        nav = nav.size() && nav || $('>ul:eq(0)', this);
                        var a;
                        if (!tab || typeof tab == 'number') {
                            a = $('li a', nav).eq((tab && tab > 0 && tab - 1 || 0));
                        } else if (typeof tab == 'string') {
                            a = $('li a[@href$="#' + tab + '"]', nav);
                        }
                        a.trigger(tabEvent);
                    });
                };
            })(tabEvents[i]);
        }

        $.fn.activeTab = function() {
            var selectedTabs = [];
            this.each(function() {
                var nav = $('ul.tabs-nav', this);
                nav = nav.size() && nav || $('>ul:eq(0)', this);
                var lis = $('li', nav);
                selectedTabs.push(lis.index(lis.filter('.tabs-selected')[0]) + 1);
            });
            return selectedTabs[0];
        };

    })(jQuery);

    /*--JQUERY-VALIDATE--*/
    (function($) {
        $.extend($.fn, { validate: function(options) { if (!this.length) { options && options.debug && window.console && console.warn("nothing selected, can't validate, returning nothing"); return; } var validator = $.data(this[0], 'validator'); if (validator) { return validator; } validator = new $.validator(options, this[0]); $.data(this[0], 'validator', validator); if (validator.settings.onsubmit) { this.find("input, button").filter(".cancel").click(function() { validator.cancelSubmit = true; }); if (validator.settings.submitHandler) { this.find("input, button").filter(":submit").click(function() { validator.submitButton = this; }); } this.submit(function(event) { if (validator.settings.debug) event.preventDefault(); function handle() { if (validator.settings.submitHandler) { if (validator.submitButton) { var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm); } validator.settings.submitHandler.call(validator, validator.currentForm); if (validator.submitButton) { hidden.remove(); } return false; } return true; } if (validator.cancelSubmit) { validator.cancelSubmit = false; return handle(); } if (validator.form()) { if (validator.pendingRequest) { validator.formSubmitted = true; return false; } return handle(); } else { validator.focusInvalid(); return false; } }); } return validator; }, valid: function() { if ($(this[0]).is('form')) { return this.validate().form(); } else { var valid = true; var validator = $(this[0].form).validate(); this.each(function() { valid &= validator.element(this); }); return valid; } }, removeAttrs: function(attributes) { var result = {}, $element = this; $.each(attributes.split(/\s/), function(index, value) { result[value] = $element.attr(value); $element.removeAttr(value); }); return result; }, rules: function(command, argument) { var element = this[0]; if (command) { var settings = $.data(element.form, 'validator').settings; var staticRules = settings.rules; var existingRules = $.validator.staticRules(element); switch (command) { case "add": $.extend(existingRules, $.validator.normalizeRule(argument)); staticRules[element.name] = existingRules; if (argument.messages) settings.messages[element.name] = $.extend(settings.messages[element.name], argument.messages); break; case "remove": if (!argument) { delete staticRules[element.name]; return existingRules; } var filtered = {}; $.each(argument.split(/\s/), function(index, method) { filtered[method] = existingRules[method]; delete existingRules[method]; }); return filtered; } } var data = $.validator.normalizeRules($.extend({}, $.validator.metadataRules(element), $.validator.classRules(element), $.validator.attributeRules(element), $.validator.staticRules(element)), element); if (data.required) { var param = data.required; delete data.required; data = $.extend({ required: param }, data); } return data; } }); $.extend($.expr[":"], { blank: function(a) { return !$.trim("" + a.value); }, filled: function(a) { return !!$.trim("" + a.value); }, unchecked: function(a) { return !a.checked; } }); $.validator = function(options, form) { this.settings = $.extend(true, {}, $.validator.defaults, options); this.currentForm = form; this.init(); }; $.validator.format = function(source, params) { if (arguments.length == 1) return function() { var args = $.makeArray(arguments); args.unshift(source); return $.validator.format.apply(this, args); }; if (arguments.length > 2 && params.constructor != Array) { params = $.makeArray(arguments).slice(1); } if (params.constructor != Array) { params = [params]; } $.each(params, function(i, n) { source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n); }); return source; }; $.extend($.validator, { defaults: { messages: {}, groups: {}, rules: {}, errorClass: "error", validClass: "valid", errorElement: "label", focusInvalid: true, errorContainer: $([]), errorLabelContainer: $([]), onsubmit: true, ignore: [], ignoreTitle: false, onfocusin: function(element) { this.lastActive = element; if (this.settings.focusCleanup && !this.blockFocusCleanup) { this.settings.unhighlight && this.settings.unhighlight.call(this, element, this.settings.errorClass, this.settings.validClass); this.errorsFor(element).hide(); } }, onfocusout: function(element) { if (!this.checkable(element) && (element.name in this.submitted || !this.optional(element))) { this.element(element); } }, onkeyup: function(element) { if (element.name in this.submitted || element == this.lastElement) { this.element(element); } }, onclick: function(element) { if (element.name in this.submitted) this.element(element); else if (element.parentNode.name in this.submitted) this.element(element.parentNode); }, highlight: function(element, errorClass, validClass) { $(element).addClass(errorClass).removeClass(validClass); }, unhighlight: function(element, errorClass, validClass) { $(element).removeClass(errorClass).addClass(validClass); } }, setDefaults: function(settings) { $.extend($.validator.defaults, settings); }, messages: { required: "This field is required.", remote: "Please fix this field.", email: "Please enter a valid email address.", url: "Please enter a valid URL.", date: "Please enter a valid date.", dateISO: "Please enter a valid date (ISO).", number: "Please enter a valid number.", digits: "Please enter only digits.", creditcard: "Please enter a valid credit card number.", equalTo: "Please enter the same value again.", accept: "Please enter a value with a valid extension.", maxlength: $.validator.format("Please enter no more than {0} characters."), minlength: $.validator.format("Please enter at least {0} characters."), rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), range: $.validator.format("Please enter a value between {0} and {1}."), max: $.validator.format("Please enter a value less than or equal to {0}."), min: $.validator.format("Please enter a value greater than or equal to {0}.") }, autoCreateRanges: false, prototype: { init: function() { this.labelContainer = $(this.settings.errorLabelContainer); this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm); this.containers = $(this.settings.errorContainer).add(this.settings.errorLabelContainer); this.submitted = {}; this.valueCache = {}; this.pendingRequest = 0; this.pending = {}; this.invalid = {}; this.reset(); var groups = (this.groups = {}); $.each(this.settings.groups, function(key, value) { $.each(value.split(/\s/), function(index, name) { groups[name] = key; }); }); var rules = this.settings.rules; $.each(rules, function(key, value) { rules[key] = $.validator.normalizeRule(value); }); function delegate(event) { var validator = $.data(this[0].form, "validator"), eventType = "on" + event.type.replace(/^validate/, ""); validator.settings[eventType] && validator.settings[eventType].call(validator, this[0]); } $(this.currentForm).validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate).validateDelegate(":radio, :checkbox, select, option", "click", delegate); if (this.settings.invalidHandler) $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler); }, form: function() { this.checkForm(); $.extend(this.submitted, this.errorMap); this.invalid = $.extend({}, this.errorMap); if (!this.valid()) $(this.currentForm).triggerHandler("invalid-form", [this]); this.showErrors(); return this.valid(); }, checkForm: function() { this.prepareForm(); for (var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++) { this.check(elements[i]); } return this.valid(); }, element: function(element) { element = this.clean(element); this.lastElement = element; this.prepareElement(element); this.currentElements = $(element); var result = this.check(element); if (result) { delete this.invalid[element.name]; } else { this.invalid[element.name] = true; } if (!this.numberOfInvalids()) { this.toHide = this.toHide.add(this.containers); } this.showErrors(); return result; }, showErrors: function(errors) { if (errors) { $.extend(this.errorMap, errors); this.errorList = []; for (var name in errors) { this.errorList.push({ message: errors[name], element: this.findByName(name)[0] }); } this.successList = $.grep(this.successList, function(element) { return !(element.name in errors); }); } this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors(); }, resetForm: function() { if ($.fn.resetForm) $(this.currentForm).resetForm(); this.submitted = {}; this.prepareForm(); this.hideErrors(); this.elements().removeClass(this.settings.errorClass); }, numberOfInvalids: function() { return this.objectLength(this.invalid); }, objectLength: function(obj) { var count = 0; for (var i in obj) count++; return count; }, hideErrors: function() { this.addWrapper(this.toHide).hide(); }, valid: function() { return this.size() == 0; }, size: function() { return this.errorList.length; }, focusInvalid: function() { if (this.settings.focusInvalid) { try { $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin"); } catch (e) { } } }, findLastActive: function() { var lastActive = this.lastActive; return lastActive && $.grep(this.errorList, function(n) { return n.element.name == lastActive.name; }).length == 1 && lastActive; }, elements: function() { var validator = this, rulesCache = {}; return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function() { !this.name && validator.settings.debug && window.console && console.error("%o has no name assigned", this); if (this.name in rulesCache || !validator.objectLength($(this).rules())) return false; rulesCache[this.name] = true; return true; }); }, clean: function(selector) { return $(selector)[0]; }, errors: function() { return $(this.settings.errorElement + "." + this.settings.errorClass, this.errorContext); }, reset: function() { this.successList = []; this.errorList = []; this.errorMap = {}; this.toShow = $([]); this.toHide = $([]); this.currentElements = $([]); }, prepareForm: function() { this.reset(); this.toHide = this.errors().add(this.containers); }, prepareElement: function(element) { this.reset(); this.toHide = this.errorsFor(element); }, check: function(element) {
            element = this.clean(element); if (this.checkable(element)) { element = this.findByName(element.name)[0]; } var rules = $(element).rules(); var dependencyMismatch = false; for (method in rules) {
                var rule = { method: method, parameters: rules[method] }; try { var result = $.validator.methods[method].call(this, element.value.replace(/\r/g, ""), element, rule.parameters); if (result == "dependency-mismatch") { dependencyMismatch = true; continue; } dependencyMismatch = false; if (result == "pending") { this.toHide = this.toHide.not(this.errorsFor(element)); return; } if (!result) { this.formatAndAdd(element, rule); return false; } } catch (e) {
                    this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
+ ", check the '" + rule.method + "' method", e); throw e;
                }
            } if (dependencyMismatch) return; if (this.objectLength(rules)) this.successList.push(element); return true;
        }, customMetaMessage: function(element, method) { if (!$.metadata) return; var meta = this.settings.meta ? $(element).metadata()[this.settings.meta] : $(element).metadata(); return meta && meta.messages && meta.messages[method]; }, customMessage: function(name, method) { var m = this.settings.messages[name]; return m && (m.constructor == String ? m : m[method]); }, findDefined: function() { for (var i = 0; i < arguments.length; i++) { if (arguments[i] !== undefined) return arguments[i]; } return undefined; }, defaultMessage: function(element, method) { return this.findDefined(this.customMessage(element.name, method), this.customMetaMessage(element, method), !this.settings.ignoreTitle && element.title || undefined, $.validator.messages[method], "<strong>Warning: No message defined for " + element.name + "</strong>"); }, formatAndAdd: function(element, rule) { var message = this.defaultMessage(element, rule.method), theregex = /\$?\{(\d+)\}/g; if (typeof message == "function") { message = message.call(this, rule.parameters, element); } else if (theregex.test(message)) { message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters); } this.errorList.push({ message: message, element: element }); this.errorMap[element.name] = message; this.submitted[element.name] = message; }, addWrapper: function(toToggle) { if (this.settings.wrapper) toToggle = toToggle.add(toToggle.parent(this.settings.wrapper)); return toToggle; }, defaultShowErrors: function() { for (var i = 0; this.errorList[i]; i++) { var error = this.errorList[i]; this.settings.highlight && this.settings.highlight.call(this, error.element, this.settings.errorClass, this.settings.validClass); this.showLabel(error.element, error.message); } if (this.errorList.length) { this.toShow = this.toShow.add(this.containers); } if (this.settings.success) { for (var i = 0; this.successList[i]; i++) { this.showLabel(this.successList[i]); } } if (this.settings.unhighlight) { for (var i = 0, elements = this.validElements(); elements[i]; i++) { this.settings.unhighlight.call(this, elements[i], this.settings.errorClass, this.settings.validClass); } } this.toHide = this.toHide.not(this.toShow); this.hideErrors(); this.addWrapper(this.toShow).show(); }, validElements: function() { return this.currentElements.not(this.invalidElements()); }, invalidElements: function() { return $(this.errorList).map(function() { return this.element; }); }, showLabel: function(element, message) { var label = this.errorsFor(element); if (label.length) { label.removeClass().addClass(this.settings.errorClass); label.attr("generated") && label.html(message); } else { label = $("<" + this.settings.errorElement + "/>").attr({ "for": this.idOrName(element), generated: true }).addClass(this.settings.errorClass).html(message || ""); if (this.settings.wrapper) { label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent(); } if (!this.labelContainer.append(label).length) this.settings.errorPlacement ? this.settings.errorPlacement(label, $(element)) : label.insertAfter(element); } if (!message && this.settings.success) { label.text(""); typeof this.settings.success == "string" ? label.addClass(this.settings.success) : this.settings.success(label); } this.toShow = this.toShow.add(label); }, errorsFor: function(element) { var name = this.idOrName(element); return this.errors().filter(function() { return $(this).attr('for') == name; }); }, idOrName: function(element) { return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name); }, checkable: function(element) { return /radio|checkbox/i.test(element.type); }, findByName: function(name) { var form = this.currentForm; return $(document.getElementsByName(name)).map(function(index, element) { return element.form == form && element.name == name && element || null; }); }, getLength: function(value, element) { switch (element.nodeName.toLowerCase()) { case 'select': return $("option:selected", element).length; case 'input': if (this.checkable(element)) return this.findByName(element.name).filter(':checked').length; } return value.length; }, depend: function(param, element) { return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true; }, dependTypes: { "boolean": function(param, element) { return param; }, "string": function(param, element) { return !!$(param, element.form).length; }, "function": function(param, element) { return param(element); } }, optional: function(element) { return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch"; }, startRequest: function(element) { if (!this.pending[element.name]) { this.pendingRequest++; this.pending[element.name] = true; } }, stopRequest: function(element, valid) { this.pendingRequest--; if (this.pendingRequest < 0) this.pendingRequest = 0; delete this.pending[element.name]; if (valid && this.pendingRequest == 0 && this.formSubmitted && this.form()) { $(this.currentForm).submit(); this.formSubmitted = false; } else if (!valid && this.pendingRequest == 0 && this.formSubmitted) { $(this.currentForm).triggerHandler("invalid-form", [this]); this.formSubmitted = false; } }, previousValue: function(element) { return $.data(element, "previousValue") || $.data(element, "previousValue", { old: null, valid: true, message: this.defaultMessage(element, "remote") }); }
        }, classRuleSettings: { required: { required: true }, email: { email: true }, url: { url: true }, date: { date: true }, dateISO: { dateISO: true }, dateDE: { dateDE: true }, number: { number: true }, numberDE: { numberDE: true }, digits: { digits: true }, creditcard: { creditcard: true} }, addClassRules: function(className, rules) { className.constructor == String ? this.classRuleSettings[className] = rules : $.extend(this.classRuleSettings, className); }, classRules: function(element) { var rules = {}; var classes = $(element).attr('class'); classes && $.each(classes.split(' '), function() { if (this in $.validator.classRuleSettings) { $.extend(rules, $.validator.classRuleSettings[this]); } }); return rules; }, attributeRules: function(element) { var rules = {}; var $element = $(element); for (method in $.validator.methods) { var value = $element.attr(method); if (value) { rules[method] = value; } } if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) { delete rules.maxlength; } return rules; }, metadataRules: function(element) { if (!$.metadata) return {}; var meta = $.data(element.form, 'validator').settings.meta; return meta ? $(element).metadata()[meta] : $(element).metadata(); }, staticRules: function(element) { var rules = {}; var validator = $.data(element.form, 'validator'); if (validator.settings.rules) { rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {}; } return rules; }, normalizeRules: function(rules, element) { $.each(rules, function(prop, val) { if (val === false) { delete rules[prop]; return; } if (val.param || val.depends) { var keepRule = true; switch (typeof val.depends) { case "string": keepRule = !!$(val.depends, element.form).length; break; case "function": keepRule = val.depends.call(element, element); break; } if (keepRule) { rules[prop] = val.param !== undefined ? val.param : true; } else { delete rules[prop]; } } }); $.each(rules, function(rule, parameter) { rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter; }); $.each(['minlength', 'maxlength', 'min', 'max'], function() { if (rules[this]) { rules[this] = Number(rules[this]); } }); $.each(['rangelength', 'range'], function() { if (rules[this]) { rules[this] = [Number(rules[this][0]), Number(rules[this][1])]; } }); if ($.validator.autoCreateRanges) { if (rules.min && rules.max) { rules.range = [rules.min, rules.max]; delete rules.min; delete rules.max; } if (rules.minlength && rules.maxlength) { rules.rangelength = [rules.minlength, rules.maxlength]; delete rules.minlength; delete rules.maxlength; } } if (rules.messages) { delete rules.messages; } return rules; }, normalizeRule: function(data) { if (typeof data == "string") { var transformed = {}; $.each(data.split(/\s/), function() { transformed[this] = true; }); data = transformed; } return data; }, addMethod: function(name, method, message) { $.validator.methods[name] = method; $.validator.messages[name] = message != undefined ? message : $.validator.messages[name]; if (method.length < 3) { $.validator.addClassRules(name, $.validator.normalizeRule(name)); } }, methods: { required: function(value, element, param) { if (!this.depend(param, element)) return "dependency-mismatch"; switch (element.nodeName.toLowerCase()) { case 'select': var val = $(element).val(); return val && val.length > 0; case 'input': if (this.checkable(element)) return this.getLength(value, element) > 0; default: return $.trim(value).length > 0; } }, remote: function(value, element, param) { if (this.optional(element)) return "dependency-mismatch"; var previous = this.previousValue(element); if (!this.settings.messages[element.name]) this.settings.messages[element.name] = {}; previous.originalMessage = this.settings.messages[element.name].remote; this.settings.messages[element.name].remote = previous.message; param = typeof param == "string" && { url: param} || param; if (previous.old !== value) { previous.old = value; var validator = this; this.startRequest(element); var data = {}; data[element.name] = value; $.ajax($.extend(true, { url: param, mode: "abort", port: "validate" + element.name, dataType: "json", data: data, success: function(response) { validator.settings.messages[element.name].remote = previous.originalMessage; var valid = response === true; if (valid) { var submitted = validator.formSubmitted; validator.prepareElement(element); validator.formSubmitted = submitted; validator.successList.push(element); validator.showErrors(); } else { var errors = {}; var message = (previous.message = response || validator.defaultMessage(element, "remote")); errors[element.name] = $.isFunction(message) ? message(value) : message; validator.showErrors(errors); } previous.valid = valid; validator.stopRequest(element, valid); } }, param)); return "pending"; } else if (this.pending[element.name]) { return "pending"; } return previous.valid; }, minlength: function(value, element, param) { return this.optional(element) || this.getLength($.trim(value), element) >= param; }, maxlength: function(value, element, param) { return this.optional(element) || this.getLength($.trim(value), element) <= param; }, rangelength: function(value, element, param) { var length = this.getLength($.trim(value), element); return this.optional(element) || (length >= param[0] && length <= param[1]); }, min: function(value, element, param) { return this.optional(element) || value >= param; }, max: function(value, element, param) { return this.optional(element) || value <= param; }, range: function(value, element, param) { return this.optional(element) || (value >= param[0] && value <= param[1]); }, email: function(value, element) { return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); }, url: function(value, element) { return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); }, date: function(value, element) { return this.optional(element) || !/Invalid|NaN/.test(new Date(value)); }, dateISO: function(value, element) { return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value); }, number: function(value, element) { return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value); }, digits: function(value, element) { return this.optional(element) || /^\d+$/.test(value); }, creditcard: function(value, element) { if (this.optional(element)) return "dependency-mismatch"; if (/[^0-9-]+/.test(value)) return false; var nCheck = 0, nDigit = 0, bEven = false; value = value.replace(/\D/g, ""); for (var n = value.length - 1; n >= 0; n--) { var cDigit = value.charAt(n); var nDigit = parseInt(cDigit, 10); if (bEven) { if ((nDigit *= 2) > 9) nDigit -= 9; } nCheck += nDigit; bEven = !bEven; } return (nCheck % 10) == 0; }, accept: function(value, element, param) { param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif"; return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); }, equalTo: function(value, element, param) { var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { $(element).valid(); }); return value == target.val(); } }
        }); $.format = $.validator.format;
    })(jQuery); ; (function($) { var ajax = $.ajax; var pendingRequests = {}; $.ajax = function(settings) { settings = $.extend(settings, $.extend({}, $.ajaxSettings, settings)); var port = settings.port; if (settings.mode == "abort") { if (pendingRequests[port]) { pendingRequests[port].abort(); } return (pendingRequests[port] = ajax.apply(this, arguments)); } return ajax.apply(this, arguments); }; })(jQuery); ; (function($) { if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) { $.each({ focus: 'focusin', blur: 'focusout' }, function(original, fix) { $.event.special[fix] = { setup: function() { this.addEventListener(original, handler, true); }, teardown: function() { this.removeEventListener(original, handler, true); }, handler: function(e) { arguments[0] = $.event.fix(e); arguments[0].type = fix; return $.event.handle.apply(this, arguments); } }; function handler(e) { e = $.event.fix(e); e.type = fix; return $.event.handle.call(this, e); } }); }; $.extend($.fn, { validateDelegate: function(delegate, type, handler) { return this.bind(type, function(event) { var target = $(event.target); if (target.is(delegate)) { return handler.apply(target, arguments); } }); } }); })(jQuery);
    //Validate son//

    $(document).ready(JT_init); function JT_init() {
        $("a.jTip")
.hover(function() { JT_show(this.href, this.id, this.name) }, function() { $('#JT').remove() })
.click(function() { return false });
    }
    function JT_show(url, linkId, title) {
        if (title == false) title = "&nbsp;"; var de = document.documentElement; var w = self.innerWidth || (de && de.clientWidth) || document.body.clientWidth; var hasArea = w - getAbsoluteLeft(linkId); var clickElementy = getAbsoluteTop(linkId) - 3; var queryString = url.replace(/^[^\?]+\??/, ''); var params = parseQuery(queryString); if (params['width'] === undefined) { params['width'] = 250 }; if (params['link'] !== undefined) { $('#' + linkId).bind('click', function() { window.location = params['link'] }); $('#' + linkId).css('cursor', 'pointer'); }
        if (hasArea > ((params['width'] * 1) + 75)) { $("body").append("<div id='JT' style='width:" + params['width'] * 1 + "px'><div id='JT_arrow_left'></div><div id='JT_close_left'>" + title + "</div><div id='JT_copy'><div class='JT_loader'><div></div></div>"); var arrowOffset = getElementWidth(linkId) + 11; var clickElementx = getAbsoluteLeft(linkId) + arrowOffset; } else { $("body").append("<div id='JT' style='width:" + params['width'] * 1 + "px'><div id='JT_arrow_right' style='left:" + ((params['width'] * 1) + 1) + "px'></div><div id='JT_close_right'>" + title + "</div><div id='JT_copy'><div class='JT_loader'><div></div></div>"); var clickElementx = getAbsoluteLeft(linkId) - ((params['width'] * 1) + 15); }
        $('#JT').css({ left: clickElementx + "px", top: clickElementy + "px" }); $('#JT').show(); $('#JT_copy').load(url);
    }
    function getElementWidth(objectId) { x = document.getElementById(objectId); return x.offsetWidth; }
    function getAbsoluteLeft(objectId) { var o = $(objectId); var posLeft = o.position().left; return posLeft; }
    function getAbsoluteTop(objectId) { var o = $(objectId); var posTop = o.position().top; return posTop; }
    function parseQuery(query) {
        var Params = new Object(); if (!query) return Params; var Pairs = query.split(/[;&]/); for (var i = 0; i < Pairs.length; i++) { var KeyVal = Pairs[i].split('='); if (!KeyVal || KeyVal.length != 2) continue; var key = unescape(KeyVal[0]); var val = unescape(KeyVal[1]); val = val.replace(/\+/g, ' '); Params[key] = val; }
        return Params;
    }
    function blockEvents(evt) {
        if (evt.target) { evt.preventDefault(); } else { evt.returnValue = false; }
    }
    (function($) {
        $.fn.ajaxSubmit = function(options) {
            if (!this.length) { log('ajaxSubmit: skipping submit process - no element selected'); return this; }
            if (typeof options == 'function')
                options = { success: options }; options = $.extend({ url: this.attr('action') || window.location.toString(), type: this.attr('method') || 'GET'
                }, options || {}); var veto = {}; this.trigger('form-pre-serialize', [this, options, veto]); if (veto.veto) { log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); return this; }
            var a = this.formToArray(options.semantic); if (options.data) {
                options.extraData = options.data; for (var n in options.data)
                    a.push({ name: n, value: options.data[n] });
            }
            if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { log('ajaxSubmit: submit aborted via beforeSubmit callback'); return this; }
            this.trigger('form-submit-validate', [a, this, options, veto]); if (veto.veto) { log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); return this; }
            var q = $.param(a); if (options.type.toUpperCase() == 'GET') { options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; options.data = null; }
            else
                options.data = q; var $form = this, callbacks = []; if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); if (!options.dataType && options.target) { var oldSuccess = options.success || function() { }; callbacks.push(function(data) { $(options.target).html(data).each(oldSuccess, arguments); }); }
            else if (options.success)
                callbacks.push(options.success); options.success = function(data, status) {
                    for (var i = 0, max = callbacks.length; i < max; i++)
                        callbacks[i](data, status, $form);
                }; var files = $('input:file', this).fieldValue(); var found = false; for (var j = 0; j < files.length; j++)
                if (files[j])
                found = true; if (options.iframe || found) {
                if ($.browser.safari && options.closeKeepAlive)
                    $.get(options.closeKeepAlive, fileUpload); else
                    fileUpload();
            }
            else
                $.ajax(options); this.trigger('form-submit-notify', [this, options]); return this; function fileUpload() {
                    var form = $form[0]; if ($(':input[@name=submit]', form).length) { alert('Error: Form elements must not be named "submit".'); return; }
                    var opts = $.extend({}, $.ajaxSettings, options); var id = 'jqFormIO' + (new Date().getTime()); var $io = $('<iframe id="' + id + '" name="' + id + '" />'); var io = $io[0]; if ($.browser.msie || $.browser.opera)
                        io.src = 'javascript:false;document.write("");'; $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' }); var xhr = { responseText: null, responseXML: null, status: 0, statusText: 'n/a', getAllResponseHeaders: function() { }, getResponseHeader: function() { }, setRequestHeader: function() { }
                        }; var g = opts.global; if (g && !$.active++) $.event.trigger("ajaxStart"); if (g) $.event.trigger("ajaxSend", [xhr, opts]); var cbInvoked = 0; var timedOut = 0; setTimeout(function() {
                            var t = $form.attr('target'), a = $form.attr('action'); $form.attr({ target: id, encoding: 'multipart/form-data', enctype: 'multipart/form-data', method: 'POST', action: opts.url
                            }); if (opts.timeout)
                                setTimeout(function() { timedOut = true; cb(); }, opts.timeout); var extraInputs = []; try {
                                if (options.extraData)
                                    for (var n in options.extraData)
                                    extraInputs.push($('<input type="hidden" name="' + n + '" value="' + options.extraData[n] + '" />')
.appendTo(form)[0]); $io.appendTo('body'); io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false); form.submit();
                            }
                            finally { $form.attr('action', a); t ? $form.attr('target', t) : $form.removeAttr('target'); $(extraInputs).remove(); }
                        }, 10); function cb() {
                            if (cbInvoked++) return; io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false); var operaHack = 0; var ok = true; try {
                                if (timedOut) throw 'timeout'; var data, doc; doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document; if (doc.body == null && !operaHack && $.browser.opera) { operaHack = 1; cbInvoked--; setTimeout(cb, 100); return; }
                                xhr.responseText = doc.body ? doc.body.innerHTML : null; xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc; xhr.getResponseHeader = function(header) { var headers = { 'content-type': opts.dataType }; return headers[header]; }; if (opts.dataType == 'json' || opts.dataType == 'script') { var ta = doc.getElementsByTagName('textarea')[0]; xhr.responseText = ta ? ta.value : xhr.responseText; }
                                else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) { xhr.responseXML = toXml(xhr.responseText); }
                                data = $.httpData(xhr, opts.dataType);
                            }
                            catch (e) { ok = false; $.handleError(opts, xhr, 'error', e); }
                            if (ok) { opts.success(data, 'success'); if (g) $.event.trigger("ajaxSuccess", [xhr, opts]); }
                            if (g) $.event.trigger("ajaxComplete", [xhr, opts]); if (g && ! --$.active) $.event.trigger("ajaxStop"); if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error'); setTimeout(function() { $io.remove(); xhr.responseXML = null; }, 100);
                        }; function toXml(s, doc) {
                            if (window.ActiveXObject) { doc = new ActiveXObject('Microsoft.XMLDOM'); doc.async = 'false'; doc.loadXML(s); }
                            else
                                doc = (new DOMParser()).parseFromString(s, 'text/xml'); return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
                        };
                };
        }; $.fn.ajaxForm = function(options) {
            return this.ajaxFormUnbind().bind('submit.form-plugin', function() { $(this).ajaxSubmit(options); return false; }).each(function() {
                $(":submit,input:image", this).bind('click.form-plugin', function(e) {
                    var $form = this.form; $form.clk = this; if (this.type == 'image') {
                        if (e.offsetX != undefined) { $form.clk_x = e.offsetX; $form.clk_y = e.offsetY; } else if (typeof $.fn.offset == 'function') { var offset = $(this).offset(); $form.clk_x = e.pageX - offset.left; $form.clk_y = e.pageY - offset.top; } else { $form.clk_x = e.pageX - this.offsetLeft; $form.clk_y = e.pageY - this.offsetTop; }
                    }
                    setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
                });
            });
        }; $.fn.ajaxFormUnbind = function() { this.unbind('submit.form-plugin'); return this.each(function() { $(":submit,input:image", this).unbind('click.form-plugin'); }); }; $.fn.formToArray = function(semantic) {
            var a = []; if (this.length == 0) return a; var form = this[0]; var els = semantic ? form.getElementsByTagName('*') : form.elements; if (!els) return a; for (var i = 0, max = els.length; i < max; i++) {
                var el = els[i]; var n = el.name; if (!n) continue; if (semantic && form.clk && el.type == "image") {
                    if (!el.disabled && form.clk == el)
                        a.push({ name: n + '.x', value: form.clk_x }, { name: n + '.y', value: form.clk_y }); continue;
                }
                var v = $.fieldValue(el, true); if (v && v.constructor == Array) {
                    for (var j = 0, jmax = v.length; j < jmax; j++)
                        a.push({ name: n, value: v[j] });
                }
                else if (v !== null && typeof v != 'undefined')
                    a.push({ name: n, value: v });
            }
            if (!semantic && form.clk) {
                var inputs = form.getElementsByTagName("input"); for (var i = 0, max = inputs.length; i < max; i++) {
                    var input = inputs[i]; var n = input.name; if (n && !input.disabled && input.type == "image" && form.clk == input)
                        a.push({ name: n + '.x', value: form.clk_x }, { name: n + '.y', value: form.clk_y });
                }
            }
            return a;
        }; $.fn.formSerialize = function(semantic) { return $.param(this.formToArray(semantic)); }; $.fn.fieldSerialize = function(successful) {
            var a = []; this.each(function() {
                var n = this.name; if (!n) return; var v = $.fieldValue(this, successful); if (v && v.constructor == Array) {
                    for (var i = 0, max = v.length; i < max; i++)
                        a.push({ name: n, value: v[i] });
                }
                else if (v !== null && typeof v != 'undefined')
                    a.push({ name: this.name, value: v });
            }); return $.param(a);
        }; $.fn.fieldValue = function(successful) {
            for (var val = [], i = 0, max = this.length; i < max; i++) {
                var el = this[i]; var v = $.fieldValue(el, successful); if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
                    continue; v.constructor == Array ? $.merge(val, v) : val.push(v);
            }
            return val;
        }; $.fieldValue = function(el, successful) {
            var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); if (typeof successful == 'undefined') successful = true; if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || (t == 'checkbox' || t == 'radio') && !el.checked || (t == 'submit' || t == 'image') && el.form && el.form.clk != el || tag == 'select' && el.selectedIndex == -1))
                return null; if (tag == 'select') {
                var index = el.selectedIndex; if (index < 0) return null; var a = [], ops = el.options; var one = (t == 'select-one'); var max = (one ? index + 1 : ops.length); for (var i = (one ? index : 0); i < max; i++) {
                    var op = ops[i]; if (op.selected) { var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value; if (one) return v; a.push(v); }
                }
                return a;
            }
            return el.value;
        }; $.fn.clearForm = function() { return this.each(function() { $('input,select,textarea', this).clearFields(); }); }; $.fn.clearFields = $.fn.clearInputs = function() {
            return this.each(function() {
                var t = this.type, tag = this.tagName.toLowerCase(); if (t == 'text' || t == 'password' || tag == 'textarea')
                    this.value = ''; else if (t == 'checkbox' || t == 'radio')
                    this.checked = false; else if (tag == 'select')
                    this.selectedIndex = -1;
            });
        }; $.fn.resetForm = function() {
            return this.each(function() {
                if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
                    this.reset();
            });
        }; $.fn.enable = function(b) {
            if (b == undefined) b = true; return this.each(function() {
                this.disabled = !b
            });
        }; $.fn.select = function(select) {
            if (select == undefined) select = true; return this.each(function() {
                var t = this.type; if (t == 'checkbox' || t == 'radio')
                    this.checked = select; else if (this.tagName.toLowerCase() == 'option') {
                    var $sel = $(this).parent('select'); if (select && $sel[0] && $sel[0].type == 'select-one') { $sel.find('option').select(false); }
                    this.selected = select;
                }
            });
        }; function log() {
            if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
                window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments, ''));
        };
    })(jQuery); (function($) {
        var map = new Array(); $.Watermark = { ShowAll: function() {
            for (var i = 0; i < map.length; i++) {
                if (map[i].obj.val() == "") { map[i].obj.val(map[i].text); map[i].obj.css("color", map[i].WatermarkColor); } else { map[i].obj.css("color", map[i].DefaultColor); }
            }
        }, HideAll: function() {
            for (var i = 0; i < map.length; i++) {
                if (map[i].obj.val() == map[i].text)
                    map[i].obj.val("");
            }
        }
        }
        $.fn.Watermark = function(text, color) {
            if (!color)
                color = "#aaa"; return this.each(function() {
                    var input = $(this); var defaultColor = input.css("color"); map[map.length] = { text: text, obj: input, DefaultColor: defaultColor, WatermarkColor: color }; function clearMessage() {
                        if (input.val() == text)
                            input.val(""); input.css("color", defaultColor);
                    }
                    function insertMessage() {
                        if (input.val().length == 0 || input.val() == text) { input.val(text); input.css("color", color); } else
                            input.css("color", defaultColor);
                    }
                    input.focus(clearMessage); input.blur(insertMessage); input.change(insertMessage); insertMessage();
                });
        };
    })(jQuery); function PopUpCal() {
        this._nextId = 0; this._inst = []; this._curInst = null; this._disabledInputs = []; this._popUpShowing = false; this._inDialog = false; this.regional = []; this.regional[''] = { clearText: 'Clear', closeText: 'Close', prevText: '&lt;Prev', nextText: 'Next&gt;', currentText: 'Today', dayNames: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], dateFormat: 'MDY/'
        }; this._defaults = { autoPopUp: 'focus', defaultDate: null, appendText: '', buttonText: '...', buttonImage: '', buttonImageOnly: false, closeAtTop: false, hideIfNoPrevNext: false, changeMonth: true, changeYear: true, monthYearMenu: true, yearRange: '-10:+10', firstDay: 0, showOtherMonths: true, minDate: null, maxDate: null, speed: 'fast', customDate: null, fieldSettings: null, onSelect: null, dateRange: false
        }; $.extend(this._defaults, this.regional['']); $(document).click(this._checkExternalClick);
    }
    $.extend(PopUpCal.prototype, { markerClassName: 'hasCalendar', _register: function(inst) { var id = this._nextId++; this._inst[id] = inst; this._calendarDiv = $('<div id="calendar_div_' + id + '" class="calendar_div"></div>'); return id; }, _getInst: function(id) { return this._inst[id] || id; }, setDefaults: function(settings) { extendRemove(this._defaults, settings || {}); }, _doKeyDown: function(e) {
        var inst = popUpCal._getInst(this._calId); if (popUpCal._popUpShowing) {
            switch (e.keyCode) { case 9: popUpCal.hideCalendar(inst, ''); break; case 13: popUpCal._selectDate(inst); break; case 27: popUpCal.hideCalendar(inst, inst._get('speed')); break; case 33: popUpCal._adjustDate(inst, -1, (e.ctrlKey ? 'Y' : 'M')); break; case 34: popUpCal._adjustDate(inst, +1, (e.ctrlKey ? 'Y' : 'M')); break; case 35: if (e.ctrlKey) popUpCal._clearDate(inst); break; case 36: if (e.ctrlKey) popUpCal._gotoToday(inst); break; case 37: if (e.ctrlKey) popUpCal._adjustDate(inst, -1, 'D'); break; case 38: if (e.ctrlKey) popUpCal._adjustDate(inst, -7, 'D'); break; case 39: if (e.ctrlKey) popUpCal._adjustDate(inst, +1, 'D'); break; case 40: if (e.ctrlKey) popUpCal._adjustDate(inst, +7, 'D'); break; }
        }
        else if (e.keyCode == 36 && e.ctrlKey) { popUpCal.showFor(this); }
    }, _doKeyPress: function(e) { var inst = popUpCal._getInst(this._calId); var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode); return (chr < ' ' || chr == inst._get('dateFormat').charAt(3) || (chr >= '0' && chr <= '9')); }, _connectCalendar: function(target, inst) {
        var input = $(target); input.addClass('calendarInput'); if (this._hasClass(input, this.markerClassName)) { return; }
        var appendText = inst._get('appendText'); if (appendText) { input.after('<span class="calendar_append">' + appendText + '</span>'); }
        input.after(inst._calendarDiv); var autoPopUp = inst._get('autoPopUp'); if (autoPopUp == 'focus' || autoPopUp == 'both') { input.focus(this.showFor); }
        if (autoPopUp == 'button' || autoPopUp == 'both') {
            var buttonText = inst._get('buttonText'); var buttonImage = inst._get('buttonImage'); var buttonImageOnly = inst._get('buttonImageOnly'); var trigger = $(buttonImageOnly ? '<img class="calendar_trigger" src="' + buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' :
'<button type="button" class="calendar_trigger">' + (buttonImage != '' ?
'<img src="' + buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' :
buttonText) + '</button>'); input.wrap('<span class="calendar_wrap"></span>').after(trigger); trigger.click(this.showFor);
        }
        input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress); input[0]._calId = inst._id;
    }, _inlineCalendar: function(target, inst) {
        var input = $(target); if (this._hasClass(input, this.markerClassName)) { return; }
        input.addClass(this.markerClassName).append(inst._calendarDiv); input[0]._calId = inst._id;
    }, _hasClass: function(element, className) { var classes = element.attr('class'); return (classes && classes.indexOf(className) > -1); }, dialogCalendar: function(dateText, onSelect, settings, pos) {
        var inst = this._dialogInst; if (!inst) { inst = this._dialogInst = new PopUpCalInstance({}, false); this._dialogInput = $('<input type="text" size="1" style="position: absolute; top: -100px;"/>'); this._dialogInput.keydown(this._doKeyDown); $('body').append(this._dialogInput); this._dialogInput[0]._calId = inst._id; }
        extendRemove(inst._settings, settings || {}); this._dialogInput.val(dateText); if (self.innerHeight) { windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; }
        this._pos = pos || [(windowWidth / 2) - 100, (windowHeight / 2) - 100]; this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px'); inst._settings.onSelect = onSelect; this._inDialog = true; this._calendarDiv.addClass('calendar_dialog'); this.showFor(this._dialogInput[0]); if ($.blockUI) { $.blockUI(this._calendarDiv); }
    }, enableFor: function(inputs) { inputs = (inputs.jquery ? inputs : $(inputs)); inputs.each(function() { this.disabled = false; $('../button.calendar_trigger', this).each(function() { this.disabled = false; }); $('../img.calendar_trigger', this).css({ opacity: '1.0', cursor: '' }); var $this = this; popUpCal._disabledInputs = $.map(popUpCal._disabledInputs, function(value) { return (value == $this ? null : value); }); }); }, disableFor: function(inputs) { inputs = (inputs.jquery ? inputs : $(inputs)); inputs.each(function() { this.disabled = true; $('../button.calendar_trigger', this).each(function() { this.disabled = true; }); $('../img.calendar_trigger', this).css({ opacity: '0.5', cursor: 'default' }); var $this = this; popUpCal._disabledInputs = $.map(popUpCal._disabledInputs, function(value) { return (value == $this ? null : value); }); popUpCal._disabledInputs[popUpCal._disabledInputs.length] = this; }); }, reconfigureFor: function(control, settings) {
        control = (typeof control == 'string' ? $(control)[0] : control); var inst = this._getInst(control._calId); if (inst) { extendRemove(inst._settings, settings || {}); this._updateCalendar(inst); }
    }, setDateFor: function(control, date) {
        var inst = this._getInst(control._calId); if (inst) { inst._setDate(date); }
    }, getDateFor: function(control) { var inst = this._getInst(control._calId); return (inst ? inst._getDate() : null); }, showFor: function(target) {
        var input = (target.nodeName && target.nodeName.toLowerCase() == 'input' ? target : this); if (input.nodeName.toLowerCase() != 'input') { input = $('input', input.parentNode)[0]; }
        if (popUpCal._lastInput == input) { return; }
        for (var i = 0; i < popUpCal._disabledInputs.length; i++) {
            if (popUpCal._disabledInputs[i] == input) { return; }
        }
        var inst = popUpCal._getInst(input._calId); var fieldSettings = inst._get('fieldSettings'); extendRemove(inst._settings, (fieldSettings ? fieldSettings(input) : {})); popUpCal.hideCalendar(inst, ''); popUpCal._lastInput = input; inst._setDateFromField(input); if (popUpCal._inDialog) { input.value = ''; }
        popUpCal._pos = null; popUpCal._showCalendar(inst);
    }, _showCalendar: function(id) {
        var inst = this._getInst(id); popUpCal._updateCalendar(inst); if (!inst._inline) {
            var speed = inst._get('speed'); inst._calendarDiv.show(speed, function() { popUpCal._popUpShowing = true; popUpCal._afterShow(inst); }); if (speed == '') { popUpCal._popUpShowing = true; popUpCal._afterShow(inst); }
            if (inst._input[0].type != 'hidden') { }
            this._curInst = inst;
        }
    }, _updateCalendar: function(inst, visibility) {
        inst._calendarDiv.html(inst._generateCalendar()); if (inst._input && inst._input[0].type != 'hidden' && visibility != 'hidden') { }
    }, _afterShow: function(inst) {
        if ($.browser.msie) {
            $('#calendar_cover').css({ width: inst._calendarDiv[0].offsetWidth + 4, height: inst._calendarDiv[0].offsetHeight + 4
            });
        }
        var calDiv = inst._calendarDiv[0]; var pos = popUpCal._findPos(inst._input[0]); if (typeof (window.innerWidth) == 'number') { browserWidth = window.innerWidth; } else { browserWidth = document.documentElement.clientWidth; }
        if (document.documentElement && (document.documentElement.scrollLeft)) { browserX = document.documentElement.scrollLeft; } else { browserX = document.body.scrollLeft; }
        if ((calDiv.offsetLeft + calDiv.offsetWidth) >
(browserWidth + browserX)) { inst._calendarDiv.css('left', (pos[0] + inst._input[0].offsetWidth - calDiv.offsetWidth) + 'px'); }
        if (typeof (window.innerHeight) == 'number') { browserHeight = window.innerHeight; } else { browserHeight = document.documentElement.clientHeight; }
        if (document.documentElement && (document.documentElement.scrollTop)) { browserTopY = document.documentElement.scrollTop; } else { browserTopY = document.body.scrollTop; }
        if ((calDiv.offsetTop + calDiv.offsetHeight) >
(browserTopY + browserHeight)) { inst._calendarDiv.css('top', (pos[1] - calDiv.offsetHeight) + 'px'); }
    }, hideCalendar: function(id, speed) {
        var inst = this._getInst(id); var dateRange = inst._get('dateRange'); if (dateRange == false) {
            var inst = this._getInst(id); if (popUpCal._popUpShowing) {
                speed = (speed != null ? speed : inst._get('speed')); inst._calendarDiv.hide(speed, function() { popUpCal._tidyDialog(inst); }); if (speed == '') { popUpCal._tidyDialog(inst); }
                popUpCal._popUpShowing = false; popUpCal._lastInput = null; inst._settings.prompt = null; if (popUpCal._inDialog) {
                    popUpCal._dialogInput.css('position', 'absolute').
css('left', '0px').css('top', '-100px'); if ($.blockUI) { $.unblockUI(); $('body').append(this._calendarDiv); }
                }
                popUpCal._inDialog = false;
            }
            popUpCal._curInst = null;
        }
    }, _tidyDialog: function(inst) { inst._calendarDiv.removeClass('calendar_dialog'); $('.calendar_prompt', inst._calendarDiv).remove(); }, _checkExternalClick: function(event) {
        if (!popUpCal._curInst) { return; }
        var target = $(event.target); if ((target.parents(".calendar_div").length == 0)
&& (target.attr('class') != 'calendar_trigger')
&& popUpCal._popUpShowing
&& !(popUpCal._inDialog && $.blockUI)) { popUpCal.hideCalendar(popUpCal._curInst, ''); }
    }, _adjustDate: function(id, offset, period) { var inst = this._getInst(id); inst._adjustDate(offset, period); this._updateCalendar(inst); }, _gotoToday: function(id) { var date = new Date(); var inst = this._getInst(id); inst._selectedDay = date.getDate(); inst._selectedMonth = date.getMonth(); inst._selectedYear = date.getFullYear(); this._adjustDate(inst); }, _selectMonthYear: function(id, select, period) {
        var inst = this._getInst(id); inst._selectingMonthYear = false; if (period == 'MY') { inst['_selectedMonth'] = select.id.split('_')[0] - 0; inst['_selectedYear'] = select.id.split('_')[1] - 0; }
        else inst[period == 'M' ? '_selectedMonth' : '_selectedYear'] = select.options[select.selectedIndex].value - 0; this._adjustDate(inst);
    }, _clickMonthYear: function(id) {
        var inst = this._getInst(id); if (inst._input && inst._selectingMonthYear && !$.browser.msie) { inst._input[0].focus(); }
        inst._selectingMonthYear = !inst._selectingMonthYear;
    }, _changeFirstDay: function(id, a) {
        var inst = this._getInst(id); var dayNames = inst._get('dayNames'); var value = a.firstChild.nodeValue; for (var i = 0; i < 7; i++) {
            if (dayNames[i] == value) { inst._settings.firstDay = i; break; }
        }
        this._updateCalendar(inst);
    }, _selectDay: function(id, td) { var inst = this._getInst(id); inst._selectedDay = $("a", td).html(); this._selectDate(id); }, _clearDate: function(id) { this._selectDate(id, ''); }, _selectDate: function(id, dateStr) {
        var inst = this._getInst(id); dateStr = (dateStr != null ? dateStr : inst._formatDate()); if (inst._input) { inst._input.val(dateStr); }
        var onSelect = inst._get('onSelect'); if (onSelect) { onSelect(dateStr, inst); }
        else { inst._input.trigger('change'); }
        if (inst._inline) { this._updateCalendar(inst); }
        else { this.hideCalendar(inst, inst._get('speed')); }
    }, noWeekends: function(date) { var day = date.getDay(); return [(day > 0 && day < 6), '']; }, _findPos: function(obj) {
        while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { obj = obj.nextSibling; }
        var curleft = curtop = 0; if (obj && obj.offsetParent) {
            curleft = obj.offsetLeft; curtop = obj.offsetTop; while (obj = obj.offsetParent) {
                var origcurleft = curleft; curleft += obj.offsetLeft; if (curleft < 0) { curleft = origcurleft; }
                curtop += obj.offsetTop;
            }
        }
        return [curleft, curtop];
    }
    }); function PopUpCalInstance(settings, inline) {
        this._id = popUpCal._register(this); this._selectedDay = 0; this._selectedMonth = 0; this._selectedYear = 0; this._input = null; this._inline = inline; this._calendarDiv = (!inline ? popUpCal._calendarDiv :
$('<div id="calendar_div_' + this._id + '" class="calendar_inline"></div>')); this._settings = extendRemove({}, settings || {}); if (inline) { this._setDate(this._getDefaultDate()); }
    }
    $.extend(PopUpCalInstance.prototype, { _get: function(name) { return (this._settings[name] != null ? this._settings[name] : popUpCal._defaults[name]); }, _setDateFromField: function(input) {
        this._input = $(input); var dateFormat = this._get('dateFormat'); var currentDate = this._input.val().split(dateFormat.charAt(3)); if (currentDate.length == 3) { this._currentDay = parseInt(currentDate[dateFormat.indexOf('D')], 10); this._currentMonth = parseInt(currentDate[dateFormat.indexOf('M')], 10) - 1; this._currentYear = parseInt(currentDate[dateFormat.indexOf('Y')], 10); }
        else { var date = this._getDefaultDate(); this._currentDay = date.getDate(); this._currentMonth = date.getMonth(); this._currentYear = date.getFullYear(); }
        this._selectedDay = this._currentDay; this._selectedMonth = this._currentMonth; this._selectedYear = this._currentYear; this._adjustDate();
    }, _getDefaultDate: function() {
        var offsetDate = function(offset) { var date = new Date(); date.setDate(date.getDate() + offset); return date; }; var defaultDate = this._get('defaultDate'); return (defaultDate == null ? new Date() :
(typeof defaultDate == 'number' ? offsetDate(defaultDate) : defaultDate));
    }, _setDate: function(date) { this._selectedDay = this._currentDay = date.getDate(); this._selectedMonth = this._currentMonth = date.getMonth(); this._selectedYear = this._currentYear = date.getFullYear(); this._adjustDate(); }, _getDate: function() { return new Date(this._currentYear, this._currentMonth, this._currentDay); }, _generateCalendar: function() {
        var today = new Date(); today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); var controls = '<div class="calendar_control">' + '<a class="calendar_clear" onclick="popUpCal._clearDate(' + this._id + ');">' + this._get('clearText') + '</a>' + '<a class="calendar_close" onclick="popUpCal.hideCalendar(' + this._id + ');">' + this._get('closeText') + '</a></div>'; var prompt = this._get('prompt'); var closeAtTop = this._get('closeAtTop'); var hideIfNoPrevNext = this._get('hideIfNoPrevNext'); var html = (prompt ? '<div class="calendar_prompt">' + prompt + '</div>' : '') + (closeAtTop && !this._inline ? controls : '') + '<div class="calendar_header">' + (this._canAdjustMonth(-1) ? '<a class="calendar_prev" ' + 'onclick="popUpCal._adjustDate(' + this._id + ', -1, \'M\');">' + this._get('prevText') + '</a>' :
(hideIfNoPrevNext ? '' : '<label class="calendar_prev">' + this._get('prevText') + '</label>')); var minDate = this._get('minDate'); var maxDate = this._get('maxDate'); var monthNames = this._get('monthNames'); if (!this._get('monthYearMenu')) {
            if (!this._get('changeMonth')) { html += monthNames[this._selectedMonth] + '&nbsp;'; }
            else {
                var inMinYear = (minDate && minDate.getFullYear() == this._selectedYear); var inMaxYear = (maxDate && maxDate.getFullYear() == this._selectedYear); html += '<select class="calendar_newMonth" ' + 'onchange="popUpCal._selectMonthYear(' + this._id + ', this, \'M\');" ' + 'onclick="popUpCal._clickMonthYear(' + this._id + ');">'; for (var month = 0; month < 12; month++) {
                    if ((!inMinYear || month >= minDate.getMonth()) &&
(!inMaxYear || month <= maxDate.getMonth())) { html += '<option value="' + month + '"' + (month == this._selectedMonth ? ' selected="selected"' : '') + '>' + monthNames[month] + '</option>'; }
                }
                html += '</select>';
            }
            if (!this._get('changeYear')) { html += this._selectedYear; }
            else {
                var years = this._get('yearRange').split(':'); var year = 0; var endYear = 0; if (years.length != 2) { year = this._selectedYear - 10; endYear = this._selectedYear + 10; }
                else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') { year = this._selectedYear + parseInt(years[0], 10); endYear = this._selectedYear + 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="calendar_newYear" onchange="popUpCal._selectMonthYear(' + this._id + ', this, \'Y\');" ' + 'onclick="popUpCal._clickMonthYear(' + this._id + ');">'; for (; year <= endYear; year++) { html += '<option value="' + year + '"' + (year == this._selectedYear ? ' selected="selected"' : '') + '>' + year + '</option>'; }
                html += '</select>';
            }
        }
        else {
            var years = this._get('yearRange').split(':'); var year = 0; var endYear = 0; if (years.length != 2) { year = this._selectedYear - 10; endYear = this._selectedYear + 10; }
            else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') { year = this._selectedYear + parseInt(years[0], 10); endYear = this._selectedYear + 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 += '<div class="monthYearContain" ><h2 onclick="$(this).parent().toggleClass(\'display\'); ' + '$(this).parent().find(\'li\').each(function(i){' + 'if($(this).is(\'#' + this._selectedMonth + '_' + this._selectedYear + '\')) {' + 'var scrollY = (i-4)*$(this).height(); this.parentNode.scrollTop = scrollY' + '} }); ">' + '<span>' + monthNames[this._selectedMonth] + ' ' + this._selectedYear + '</span></h2><div class="menu_contain"><div class="menu_pad"><ul class="calendar_monthYear" onclick="$(this).parent().parent().parent().removeClass(\'display\'); ">'; for (; year <= endYear; year++) {
                var inMinYear = (minDate && minDate.getFullYear() == this._selectedYear); var inMaxYear = (maxDate && maxDate.getFullYear() == this._selectedYear); for (var month = 0; month < 12; month++) {
                    if ((!inMinYear || month >= minDate.getMonth()) &&
(!inMaxYear || month <= maxDate.getMonth())) { html += '<li id="' + month + '_' + year + '"' + (month == this._selectedMonth && year == this._selectedYear ? ' class="selected"' : '') + 'onclick="if($(this).parent().parent().parent().parent().is(\'.display\')) {popUpCal._selectMonthYear(' + this._id + ', this, \'MY\'); popUpCal._clickMonthYear(' + this._id + ');} $(document).click(function(){$(\'calendar_monthYear\').removeClass(\'display\');}); return false;">' + monthNames[month] + ' ' + year + '</li>'; }
                }
            }
            html += '</ul></div></div></div>';
        }
        html += (this._canAdjustMonth(+1) ? '<a class="calendar_next" ' + 'onclick="popUpCal._adjustDate(' + this._id + ', +1, \'M\');">' + this._get('nextText') + '</a>' :
(hideIfNoPrevNext ? '' : '<label class="calendar_next">' + this._get('nextText') + '</label>')); html += '</div><table class="calendar" cellpadding="0" cellspacing="0"><thead>' + '<tr class="calendar_titleRow">'; var firstDay = this._get('firstDay'); var changeFirstDay = this._get('changeFirstDay'); var dayNames = this._get('dayNames'); for (var dow = 0; dow < 7; dow++) { html += '<td>' + (!changeFirstDay ? '' : '<a onclick="popUpCal._changeFirstDay(' + this._id + ', this);">') + dayNames[(dow + firstDay) % 7] + (changeFirstDay ? '</a>' : '') + '</td>'; }
        html += '</tr></thead><tbody>'; var daysInMonth = this._getDaysInMonth(this._selectedYear, this._selectedMonth); this._selectedDay = Math.min(this._selectedDay, daysInMonth); var leadDays = (this._getFirstDayOfMonth(this._selectedYear, this._selectedMonth) - firstDay + 7) % 7; var currentDate = new Date(this._currentYear, this._currentMonth, this._currentDay); var selectedDate = new Date(this._selectedYear, this._selectedMonth, this._selectedDay); var printDate = new Date(this._selectedYear, this._selectedMonth, 1 - leadDays); var numRows = Math.ceil((leadDays + daysInMonth) / 7); var customDate = this._get('customDate'); var showOtherMonths = this._get('showOtherMonths'); for (var row = 0; row < numRows; row++) {
            html += '<tr class="calendar_daysRow">'; for (var dow = 0; dow < 7; dow++) {
                var customSettings = (customDate ? customDate(printDate) : [true, '']); var otherMonth = (printDate.getMonth() != this._selectedMonth); var unselectable = otherMonth || !customSettings[0] || (minDate && printDate < minDate) || (maxDate && printDate > maxDate); html += '<td class="calendar_daysCell' + ((dow + firstDay + 6) % 7 >= 5 ? ' calendar_weekEndCell' : '') + (otherMonth ? ' calendar_otherMonth' : '') + (printDate.getTime() == selectedDate.getTime() ? ' ' : '') + (unselectable ? ' calendar_unselectable' : '') + (otherMonth && !showOtherMonths ? '' : ' ' + customSettings[1] + (printDate.getTime() == currentDate.getTime() ? ' calendar_currentDay' :
(printDate.getTime() == today.getTime() ? ' calendar_today currentSelection' : ''))) + '"' + (unselectable ? '' : ' onmouseover="$(this).addClass(\'calendar_daysCellOver\');"' + ' onmouseout="$(this).removeClass(\'calendar_daysCellOver\');"' + ' onclick="popUpCal._selectDay(' + this._id + ', this); $(this).parents(\'table:eq(0)\').find(\'.currentSelection\').removeClass(\'currentSelection\');$(this).addClass(\'currentSelection\');"') + '>' + (otherMonth ? (showOtherMonths ? printDate.getDate() : '&nbsp;') :
(unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; printDate.setDate(printDate.getDate() + 1);
            }
            html += '</tr>';
        }
        html += '</tbody></table>' + (!closeAtTop && !this._inline ? controls : '') + '<div style="clear: both;"></div>' + (!$.browser.msie ? '' :
'<!--[if lte IE 6.5]><iframe src="javascript:false;" class="calendar_cover"></iframe><![endif]-->'); return html;
    }, _adjustDate: function(offset, period) { var date = new Date(this._selectedYear + (period == 'Y' ? offset : 0), this._selectedMonth + (period == 'M' ? offset : 0), this._selectedDay + (period == 'D' ? offset : 0)); var minDate = this._get('minDate'); var maxDate = this._get('maxDate'); date = (minDate && date < minDate ? minDate : date); date = (maxDate && date > maxDate ? maxDate : date); this._selectedDay = date.getDate(); this._selectedMonth = date.getMonth(); this._selectedYear = date.getFullYear(); }, _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(offset) {
        var date = new Date(this._selectedYear, this._selectedMonth + offset, 1); if (offset < 0) { date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); }
        return this._isInRange(date);
    }, _isInRange: function(date) { var minDate = this._get('minDate'); var maxDate = this._get('maxDate'); return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)); }, _formatDate: function() {
        var day = this._currentDay = this._selectedDay; var month = this._currentMonth = this._selectedMonth; var year = this._currentYear = this._selectedYear; month++; var dateFormat = this._get('dateFormat'); var dateString = ''; for (var i = 0; i < 3; i++) {
            dateString += dateFormat.charAt(3) + (dateFormat.charAt(i) == 'D' ? (day < 10 ? '0' : '') + day :
(dateFormat.charAt(i) == 'M' ? (month < 10 ? '0' : '') + month :
(dateFormat.charAt(i) == 'Y' ? year : '?')));
        }
        return dateString.substring(dateFormat.charAt(3) ? 1 : 0);
    }
    }); function extendRemove(target, props) {
        $.extend(target, props); for (var name in props) {
            if (props[name] == null) { target[name] = null; }
        }
        return target;
    }
    $.fn.calendar = function(settings) {
        return this.each(function() {
            var inlineSettings = null; for (attrName in popUpCal._defaults) {
                var attrValue = this.getAttribute('cal:' + attrName); if (attrValue) {
                    inlineSettings = inlineSettings || {}; try { inlineSettings[attrName] = eval(attrValue); }
                    catch (err) { inlineSettings[attrName] = attrValue; }
                }
            }
            var nodeName = this.nodeName.toLowerCase(); if (nodeName == 'input') {
                var instSettings = (inlineSettings ? $.extend($.extend({}, settings || {}), inlineSettings || {}) : settings); var inst = (inst && !inlineSettings ? inst :
new PopUpCalInstance(instSettings, false)); popUpCal._connectCalendar(this, inst);
            }
            else if (nodeName == 'div' || nodeName == 'span') { var instSettings = $.extend($.extend({}, settings || {}), inlineSettings || {}); var inst = new PopUpCalInstance(instSettings, true); popUpCal._inlineCalendar(this, inst); }
        });
    }; $(document).ready(function() { popUpCal = new PopUpCal(); var earliest = new Date(2004, 10, 10); var latest = new Date(2014, 10, 10); }); $.fn.dateRangePicker = function(options) {
        var rangeElement = $(this).find('a.rangeDisplay'); var presetMenu = { pastRange: '<div class="dateRange_contain dateRange_wide"><div class="dateRange"><ul class="dateRange_presets">' + '<li class="dateRange_last30"><a href="javascript://">Past 30 Days</a></li>' + '<li class="dateRange_lastYear"><a href="javascript://">Past 12 Months</a></li>' + '<li class="dateRange_yearToDate"><a href="javascript://">Current YTD</a></li>' + '<li class="dateRange_allDates"><a href="javascript://">All Dates</a></li>' + '<li class="dateRange_allBefore"><a href="javascript://">All Dates Before...</a></li>' + '<li class="dateRange_allAfter"><a href="javascript://">All Dates After...</a></li>' + '<li class="dateRange_specificDate"><a href="javascript://">Specific Date...</a></li>' + '<li class="dateRange_dateRange"><a href="javascript://">Date Range...</a></li>' + '</ul>' + '<a href="javascript://" class="dateRange_close">Done</a>' + '<h2 class="selectDate" style="display: none;"></h2>' + '<input type="text" name="range1" id="range1" class="range1" />' + '<input type="text" name="range2" id="range2" class="range2" /></div></div>', futureRange: '<div class="dateRange_contain dateRange_wide"><div class="dateRange"><ul class="dateRange_presets">' + '<li class="dateRange_today"><a href="javascript://">Today</a></li>' + '<li class="dateRange_tomorrow"><a href="javascript://">Tomorrow</a></li>' + '<li class="dateRange_next7"><a href="javascript://">Next 7 Days</a></li>' + '<li class="dateRange_next30"><a href="javascript://">Next 30 Days</a></li>' + '<li class="dateRange_nextYear"><a href="javascript://">Next Year</a></li>' + '<li class="dateRange_allDates"><a href="javascript://">All Dates</a></li>' + '<li class="dateRange_specificDate"><a href="javascript://">Specific Date...</a></li>' + '<li class="dateRange_allBefore"><a href="javascript://">All Dates Before...</a></li>' + '<li class="dateRange_allAfter"><a href="javascript://">All Dates After...</a></li>' + '<li class="dateRange_dateRange"><a href="javascript://">Date Range...</a></li>' + '</ul>' + '<a href="javascript://" class="dateRange_close">Done</a>' + '<h2 class="selectDate" style="display: none;"></h2>' + '<input type="text" name="range1" id="range1" class="range1" />' + '<input type="text" name="range2" id="range2" class="range2" /></div></div>', singleUpcoming: '<div class="dateRange_contain"><div class="dateRange"><ul class="dateRange_presets">' + '<li class="dateRange_today"><a href="javascript://">Today</a></li>' + '<li class="dateRange_tomorrow"><a href="javascript://">Tomorrow</a></li>' + '<li class="dateRange_beginningOfWeek"><a href="javascript://">Start of Week</a></li>' + '<li class="dateRange_endOfWeek"><a href="javascript://">End of Week</a></li>' + '<li class="dateRange_specificDate"><a href="javascript://">Specific Date...</a></li>' + '</ul>' + '<a href="javascript://" class="dateRange_close">Done</a>' + '<h2 class="selectDate" style="display: none;"></h2>' + '<input type="text" name="range1" id="range1" class="range1" />' + '<input type="text" name="range2" id="range2" class="range2" /></div></div>'
        }; if (typeof options.menuSet == 'undefined' || options.menuSet == 'pastRange') { var presetMenu = rangeElement.after(presetMenu.pastRange); }
        else if (options.menuSet == 'futureRange') { rangeElement.after(presetMenu.futureRange); }
        else if (options.menuSet == 'singleUpcoming') { rangeElement.after(presetMenu.singleUpcoming); }
        var startHeight = 195; var startWidth = 198; var expandedHeight = 242; if (startHeight > expandedHeight) { expandedHeight = startHeight; }
        var width_onePicker_px = startWidth + 215; var width_twoPickers_px = startWidth + 407; startheight = startHeight / 10 + 'em'; expandedHeight = expandedHeight / 10 + 'em'; startWidth = startWidth / 10 + 'em'; width_onePicker = width_onePicker_px / 10 + 'em'; width_twoPickers = width_twoPickers_px / 10 + 'em'; var rangeType; if (rangeElement.is('input')) rangeType = 'input'; else rangeType = 'text'; var parentDiv = rangeElement.next(); var range1 = parentDiv.find('[name=range1]'); var range2 = parentDiv.find('[name=range2]'); range1.calendar({ dateRange: true }).focus().css({ 'position': 'absolute', 'left': '-999999px', 'top': '4.2em' }); range2.calendar({ dateRange: true }).focus().css({ 'position': 'absolute', 'left': '-999999px', 'top': '4.2em' }); setTimeout(function() { parentDiv.children(0).hide(); }, 100); var picker1 = parentDiv.find('.calendar_div:eq(0)'); var picker2 = parentDiv.find('.calendar_div:eq(1)').addClass('position2'); hidePickers(); function hidePickers(intvl) { if (!intvl) intvl = 0; picker1.fadeOut(intvl); picker2.fadeOut(intvl); parentDiv.find('h2.selectDate, a.dateRange_close').fadeOut(intvl); }
        $('body, .dateRange_close').click(function() { $('.dateRange_contain').children(0).hide(200); rangeElement.removeClass('rangeDisplay_on'); }); rangeElement.click(function() {
            if ($(this).next().children(0).is(':visible')) { $(this).removeClass('rangeDisplay_on'); }
            else {
                var offset = $(this).offset(); var winWidth = $(window).width(); var rightSpace = winWidth - offset.left; if (rightSpace < width_twoPickers_px) { parentDiv.find('div:eq(0)').css({ 'left': 'auto', 'right': 0, 'top': 0 }); }
                else { parentDiv.find('div:eq(0)').css({ 'left': 0, 'right': 'auto', 'top': 0 }); }
                $(this).addClass('rangeDisplay_on');
            }
            $(this).next().children(0).slideToggle(200); return false;
        }); rangeElement.one("click", function() { picker1.hide(); picker2.hide(); parentDiv.find('h2.selectDate, a.dateRange_close').hide(); }); $('.dateRange_contain').click(function() { return false; }); var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; function setRangeVal() {
            setTimeout(function() {
                var val1 = range1.val(); var val2 = range2.val(); var str = ''; if (val1 != '') {
                    var splitter = ' to '
                    if (val1 == 'All Dates After' || val1 == 'All Dates Before' || val1 == 'All Dates' || val1 == 'End of Week' || val1 == 'End of Month' || val1 == 'Start of Week' || val1 == 'Start of Month' || val1 == '') splitter = ' '; else { val1 = val1.split('/'); val1 = monthNames[val1[0] - 1] + ' ' + val1[1] + ', ' + val1[2]; }
                    if (val2) { val2 = val2.split('/'); val2 = monthNames[val2[0] - 1] + ' ' + val2[1] + ', ' + val2[2]; }
                    if (val1 && val2 && val1 != val2) str = val1 + splitter + val2; else str = val1;
                }
                if (rangeType == 'input') rangeElement.val(str); else rangeElement.find('span').text(str); setRangeVal();
            }, 300);
        }
        setRangeVal(); if (rangeElement.is('input')) rangeElement.addClass('calendarInput'); var btns_prevnext = $(this).find('.range_prev:eq(0), .range_next:eq(0)'); $(btns_prevnext).click(function() {
            if (range1.val() == 'All Dates After' || range1.val() == 'All Dates Before' || range1.val() == 'All Dates') { return false; }
            function returnDate(val) {
                var dateFormat = 'MDY/'; var currentDate = val.split(dateFormat.charAt(3)); if (currentDate.length == 3) { var currentDay = parseInt(currentDate[dateFormat.indexOf('D')], 10); var currentMonth = parseInt(currentDate[dateFormat.indexOf('M')], 10) - 1; var currentYear = parseInt(currentDate[dateFormat.indexOf('Y')], 10); }
                return new Date(currentYear, currentMonth, currentDay);
            }
            var one_day = 1000 * 60 * 60 * 24
            var val1 = returnDate(range1.val()); var val2 = returnDate(range2.val()); var difference = Math.abs(Math.ceil((val1.getTime() - val2.getTime()))); if (difference == 0) difference = one_day; if ($(this).is('.range_prev')) { difference *= -1; }
            var inst1 = popUpCal._inst[$(this).parent().find('.calendar_div:eq(0)').attr('id').split('_')[2]]; var inst2 = popUpCal._inst[$(this).parent().find('.calendar_div:eq(1)').attr('id').split('_')[2]]; var currDate1 = inst1._getDate().getTime(); var newDate1 = new Date(); newDate1.setTime(currDate1 + one_day); popUpCal._updateCalendar(inst1, 'hidden'); inst1._setDate(newDate1); popUpCal._updateCalendar(inst1, 'hidden'); if (options.menuSet != 'singleUpcoming') { var currDate2 = inst2._getDate().getTime(); var newDate2 = new Date(); newDate2.setTime(currDate2 + difference); popUpCal._updateCalendar(inst2, 'hidden'); inst2._setDate(newDate2); popUpCal._updateCalendar(inst2, 'hidden'); $(this).parent().find('.calendar_currentDay:eq(1)').trigger("click"); }
            $(this).parent().find('.calendar_currentDay:eq(0)').trigger("click"); return false;
        }); var dates = { minDate: function() { var date = new Date(); return date.getMonth() + 1 + '/' + date.getDate() + '/' + (date.getFullYear() - 10); }, today: function() { var date = new Date(); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, yesterday: function() { var date = new Date(); date.setDate(date.getDate() - 1); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, tomorrow: function() { var date = new Date(); date.setDate(date.getDate() + 1); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, weekAgo: function() { var date = new Date(); date.setDate(date.getDate() - 7); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, nextWeek: function() { var date = new Date(); date.setDate(date.getDate() + 7); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, startOfWeek: function() { var date = new Date(); var day = date.getDay(); date.setDate(date.getDate() - day); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, endOfWeek: function() { var date = new Date(); var day = date.getDay(); var offset = 6 - day; date.setDate(date.getDate() + offset); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, monthAgo: function() { var date = new Date(); date.setDate(date.getDate() - 30); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, nextMonth: function() { var date = new Date(); date.setDate(date.getDate() + 30); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, startOfMonth: function() { var date = new Date(); date.setMonth(date.getMonth() + 1); date.setDate(1); date.setDate(date.getDate() - 1); date.setMonth(date.setMonth() - 1); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, endOfMonth: function() { var date = new Date(); date.setDate(date.getDate() + 30); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, yearAgo: function() { var date = new Date(); date.setDate(date.getDate() - 365); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }, ytdStart: function() { var date = new Date(); return '1/1/' + (date.getFullYear()); }, nextYear: function() { var date = new Date(); date.setDate(date.getDate() + 365); return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); }
        }
        range1.val(dates.today()); range2.val(dates.today()); var currTimeout = ''; $.fn.smallMenu = function() { $(this).parents('.dateRange:eq(0)').animate({ width: startWidth }, 500, "swing"); $(this).parents('.dateRange:eq(0)').find('ul:eq(0)').animate({ height: startHeight }, 500, "swing"); $(this).parents('.dateRange:eq(0)').slideUp(200); rangeElement.removeClass('rangeDisplay_on'); currTimeout = setTimeout(function() { hidePickers(200); }, 500); }
        $.fn.showPickers = function(showPicker, pickerMsg) {
            clearTimeout(currTimeout); picker1.css('top', '4.2em'); picker2.css('top', '4.2em'); rangeElement.addClass('rangeDisplay_on'); $(this).addClass('dateRange_on'); $(this).parents('.dateRange:eq(0)').find('ul:eq(0)').animate({ height: expandedHeight }, 500, "swing"); if (showPicker == 'picker1' || showPicker == 'picker2') { $(this).parents('.dateRange:eq(0)').animate({ width: width_onePicker }, 500, "swing", function() { $(this).find('h2.selectDate').html(pickerMsg).fadeIn(100); $(this).find('a.dateRange_close').fadeIn(100); }); if (showPicker == 'picker1') picker1.css('top', '4.2em').fadeIn(100); else picker2.removeClass('position2').fadeIn(100); }
            else { $(this).parents('.dateRange:eq(0)').animate({ width: width_twoPickers }, 500, "swing", function() { $(this).find('h2.selectDate').html(pickerMsg).fadeIn(100); $(this).find('a.dateRange_close').fadeIn(100); picker1.fadeIn(100); picker2.addClass('position2').fadeIn(100); }); }
        }
        parentDiv.find('li').click(function() {
            $('.dateRange_on').removeClass('dateRange_on'); hidePickers(200); if ($(this).is('.dateRange_today')) { $(this).smallMenu(); range1.val(dates.today()); range2.val(dates.today()); }
            if ($(this).is('.dateRange_yesterday')) { $(this).smallMenu(); range1.val(dates.yesterday()); range2.val(dates.yesterday()); }
            if ($(this).is('.dateRange_tomorrow')) { $(this).smallMenu(); range1.val(dates.tomorrow()); range2.val(dates.tomorrow()); }
            if ($(this).is('.dateRange_beginningOfWeek')) { $(this).smallMenu(); range1.val(dates.startOfWeek()); range2.val(''); }
            if ($(this).is('.dateRange_endOfWeek')) { $(this).smallMenu(); range1.val(dates.endOfWeek()); range2.val(''); }
            if ($(this).is('.dateRange_beginningOfMonth')) { $(this).smallMenu(); range1.val(dates.endOfMonth()); range2.val(''); }
            if ($(this).is('.dateRange_endOfMonth')) { $(this).smallMenu(); range1.val(dates.startOfMonth()); range2.val(''); }
            if ($(this).is('.dateRange_last7')) { $(this).smallMenu(); range1.val(dates.weekAgo()); range2.val(dates.today()); }
            if ($(this).is('.dateRange_next7')) { $(this).smallMenu(); range1.val(dates.today()); range2.val(dates.nextWeek()); }
            if ($(this).is('.dateRange_last30')) { $(this).smallMenu(); range1.val(dates.monthAgo()); range2.val(dates.today()); }
            if ($(this).is('.dateRange_next30')) { $(this).smallMenu(); range1.val(dates.today()); range2.val(dates.nextMonth()); }
            if ($(this).is('.dateRange_lastYear')) { $(this).smallMenu(); range1.val(dates.yearAgo()); range2.val(dates.today()); }
            if ($(this).is('.dateRange_nextYear')) { $(this).smallMenu(); range1.val(dates.today()); range2.val(dates.nextYear()); }
            if ($(this).is('.dateRange_allDates')) { $(this).smallMenu(); range1.val(dates.minDate()); range2.val(dates.today()); }
            if ($(this).is('.dateRange_yearToDate')) { $(this).smallMenu(); range1.val(dates.ytdStart()); range2.val(dates.today()); }
            if ($(this).is('.dateRange_specificDate')) { range2.val(''); $(this).showPickers('picker1', 'Select a Date:'); }
            if ($(this).is('.dateRange_allBefore')) { range1.val('All Dates Before'); $(this).showPickers('picker2', 'All Dates Before:'); }
            if ($(this).is('.dateRange_allAfter')) { range1.val('All Dates After'); $(this).showPickers('picker2', 'All Dates After:'); }
            if ($(this).is('.dateRange_dateRange')) { $(this).showPickers('both', 'Select a Date Range:'); }
        }); $('.dateRange_last30').trigger('click'); if (parent) parent.scrollTo(0, 0); return $(this);
    }
    $(function() { $('a.postback').click(function() { var self = $(this); var form = self.parents('form'); var field = $('<input type="hidden" name="' + self.attr('fieldname') + '" value="' + self.attr('fieldvalue') + '" />'); form.append(field); form.submit(); return false; }); }); $(function() { $('select.postback').change(function() { var name = $(this).attr('name'); var selected = $(this).selectedValues()[0]; var select = $('select[name=' + name).selectOptions(selected); var form = $(this).parents('form'); form.submit(); }); }); $(function() { $('img.post').click(function() { var form = $(this).parents('form'); form.submit(); }).css('cursor', 'pointer'); }); function enhancedDomReady(func) {
        function bodyReady() {
            if (document.body) {
                clearInterval(checkBody); if (testUserDevice()) {
                    enhanceDocument(); if (jQuery) { $(function() { func(); }); }
                    else indepDomReady(function() { func(); });
                }
            }
        }
        var checkBody = setInterval(bodyReady, 10);
    }
    function enhanceDocument() {
        if (!/\benhanced\b/.exec(document.body.className)) { document.body.className += ' enhanced'; }
        var allLinks = document.getElementsByTagName('link'); for (i = 0; i < allLinks.length; i++) {
            if (/\bbasicNoCascade\b/.exec(allLinks[i].className)) { allLinks[i].disabled = true; }
            if (/\benhanced\b/.exec(allLinks[i].className)) { allLinks[i].disabled = true; allLinks[i].disabled = false; }
        }
    }
    var testUserDevice = function() {
        if (readCookie('enhanced')) { enhanceDocument(); return true; }
        if (document.getElementById && document.createElement) {
            var newDiv = document.createElement('div'); document.body.appendChild(newDiv); newDiv.style.visibility = 'hidden'; newDiv.style.width = '20px'; newDiv.style.padding = '10px'; var divWidth = newDiv.offsetWidth; if (divWidth != 40) { document.body.removeChild(newDiv); return false; }
            newDiv.style.position = 'absolute'; newDiv.style.left = '10px'; var leftVal = newDiv.offsetLeft; if (leftVal != 10) { document.body.removeChild(newDiv); return false; }
            var newInnerDiv = document.createElement('div'); newInnerDiv.style.width = '5px'; newInnerDiv.style.cssFloat = 'left'; newInnerDiv.style.styleFloat = 'left'; newDiv.appendChild(newInnerDiv); var secondInnerDiv = newInnerDiv.cloneNode(true); newDiv.appendChild(secondInnerDiv); var newInnerDivTop = newInnerDiv.offsetTop; var secondInnerDivTop = secondInnerDiv.offsetTop; if (newInnerDivTop != secondInnerDivTop) { document.body.removeChild(newDiv); return false; }
            newDiv.innerHTML = '<ul><li style="width: 5px; float: left;">test</li><li style="width: 5px; float: left;clear: left;">test</li></ul>'; var top1 = newDiv.getElementsByTagName('li')[0].offsetTop; var top2 = newDiv.getElementsByTagName('li')[1].offsetTop; if (top1 == top2) { return false; }
            newDiv.innerHTML = '<div style="height: 20px;"></div>'; newDiv.style.padding = '0'; newDiv.style.height = '10px'; newDiv.style.overflow = 'auto'; var newDivHeight = newDiv.offsetHeight; if (newDivHeight != 10) { document.body.removeChild(newDiv); return false; }
            newDiv.innerHTML = '<div style="line-height: 2; font-size: 10px;">Te<br />st</div>'; newDiv.style.padding = '0'; newDiv.style.height = 'auto'; newDiv.style.overflow = ''; var newDivHeight = newDiv.offsetHeight; if (newDivHeight > 40) { document.body.removeChild(newDiv); return false; }
            if (window.onresize == false) { document.body.removeChild(newDiv); return false; }
            if (!window.print) { document.body.removeChild(newDiv); return false; }
            if (window.clientInformation && window.opera) { document.body.removeChild(newDiv); return false; }
            document.body.removeChild(newDiv); enhanceDocument(); createCookie('enhanced', 'true'); return true;
        }
        else { return false; }
    }
    function indepDomReady(func) {
        if (!window.__load_events) {
            var init = function() {
                if (arguments.callee.done) return; arguments.callee.done = true; if (window.__load_timer) { clearInterval(window.__load_timer); window.__load_timer = null; }
                for (var i = 0; i < window.__load_events.length; i++) { window.__load_events[i](); }
                window.__load_events = null;
            }; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", init, false); }
            if (/WebKit/i.test(navigator.userAgent)) {
                window.__load_timer = setInterval(function() {
                    if (/loaded|complete/.test(document.readyState)) { init(); }
                }, 10);
            }
            window.onload = init; window.__load_events = [];
        }
        window.__load_events.push(func);
    }
    function createCookie(name, value, days) {
        if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); }
        else var expires = ""; document.cookie = name + "=" + value + expires + "; path=/";
    }
    function readCookie(name) {
        var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); }
        return null;
    }
    var eMailInUse = false; var userNameInUse = false; var invalidEmail = false; function validateMembership() {
        var errors = new Array(); if ($('#firstName').val().length == 0)
            errors.push('Adınızı belirtmelisiniz.'); if ($('#lastName').val().length == 0)
            errors.push('Soyadınızı belirtmelisiniz.'); if ($('#eMail').val().length == 0)
            errors.push('Geçerli bir e-posta adresi seçmelisiniz.'); if (!validateGmail($('#eMail').val()))
            errors.push("E-posta adresiniz 3 karakterden kısa olamaz ve sadece harf ve rakamlardan oluşabilir."); if ($('.registration #userName').val().length == 0)
            errors.push('Takma ad belirlemelisiniz.'); if (!validateGmail($('.registration #userName').val()))
            errors.push("Takma adınız sadece harflerden oluşabilir ve en fazla 10 karakter olabilir."); if (!$('input[@name=avatar]:checked').val() && $("#avatarFile").val().length == 0)
            errors.push('Listeden bir avatar seçin ya da kendi avatarınızı belirleyin.'); if (eMailInUse) { errors.push('Seçmiş olduğunuz e-posta adresi kullanımda..'); }
        if (userNameInUse) { errors.push('Seçmiş olduğunuz takma ad kullanımda..'); }
        if (invalidEmail) { errors.push('E-posta adresiniz en az 3 karakter olmalı ve T&rkçe karakter içermemeli.'); }
        if (errors.length > 0) {
            var $errorList = $('#uyelik .error-list .errors ul'); $errorList.children().remove(); for (var i = 0; i < errors.length; i++) { $errorList.append($.format('<li>{0}</li>', errors[i])); }
            $('#uyelik .error-list').slideDown(); return false;
        }
        else { $('#uyelik .error-list').hide(); return true; }
    }
    function validateSecurity() {
        var errors = new Array(); if ($('#password1').val().length == 0)
            errors.push('Bir parola belirlemelisiniz.'); if ($('#password2').val().length == 0)
            errors.push('Parolanızı ikinci kutuya tekrar girmelisiniz.'); else {
            if ($('#password2').val() != $('#password1').val())
                errors.push('Belirttiğiniz parolalar birbirinden farklı.');
        }
        if ($('#password2').val().length < 6)
            errors.push("Parolanız en az 6 karakter uzunluğunda olmalıdır."); if ($('#answer').val().length == 0)
            errors.push('G&venlik sorusuzun yanıtını belirleyin.'); if (($('#alternateMail').val().length == 0) || (!validateMail($('#alternateMail').val())))
            errors.push('Alternatif bir e-posta adresi belirtin.'); if ($('#captcha').val().length == 0)
            errors.push('G&venlik kodu belirtmelisiniz.'); if (errors.length > 0) {
            var $errorList = $('#guvenlik .error-list .errors ul'); $errorList.children().remove(); for (var i = 0; i < errors.length; i++) { $errorList.append($.format('<li>{0}</li>', errors[i])); }
            $('#guvenlik .error-list').slideDown(); return false;
        }
        else { $('#guvenlik .error-list').hide(); return true; }
    }
    function validatePersonalInfo() {
        var errors = new Array(); if (!$('input[@name=gender]:checked').val())
            errors.push('Cinsiyetinizi belirtin.'); var birthDate = $('#day').selectedValues()[0] + '/' + $('#month').selectedValues()[0] + '/' + $('#year').selectedValues()[0]; if (!validateDate(birthDate))
            errors.push('Doğum tarihi geçersiz.'); if ($('#approved:checked').length == 0) { errors.push("Kullanım şartlarını kabul etmelisiniz."); }
        if (errors.length > 0) {
            var $errorList = $('#kisisel .error-list .errors ul'); $errorList.children().remove(); for (var i = 0; i < errors.length; i++) { $errorList.append($.format('<li>{0}</li>', errors[i])); }
            $('#kisisel .error-list').slideDown(); return false;
        }
        else { $('#kisisel .error-list').hide(); return true; }
    }
    function validateGmail(value) { return /[A-Za-z0-9\.\-_]{3,10}/.test(value); }
    function validateMail(value) { var pattern = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return (pattern.test(value)); }
    function validateDate(value) {
        var RegExPattern = /^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$/; if ((value.match(RegExPattern)) && (value != '')) { return true; } else { return false; }
    }
    function showErrors(container, errors) {
        var $errorDiv = $('<div class="error-list">' + '	<h1>L&tfen aşağıdaki hataları d&zeltin:</h1>' + '	<div class="errors">' + '		<ul></ul>' + '	</div>' + '</div>'); var $errorList = $('.errors ul', $errorDiv); $errorList.children().remove(); for (var i = 0; i < errors.length; i++) { $errorList.append($.format('<li>{0}</li>', errors[i])); }
        $(container).append($errorDiv);
    }
    (function($) {
        $.fn.caret = function(begin, end) {
            if (this.length == 0) return; if (typeof begin == 'number') {
                end = (typeof end == 'number') ? end : begin; return this.each(function() {
                    if (this.setSelectionRange) { this.focus(); this.setSelectionRange(begin, end); } else if (this.createTextRange) { var range = this.createTextRange(); range.collapse(true); range.moveEnd('character', end); range.moveStart('character', begin); range.select(); }
                });
            } else {
                if (this[0].setSelectionRange) { begin = this[0].selectionStart; end = this[0].selectionEnd; } else if (document.selection && document.selection.createRange) { var range = document.selection.createRange(); begin = 0 - range.duplicate().moveStart('character', -100000); end = begin + range.text.length; }
                return { begin: begin, end: end };
            }
        }; var charMap = { '9': "[0-9]", 'a': "[A-Za-z]", '*': "[A-Za-z0-9]"
        }; $.mask = { addPlaceholder: function(c, r) { charMap[c] = r; }
        }; $.fn.unmask = function() { return this.trigger("unmask"); }; $.fn.mask = function(mask, settings) {
            settings = $.extend({ placeholder: "_", completed: null
            }, settings); var re = new RegExp("^" + $.map(mask.split(""), function(c, i) { return charMap[c] || ((/[A-Za-z0-9]/.test(c) ? "" : "\\") + c); }).join('') + "$"); return this.each(function() {
                var input = $(this); var buffer = new Array(mask.length); var locked = new Array(mask.length); var valid = false; var ignore = false; var firstNonMaskPos = null; $.each(mask.split(""), function(i, c) {
                    locked[i] = (charMap[c] == null); buffer[i] = locked[i] ? c : settings.placeholder; if (!locked[i] && firstNonMaskPos == null)
                        firstNonMaskPos = i;
                }); function focusEvent() { checkVal(); writeBuffer(); setTimeout(function() { $(input[0]).caret(valid ? mask.length : firstNonMaskPos); }, 0); }; function keydownEvent(e) {
                    var pos = $(this).caret(); var k = e.keyCode; ignore = (k < 16 || (k > 16 && k < 32) || (k > 32 && k < 41)); if ((pos.begin - pos.end) != 0 && (!ignore || k == 8 || k == 46)) { clearBuffer(pos.begin, pos.end); }
                    if (k == 8) {
                        while (pos.begin-- >= 0) {
                            if (!locked[pos.begin]) {
                                buffer[pos.begin] = settings.placeholder; if ($.browser.opera) { s = writeBuffer(); input.val(s.substring(0, pos.begin) + " " + s.substring(pos.begin)); $(this).caret(pos.begin + 1); } else { writeBuffer(); $(this).caret(Math.max(firstNonMaskPos, pos.begin)); }
                                return false;
                            }
                        }
                    } else if (k == 46) { clearBuffer(pos.begin, pos.begin + 1); writeBuffer(); $(this).caret(Math.max(firstNonMaskPos, pos.begin)); return false; } else if (k == 27) { clearBuffer(0, mask.length); writeBuffer(); $(this).caret(firstNonMaskPos); return false; }
                }; function keypressEvent(e) {
                    if (ignore) { ignore = false; return (e.keyCode == 8) ? false : null; }
                    e = e || window.event; var k = e.charCode || e.keyCode || e.which; var pos = $(this).caret(); if (e.ctrlKey || e.altKey) { return true; } else if ((k >= 41 && k <= 122) || k == 32 || k > 186) {
                        var p = seekNext(pos.begin - 1); if (p < mask.length) {
                            if (new RegExp(charMap[mask.charAt(p)]).test(String.fromCharCode(k))) {
                                buffer[p] = String.fromCharCode(k); writeBuffer(); var next = seekNext(p); $(this).caret(next); if (settings.completed && next == mask.length)
                                    settings.completed.call(input);
                            }
                        }
                    }
                    return false;
                }; function clearBuffer(start, end) {
                    for (var i = start; i < end && i < mask.length; i++) {
                        if (!locked[i])
                            buffer[i] = settings.placeholder;
                    }
                }; function writeBuffer() { return input.val(buffer.join('')).val(); }; function checkVal() {
                    var test = input.val(); var pos = 0; for (var i = 0; i < mask.length; i++) {
                        if (!locked[i]) {
                            buffer[i] = settings.placeholder; while (pos++ < test.length) {
                                var reChar = new RegExp(charMap[mask.charAt(i)]); if (test.charAt(pos - 1).match(reChar)) { buffer[i] = test.charAt(pos - 1); break; }
                            }
                        }
                    }
                    var s = writeBuffer(); if (!s.match(re)) { input.val(""); clearBuffer(0, mask.length); valid = false; } else
                        valid = true;
                }; function seekNext(pos) {
                    while (++pos < mask.length) {
                        if (!locked[pos])
                            return pos;
                    }
                    return mask.length;
                }; input.one("unmask", function() {
                    input.unbind("focus", focusEvent); input.unbind("blur", checkVal); input.unbind("keydown", keydownEvent); input.unbind("keypress", keypressEvent); if ($.browser.msie)
                        this.onpaste = null; else if ($.browser.mozilla)
                        this.removeEventListener('input', checkVal, false);
                }); input.bind("focus", focusEvent); input.bind("blur", checkVal); input.bind("keydown", keydownEvent); input.bind("keypress", keypressEvent); if ($.browser.msie)
                    this.onpaste = function() { setTimeout(checkVal, 0); }; else if ($.browser.mozilla)
                    this.addEventListener('input', checkVal, false); checkVal();
            });
        };
    })(jQuery); ; (function($) {
        $.fn.addOption = function() {
            var add = function(el, v, t, sO) {
                var option = document.createElement("option"); option.value = v, option.text = t; var o = el.options; var oL = o.length; if (!el.cache) {
                    el.cache = {}; for (var i = 0; i < oL; i++) { el.cache[o[i].value] = i; }
                }
                if (typeof el.cache[v] == "undefined") el.cache[v] = oL; el.options[el.cache[v]] = option; if (sO) { option.selected = true; }
            }; var a = arguments; if (a.length == 0) return this; var sO = true; var m = false; var items, v, t; if (typeof (a[0]) == "object") { m = true; items = a[0]; }
            if (a.length >= 2) {
                if (typeof (a[1]) == "boolean") sO = a[1]; else if (typeof (a[2]) == "boolean") sO = a[2]; if (!m) { v = a[0]; t = a[1]; }
            }
            this.each(function() {
                if (this.nodeName.toLowerCase() != "select") return; if (m) {
                    for (var item in items) { add(this, item, items[item], sO); }
                }
                else { add(this, v, t, sO); }
            }); return this;
        }; $.fn.ajaxAddOption = function(url, params, select, fn, args) {
            if (typeof (url) != "string") return this; if (typeof (params) != "object") params = {}; if (typeof (select) != "boolean") select = true; this.each(function() {
                var el = this; $.getJSON(url, params, function(r) {
                    $(el).addOption(r, select); if (typeof fn == "function") {
                        if (typeof args == "object") { fn.apply(el, args); }
                        else { fn.call(el); }
                    }
                });
            }); return this;
        }; $.fn.removeOption = function() {
            var a = arguments; if (a.length == 0) return this; var ta = typeof (a[0]); var v, index; if (ta == "string" || ta == "object" || ta == "function") v = a[0]; else if (ta == "number") index = a[0]; else return this; this.each(function() {
                if (this.nodeName.toLowerCase() != "select") return; if (this.cache) this.cache = null; var remove = false; var o = this.options; if (!!v) {
                    var oL = o.length; for (var i = oL - 1; i >= 0; i--) {
                        if (v.constructor == RegExp) {
                            if (o[i].value.match(v)) { remove = true; }
                        }
                        else if (o[i].value == v) { remove = true; }
                        if (remove && a[1] === true) remove = o[i].selected; if (remove) { o[i] = null; }
                        remove = false;
                    }
                }
                else {
                    if (a[1] === true) { remove = o[index].selected; }
                    else { remove = true; }
                    if (remove) { this.remove(index); }
                }
            }); return this;
        }; $.fn.sortOptions = function(ascending) {
            var a = typeof (ascending) == "undefined" ? true : !!ascending; this.each(function() {
                if (this.nodeName.toLowerCase() != "select") return; var o = this.options; var oL = o.length; var sA = []; for (var i = 0; i < oL; i++) {
                    sA[i] = { v: o[i].value, t: o[i].text
                    }
                }
                sA.sort(function(o1, o2) {
                    o1t = o1.t.toLowerCase(), o2t = o2.t.toLowerCase(); if (o1t == o2t) return 0; if (a) { return o1t < o2t ? -1 : 1; }
                    else { return o1t > o2t ? -1 : 1; }
                }); for (var i = 0; i < oL; i++) { o[i].text = sA[i].t; o[i].value = sA[i].v; }
            }); return this;
        }; $.fn.selectOptions = function(value, clear) {
            var v = value; var vT = typeof (value); var c = clear || false; if (vT != "string" && vT != "function" && vT != "object") return this; this.each(function() {
                if (this.nodeName.toLowerCase() != "select") return this; var o = this.options; var oL = o.length; for (var i = 0; i < oL; i++) {
                    if (v.constructor == RegExp) {
                        if (o[i].value.match(v)) { o[i].selected = true; }
                        else if (c) { o[i].selected = false; }
                    }
                    else {
                        if (o[i].value == v) { o[i].selected = true; }
                        else if (c) { o[i].selected = false; }
                    }
                }
            }); return this;
        }; $.fn.copyOptions = function(to, which) {
            var w = which || "selected"; if ($(to).size() == 0) return this; this.each(function() {
                if (this.nodeName.toLowerCase() != "select") return this; var o = this.options; var oL = o.length; for (var i = 0; i < oL; i++) {
                    if (w == "all" || (w == "selected" && o[i].selected)) { $(to).addOption(o[i].value, o[i].text); }
                }
            }); return this;
        }; $.fn.containsOption = function(value, fn) {
            var found = false; var v = value; var vT = typeof (v); var fT = typeof (fn); if (vT != "string" && vT != "function" && vT != "object") return fT == "function" ? this : found; this.each(function() {
                if (this.nodeName.toLowerCase() != "select") return this; if (found && fT != "function") return false; var o = this.options; var oL = o.length; for (var i = 0; i < oL; i++) {
                    if (v.constructor == RegExp) {
                        if (o[i].value.match(v)) { found = true; if (fT == "function") fn.call(o[i], i); }
                    }
                    else {
                        if (o[i].value == v) { found = true; if (fT == "function") fn.call(o[i], i); }
                    }
                }
            }); return fT == "function" ? this : found;
        }; $.fn.selectedValues = function() { var v = []; this.find("option:selected").each(function() { v[v.length] = this.value; }); return v; };
    })(jQuery); var tb_pathToImage = "/content/images/loadingAnimation.gif"; $(document).ready(function() { tb_init('a.thickbox, area.thickbox, input.thickbox'); imgLoader = new Image(); imgLoader.src = tb_pathToImage; }); function tb_init(domChunk) { $(domChunk).click(function() { var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t, a, g); this.blur(); return false; }); }
    function tb_show(caption, url, imageGroup) {
        try {
            if (typeof document.body.style.maxHeight === "undefined") {
                $("body", "html").css({ height: "100%", width: "100%" }); $("html").css("overflow", "hidden"); if (document.getElementById("TB_HideSelect") === null) { $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>"); $("#TB_overlay").click(tb_remove); }
            } else {
                if (document.getElementById("TB_overlay") === null) { $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>"); $("#TB_overlay").click(tb_remove); }
            }
            if (tb_detectMacXFF()) { $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); } else { $("#TB_overlay").addClass("TB_overlayBG"); }
            if (caption === null) { caption = ""; }
            $("body").append("<div id='TB_load'><img src='" + imgLoader.src + "' /></div>"); $('#TB_load').show(); var baseURL; if (url.indexOf("?") !== -1) { baseURL = url.substr(0, url.indexOf("?")); } else { baseURL = url; }
            var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if (urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp') {
                TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if (imageGroup) {
                    TB_TempArray = $("a[@rel=" + imageGroup + "]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
                        var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) {
                            if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"; }
                        } else { TB_FoundURL = true; TB_imageCount = "Image " + (TB_Counter + 1) + " of " + (TB_TempArray.length); }
                    }
                }
                imgPreloader = new Image(); imgPreloader.onload = function() {
                    imgPreloader.onload = null; var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) {
                        imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; }
                    } else if (imageHeight > y) {
                        imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; }
                    }
                    TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; $("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='" + url + "' width='" + imageWidth + "' height='" + imageHeight + "' alt='" + caption + "'/></a>" + "<div id='TB_caption'>" + caption + "<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>Kapat</a></div>"); $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) {
                        function goPrev() {
                            if ($(document).unbind("click", goPrev)) { $(document).unbind("click", goPrev); }
                            $("#TB_window").remove(); $("body").append("<div id='TB_window'></div>"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false;
                        }
                        $("#TB_prev").click(goPrev);
                    }
                    if (!(TB_NextHTML === "")) {
                        function goNext() { $("#TB_window").remove(); $("body").append("<div id='TB_window'></div>"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; }
                        $("#TB_next").click(goNext);
                    }
                    document.onkeydown = function(e) {
                        if (e == null) { keycode = event.keyCode; } else { keycode = e.which; }
                        if (keycode == 27) { tb_remove(); } else if (keycode == 190) {
                            if (!(TB_NextHTML == "")) { document.onkeydown = ""; goNext(); }
                        } else if (keycode == 188) {
                            if (!(TB_PrevHTML == "")) { document.onkeydown = ""; goPrev(); }
                        }
                    }; tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({ display: "block" });
                }; imgPreloader.src = url;
            } else {
                var queryString = url.replace(/^[^\?]+\??/, ''); var params = tb_parseQuery(queryString); TB_WIDTH = (params['width'] * 1) + 30 || 630; TB_HEIGHT = (params['height'] * 1) + 40 || 440; ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if (url.indexOf('TB_iframe') != -1) {
                    urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if (params['modal'] != "true") { $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>" + caption + "</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>Kapat</a></div></div><iframe frameborder='0' hspace='0' src='" + urlNoQuery[0] + "' id='TB_iframeContent' name='TB_iframeContent" + Math.round(Math.random() * 1000) + "' onload='tb_showIframe()' style='width:" + (ajaxContentW + 29) + "px;height:" + (ajaxContentH + 17) + "px;' > </iframe>"); } else { $("#TB_overlay").unbind(); $("#TB_window").append("<iframe frameborder='0' hspace='0' src='" + urlNoQuery[0] + "' id='TB_iframeContent' name='TB_iframeContent" + Math.round(Math.random() * 1000) + "' onload='tb_showIframe()' style='width:" + (ajaxContentW + 29) + "px;height:" + (ajaxContentH + 17) + "px;'> </iframe>"); }
                } else {
                    if ($("#TB_window").css("display") != "block") {
                        if (params['modal'] != "true") { $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>" + caption + "</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>Kapat</a></div></div><div id='TB_ajaxContent' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px'></div>"); } else { $("#TB_overlay").unbind(); $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px;'></div>"); }
                    } else { $("#TB_ajaxContent")[0].style.width = ajaxContentW + "px"; $("#TB_ajaxContent")[0].style.height = ajaxContentH + "px"; $("#TB_ajaxContent")[0].scrollTop = 0; $("#TB_ajaxWindowTitle").html(caption); }
                }
                $("#TB_closeWindowButton").click(tb_remove); if (url.indexOf('TB_inline') != -1) { $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); $("#TB_window").unload(function() { $('#' + params['inlineId']).append($("#TB_ajaxContent").children()); }); tb_position(); $("#TB_load").remove(); $("#TB_window").css({ display: "block" }); } else if (url.indexOf('TB_iframe') != -1) {
                    tb_position(); if ($.browser.safari) { $("#TB_load").remove(); $("#TB_window").css({ display: "block" }); }
                } else { $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()), function() { tb_position(); $("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); $("#TB_window").css({ display: "block" }); }); }
            }
            if (!params['modal']) {
                document.onkeyup = function(e) {
                    if (e == null) { keycode = event.keyCode; } else { keycode = e.which; }
                    if (keycode == 27) { tb_remove(); }
                };
            }
        } catch (e) { }
    }
    function tb_showIframe() { $("#TB_load").remove(); $("#TB_window").css({ display: "block" }); }
    function tb_remove() {
        $("#TB_imageOff").unbind("click"); $("#TB_closeWindowButton").unbind("click"); $("#TB_window").fadeOut("fast", function() { $('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove(); }); $("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") { $("body", "html").css({ height: "auto", width: "auto" }); $("html").css("overflow", ""); }
        document.onkeydown = ""; document.onkeyup = ""; return false;
    }
    function tb_position() {
        $("#TB_window").css({ marginLeft: '-' + parseInt((TB_WIDTH / 2), 10) + 'px', width: TB_WIDTH + 'px' }); if (!(jQuery.browser.msie && jQuery.browser.version < 7)) { $("#TB_window").css({ marginTop: '-' + parseInt((TB_HEIGHT / 2), 10) + 'px' }); }
    }
    function tb_parseQuery(query) {
        var Params = {}; if (!query) { return Params; }
        var Pairs = query.split(/[;&]/); for (var i = 0; i < Pairs.length; i++) {
            var KeyVal = Pairs[i].split('='); if (!KeyVal || KeyVal.length != 2) { continue; }
            var key = unescape(KeyVal[0]); var val = unescape(KeyVal[1]); val = val.replace(/\+/g, ' '); Params[key] = val;
        }
        return Params;
    }
    function tb_getPageSize() { var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de && de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de && de.clientHeight) || document.body.clientHeight; arrayPageSize = [w, h]; return arrayPageSize; }
    function tb_detectMacXFF() {
        var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox') != -1) { return true; }
    }; (function($) {
        $.ui = $.ui || {}; $.fn.extend({ accordion: function(options, data) {
            var args = Array.prototype.slice.call(arguments, 1); return this.each(function() {
                if (typeof options == "string") { var accordion = $.data(this, "ui-accordion"); accordion[options].apply(accordion, args); } else if (!$(this).is(".ui-accordion"))
                    $.data(this, "ui-accordion", new $.ui.accordion(this, options));
            });
        }, activate: function(index) { return this.accordion("activate", index); }
        }); $.ui.accordion = function(container, options) {
            this.options = options = $.extend({}, $.ui.accordion.defaults, options); this.element = container; $(container).addClass("ui-accordion"); if (options.navigation) {
                var current = $(container).find("a").filter(options.navigationFilter); if (current.length) {
                    if (current.filter(options.header).length) { options.active = current; } else { options.active = current.parent().parent().prev(); current.addClass("current"); }
                }
            }
            options.headers = $(container).find(options.header); options.active = findActive(options.headers, options.active); if (options.fillSpace) { var maxHeight = $(container).parent().height(); options.headers.each(function() { maxHeight -= $(this).outerHeight(); }); var maxPadding = 0; options.headers.next().each(function() { maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height()); }).height(maxHeight - maxPadding); } else if (options.autoheight) { var maxHeight = 0; options.headers.next().each(function() { maxHeight = Math.max(maxHeight, $(this).outerHeight()); }).height(maxHeight); }
            options.headers
.not(options.active || "")
.next()
.hide(); options.active.parent().andSelf().addClass(options.selectedClass); if (options.event)
                $(container).bind((options.event) + ".ui-accordion", clickHandler);
        }; $.ui.accordion.prototype = { activate: function(index) {
            clickHandler.call(this.element, { target: findActive(this.options.headers, index)[0]
            });
        }, enable: function() { this.options.disabled = false; }, disable: function() { this.options.disabled = true; }, destroy: function() {
            this.options.headers.next().css("display", ""); if (this.options.fillSpace || this.options.autoheight) { this.options.headers.next().css("height", ""); }
            $.removeData(this.element, "ui-accordion"); $(this.element).removeClass("ui-accordion").unbind(".ui-accordion");
        }
        }
        function scopeCallback(callback, scope) { return function() { return callback.apply(scope, arguments); }; }
        function completed(cancel) {
            if (!$.data(this, "ui-accordion"))
                return; var instance = $.data(this, "ui-accordion"); var options = instance.options; options.running = cancel ? 0 : --options.running; if (options.running)
                return; if (options.clearStyle) {
                options.toShow.add(options.toHide).css({ height: ""
                });
            }
            $(this).triggerHandler("change.ui-accordion", [options.data], options.change);
        }
        function toggle(toShow, toHide, data, clickedActive, down) {
            var options = $.data(this, "ui-accordion").options; options.toShow = toShow; options.toHide = toHide; options.data = data; var complete = scopeCallback(completed, this); options.running = toHide.size() == 0 ? toShow.size() : toHide.size(); if (options.animated) {
                if (!options.alwaysOpen && clickedActive) {
                    $.ui.accordion.animations[options.animated]({ toShow: jQuery([]), toHide: toHide, complete: complete, down: down, autoheight: options.autoheight
                    });
                } else {
                    $.ui.accordion.animations[options.animated]({ toShow: toShow, toHide: toHide, complete: complete, down: down, autoheight: options.autoheight
                    });
                }
            } else {
                if (!options.alwaysOpen && clickedActive) { toShow.toggle(); } else { toHide.hide(); toShow.show(); }
                complete(true);
            }
        }
        function clickHandler(event) {
            var options = $.data(this, "ui-accordion").options; if (options.disabled)
                return false; if (!event.target && !options.alwaysOpen) {
                options.active.parent().andSelf().toggleClass(options.selectedClass); var toHide = options.active.next(), data = { instance: this, options: options, newHeader: jQuery([]), oldHeader: options.active, newContent: jQuery([]), oldContent: toHide
                }, toShow = options.active = $([]); toggle.call(this, toShow, toHide, data); return false;
            }
            var clicked = $(event.target); if (clicked.parents(options.header).length)
                while (!clicked.is(options.header))
                clicked = clicked.parent(); var clickedActive = clicked[0] == options.active[0]; if (options.running || (options.alwaysOpen && clickedActive))
                return false; if (!clicked.is(options.header))
                return; options.active.parent().andSelf().toggleClass(options.selectedClass); if (!clickedActive) { clicked.parent().andSelf().addClass(options.selectedClass); }
            var toShow = clicked.next(), toHide = options.active.next(), data = { instance: this, options: options, newHeader: clicked, oldHeader: options.active, newContent: toShow, oldContent: toHide
            }, down = options.headers.index(options.active[0]) > options.headers.index(clicked[0]); options.active = clickedActive ? $([]) : clicked; toggle.call(this, toShow, toHide, data, clickedActive, down); return false;
        }; function findActive(headers, selector) {
            return selector != undefined
? typeof selector == "number"
? headers.filter(":eq(" + selector + ")")
: headers.not(headers.not(selector))
: selector === false
? $([])
: headers.filter(":eq(0)");
        }
        $.extend($.ui.accordion, { defaults: { selectedClass: "selected", alwaysOpen: true, animated: 'slide', event: "click", header: "a", autoheight: true, running: 0, navigationFilter: function() { return this.href.toLowerCase() == location.href.toLowerCase(); }
        }, animations: { slide: function(options, additions) {
            options = $.extend({ easing: "swing", duration: 300
            }, options, additions); if (!options.toHide.size()) { options.toShow.animate({ height: "show" }, options); return; }
            var hideHeight = options.toHide.height(), showHeight = options.toShow.height(), difference = showHeight / hideHeight; options.toShow.css({ height: 0 }).show(); options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({ height: "hide" }, { step: function(now) {
                var current = (hideHeight - now) * difference; if ($.browser.msie || $.browser.opera) { current = Math.ceil(current); }
                options.toShow.height(current);
            }, duration: options.duration, easing: options.easing, complete: function() {
                if (!options.autoheight) { options.toShow.css("height", "auto"); }
                options.complete();
            }
            });
        }, bounceslide: function(options) {
            this.slide(options, { easing: options.down ? "bounceout" : "swing", duration: options.down ? 1000 : 200
            });
        }, easeslide: function(options) {
            this.slide(options, { easing: "easeinout", duration: 700
            })
        }
        }
        });
    })(jQuery); $(function() {
        $('.stars li').click(function() {
            $this = $(this); $parent = $this.parent(); var score = $this.attr('score'); var id = $parent.attr('id'); $.getJSON('/contenttools/rate', { ratingKey: id, score: score }, function(response) {
                if (response != false) {
                    $parent.children().remove(); for (var i = 1; i <= 5; i++) {
                        if (i <= response)
                            $parent.append($.format('<li score="{0}">*</li>', response)); else
                            $parent.append($.format('<li class="empty" score="{0}">*</li>', i));
                    }
                }
                else { location.href = '/giris?redirectUrl=' + location.href; }
            });
        });
    }); (function($) {
        $.fn.extend({ renderCalendar: function(s) {
            var dc = function(a) { return document.createElement(a); }; s = $.extend({ month: null, year: null, renderCallback: null, showHeader: $.dpConst.SHOW_HEADER_SHORT, dpController: null, hoverClass: 'dp-hover'
            }, s); if (s.showHeader != $.dpConst.SHOW_HEADER_NONE) {
                var headRow = $(dc('tr')); for (var i = Date.firstDayOfWeek; i < Date.firstDayOfWeek + 7; i++) { var weekday = i % 7; var day = Date.dayNames[weekday]; headRow.append(jQuery(dc('th')).attr({ 'scope': 'col', 'abbr': day, 'title': day, 'class': (weekday == 0 || weekday == 6 ? 'weekend' : 'weekday') }).html(s.showHeader == $.dpConst.SHOW_HEADER_SHORT ? day.substr(0, 1) : day)); }
            }; var calendarTable = $(dc('table'))
.attr({ 'cellspacing': 2, 'className': 'jCalendar'
}
)
.append((s.showHeader != $.dpConst.SHOW_HEADER_NONE ?
$(dc('thead'))
.append(headRow)
:
dc('thead')
)); var tbody = $(dc('tbody')); var today = (new Date()).zeroTime(); var month = s.month == undefined ? today.getMonth() : s.month; var year = s.year || today.getFullYear(); var currentDate = new Date(year, month, 1); var firstDayOffset = Date.firstDayOfWeek - currentDate.getDay() + 1; if (firstDayOffset > 1) firstDayOffset -= 7; var weeksToDraw = Math.ceil(((-1 * firstDayOffset + 1) + currentDate.getDaysInMonth()) / 7); currentDate.addDays(firstDayOffset - 1); var doHover = function() {
    if (s.hoverClass) { $(this).addClass(s.hoverClass); }
}; var unHover = function() {
    if (s.hoverClass) { $(this).removeClass(s.hoverClass); }
}; var w = 0; while (w++ < weeksToDraw) {
                var r = jQuery(dc('tr')); for (var i = 0; i < 7; i++) {
                    var thisMonth = currentDate.getMonth() == month; var d = $(dc('td'))
.text(currentDate.getDate() + '')
.attr('className', (thisMonth ? 'current-month ' : 'other-month ') + (currentDate.isWeekend() ? 'weekend ' : 'weekday ') + (thisMonth && currentDate.getTime() == today.getTime() ? 'today ' : '')
)
.hover(doHover, unHover)
; if (s.renderCallback) { s.renderCallback(d, currentDate, month, year); }
                    r.append(d); currentDate.addDays(1);
                }
                tbody.append(r);
            }
            calendarTable.append(tbody); return this.each(function() { $(this).empty().append(calendarTable); });
        }, datePicker: function(s) {
            if (!$.event._dpCache) $.event._dpCache = []; s = $.extend({ month: undefined, year: undefined, startDate: undefined, endDate: undefined, inline: false, renderCallback: [], createButton: true, showYearNavigation: true, closeOnSelect: true, displayClose: false, selectMultiple: false, clickInput: false, verticalPosition: $.dpConst.POS_TOP, horizontalPosition: $.dpConst.POS_LEFT, verticalOffset: 0, horizontalOffset: 0, hoverClass: 'dp-hover'
            }, s); return this.each(function() {
                var $this = $(this); var alreadyExists = true; if (!this._dpId) { this._dpId = $.event.guid++; $.event._dpCache[this._dpId] = new DatePicker(this); alreadyExists = false; }
                if (s.inline) { s.createButton = false; s.displayClose = false; s.closeOnSelect = false; $this.empty(); }
                var controller = $.event._dpCache[this._dpId]; controller.init(s); if (!alreadyExists && s.createButton) {
                    controller.button = $('<a href="#" class="dp-choose-date" title="' + $.dpText.TEXT_CHOOSE_DATE + '">' + $.dpText.TEXT_CHOOSE_DATE + '</a>')
.bind('click', function() { $this.dpDisplay(this); this.blur(); return false; }); $this.after(controller.button);
                }
                if (!alreadyExists && $this.is(':text')) {
                    $this
.bind('dateSelected', function(e, selectedDate, $td) { this.value = selectedDate.asString(); }).bind('change', function() {
    var d = Date.fromString(this.value); if (d) { controller.setSelected(d, true, true); }
}); if (s.clickInput) { $this.bind('click', function() { $this.dpDisplay(); }); }
                    var d = Date.fromString(this.value); if (this.value != '' && d) { controller.setSelected(d, true, true); }
                }
                $this.addClass('dp-applied');
            }
)
        }, dpSetDisabled: function(s) { return _w.call(this, 'setDisabled', s); }, dpSetStartDate: function(d) { return _w.call(this, 'setStartDate', d); }, dpSetEndDate: function(d) { return _w.call(this, 'setEndDate', d); }, dpGetSelected: function() {
            var c = _getController(this[0]); if (c) { return c.getSelected(); }
            return null;
        }, dpSetSelected: function(d, v, m) { if (v == undefined) v = true; if (m == undefined) m = true; return _w.call(this, 'setSelected', Date.fromString(d), v, m); }, dpSetDisplayedMonth: function(m, y) { return _w.call(this, 'setDisplayedMonth', Number(m), Number(y)); }, dpDisplay: function(e) { return _w.call(this, 'display', e); }, dpSetRenderCallback: function(a) { return _w.call(this, 'setRenderCallback', a); }, dpSetPosition: function(v, h) { return _w.call(this, 'setPosition', v, h); }, dpSetOffset: function(v, h) { return _w.call(this, 'setOffset', v, h); }, dpClose: function() { return _w.call(this, '_closeCalendar', false, this[0]); }, _dpDestroy: function() { }
        }); var _w = function(f, a1, a2, a3) {
            return this.each(function() {
                var c = _getController(this); if (c) { c[f](a1, a2, a3); }
            });
        }; function DatePicker(ele) { this.ele = ele; this.displayedMonth = null; this.displayedYear = null; this.startDate = null; this.endDate = null; this.showYearNavigation = null; this.closeOnSelect = null; this.displayClose = null; this.selectMultiple = null; this.verticalPosition = null; this.horizontalPosition = null; this.verticalOffset = null; this.horizontalOffset = null; this.button = null; this.renderCallback = []; this.selectedDates = {}; this.inline = null; this.context = '#dp-popup'; }; $.extend(DatePicker.prototype, { init: function(s) {
            this.setStartDate(s.startDate); this.setEndDate(s.endDate); this.setDisplayedMonth(Number(s.month), Number(s.year)); this.setRenderCallback(s.renderCallback); this.showYearNavigation = s.showYearNavigation; this.closeOnSelect = s.closeOnSelect; this.displayClose = s.displayClose; this.selectMultiple = s.selectMultiple; this.verticalPosition = s.verticalPosition; this.horizontalPosition = s.horizontalPosition; this.hoverClass = s.hoverClass; this.setOffset(s.verticalOffset, s.horizontalOffset); this.inline = s.inline; if (this.inline) { this.context = this.ele; this.display(); }
        }, setStartDate: function(d) {
            if (d) { this.startDate = Date.fromString(d); }
            if (!this.startDate) { this.startDate = (new Date()).zeroTime(); }
            this.setDisplayedMonth(this.displayedMonth, this.displayedYear);
        }, setEndDate: function(d) {
            if (d) { this.endDate = Date.fromString(d); }
            if (!this.endDate) { this.endDate = (new Date('12/31/2999')); }
            if (this.endDate.getTime() < this.startDate.getTime()) { this.endDate = this.startDate; }
            this.setDisplayedMonth(this.displayedMonth, this.displayedYear);
        }, setPosition: function(v, h) { this.verticalPosition = v; this.horizontalPosition = h; }, setOffset: function(v, h) { this.verticalOffset = parseInt(v) || 0; this.horizontalOffset = parseInt(h) || 0; }, setDisabled: function(s) {
            $e = $(this.ele); $e[s ? 'addClass' : 'removeClass']('dp-disabled'); if (this.button) { $but = $(this.button); $but[s ? 'addClass' : 'removeClass']('dp-disabled'); $but.attr('title', s ? '' : $.dpText.TEXT_CHOOSE_DATE); }
            if ($e.is(':text')) { $e.attr('disabled', s ? 'disabled' : ''); }
        }, setDisplayedMonth: function(m, y) {
            if (this.startDate == undefined || this.endDate == undefined) { return; }
            var s = new Date(this.startDate.getTime()); s.setDate(1); var e = new Date(this.endDate.getTime()); e.setDate(1); var t; if ((!m && !y) || (isNaN(m) && isNaN(y))) { t = new Date().zeroTime(); t.setDate(1); } else if (isNaN(m)) { t = new Date(y, this.displayedMonth, 1); } else if (isNaN(y)) { t = new Date(this.displayedYear, m, 1); } else {
                t = new Date(y, m, 1)
            }
            if (t.getTime() < s.getTime()) { t = s; } else if (t.getTime() > e.getTime()) { t = e; }
            this.displayedMonth = t.getMonth(); this.displayedYear = t.getFullYear();
        }, setSelected: function(d, v, moveToMonth) {
            if (this.selectMultiple == false) { this.selectedDates = {}; $('td.selected', this.context).removeClass('selected'); }
            if (moveToMonth) { this.setDisplayedMonth(d.getMonth(), d.getFullYear()); }
            this.selectedDates[d.toString()] = v;
        }, isSelected: function(d) { return this.selectedDates[d.toString()]; }, getSelected: function() {
            var r = []; for (s in this.selectedDates) {
                if (this.selectedDates[s] == true) { r.push(Date.parse(s)); }
            }
            return r;
        }, display: function(eleAlignTo) {
            if ($(this.ele).is('.dp-disabled')) return; eleAlignTo = eleAlignTo || this.ele; var c = this; var $ele = $(eleAlignTo); var eleOffset = $ele.offset(); var $createIn; var attrs; var attrsCalendarHolder; var cssRules; if (c.inline) {
                $createIn = $(this.ele); attrs = { 'id': 'calendar-' + this.ele._dpId, 'className': 'dp-popup dp-popup-inline'
                }; cssRules = {};
            } else {
                $createIn = $('body'); attrs = { 'id': 'dp-popup', 'className': 'dp-popup'
                }; cssRules = { 'top': eleOffset.top + c.verticalOffset, 'left': eleOffset.left + c.horizontalOffset
                }; var _checkMouse = function(e) {
                    var el = e.target; var cal = $('#dp-popup')[0]; while (true) {
                        if (el == cal) { return true; } else if (el == document) { c._closeCalendar(); return false; } else { el = $(el).parent()[0]; }
                    }
                }; this._checkMouse = _checkMouse; this._closeCalendar(true);
            }
            $createIn
.append($('<div></div>')
.attr(attrs)
.css(cssRules)
.append($('<h2></h2>'), $('<div class="dp-nav-prev"></div>')
.append($('<a class="dp-nav-prev-year" href="#" title="' + $.dpText.TEXT_PREV_YEAR + '">&lt;&lt;</a>')
.bind('click', function() { return c._displayNewMonth.call(c, this, 0, -1); }), $('<a class="dp-nav-prev-month" href="#" title="' + $.dpText.TEXT_PREV_MONTH + '">&lt;</a>')
.bind('click', function() { return c._displayNewMonth.call(c, this, -1, 0); }
)), $('<div class="dp-nav-next"></div>')
.append($('<a class="dp-nav-next-year" href="#" title="' + $.dpText.TEXT_NEXT_YEAR + '">&gt;&gt;</a>')
.bind('click', function() { return c._displayNewMonth.call(c, this, 0, 1); }), $('<a class="dp-nav-next-month" href="#" title="' + $.dpText.TEXT_NEXT_MONTH + '">&gt;</a>')
.bind('click', function() { return c._displayNewMonth.call(c, this, 1, 0); }
)), $('<div></div>')
.attr('className', 'dp-calendar')
)
.bgIframe()); var $pop = this.inline ? $('.dp-popup', this.context) : $('#dp-popup'); if (this.showYearNavigation == false) { $('.dp-nav-prev-year, .dp-nav-next-year', c.context).css('display', 'none'); }
            if (this.displayClose) {
                $pop.append($('<a href="#" id="dp-close">' + $.dpText.TEXT_CLOSE + '</a>')
.bind('click', function() { c._closeCalendar(); return false; }
));
            }
            c._renderCalendar(); $(this.ele).trigger('dpDisplayed', $pop); if (!c.inline) {
                if (this.verticalPosition == $.dpConst.POS_BOTTOM) { $pop.css('top', eleOffset.top + $ele.height() - $pop.height() + c.verticalOffset); }
                if (this.horizontalPosition == $.dpConst.POS_RIGHT) { $pop.css('left', eleOffset.left + $ele.width() - $pop.width() + c.horizontalOffset); }
                $(document).bind('mousedown', this._checkMouse);
            }
        }, setRenderCallback: function(a) {
            if (a && typeof (a) == 'function') { a = [a]; }
            this.renderCallback = this.renderCallback.concat(a);
        }, cellRender: function($td, thisDate, month, year) {
            var c = this.dpController; var d = new Date(thisDate.getTime()); $td.bind('click', function() {
                var $this = $(this); if (!$this.is('.disabled')) {
                    c.setSelected(d, !$this.is('.selected') || !c.selectMultiple); var s = c.isSelected(d); $(c.ele).trigger('dateSelected', [d, $td, s]); $(c.ele).trigger('change'); if (c.closeOnSelect) { c._closeCalendar(); } else { $this[s ? 'addClass' : 'removeClass']('selected'); }
                }
            }); if (c.isSelected(d)) { $td.addClass('selected'); }
            for (var i = 0; i < c.renderCallback.length; i++) { c.renderCallback[i].apply(this, arguments); }
        }, _displayNewMonth: function(ele, m, y) {
            if (!$(ele).is('.disabled')) { this.setDisplayedMonth(this.displayedMonth + m, this.displayedYear + y); this._clearCalendar(); this._renderCalendar(); $(this.ele).trigger('dpMonthChanged', [this.displayedMonth, this.displayedYear]); }
            ele.blur(); return false;
        }, _renderCalendar: function() {
            $('h2', this.context).html(Date.monthNames[this.displayedMonth] + ' ' + this.displayedYear); $('.dp-calendar', this.context).renderCalendar({ month: this.displayedMonth, year: this.displayedYear, renderCallback: this.cellRender, dpController: this, hoverClass: this.hoverClass
            }); if (this.displayedYear == this.startDate.getFullYear() && this.displayedMonth == this.startDate.getMonth()) {
                $('.dp-nav-prev-year', this.context).addClass('disabled'); $('.dp-nav-prev-month', this.context).addClass('disabled'); $('.dp-calendar td.other-month', this.context).each(function() {
                    var $this = $(this); if (Number($this.text()) > 20) { $this.addClass('disabled'); }
                }); var d = this.startDate.getDate(); $('.dp-calendar td.current-month', this.context).each(function() {
                    var $this = $(this); if (Number($this.text()) < d) { $this.addClass('disabled'); }
                });
            } else {
                $('.dp-nav-prev-year', this.context).removeClass('disabled'); $('.dp-nav-prev-month', this.context).removeClass('disabled'); var d = this.startDate.getDate(); if (d > 20) {
                    var sd = new Date(this.startDate.getTime()); sd.addMonths(1); if (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) {
                        $('dp-calendar td.other-month', this.context).each(function() {
                            var $this = $(this); if (Number($this.text()) < d) { $this.addClass('disabled'); }
                        });
                    }
                }
            }
            if (this.displayedYear == this.endDate.getFullYear() && this.displayedMonth == this.endDate.getMonth()) {
                $('.dp-nav-next-year', this.context).addClass('disabled'); $('.dp-nav-next-month', this.context).addClass('disabled'); $('.dp-calendar td.other-month', this.context).each(function() {
                    var $this = $(this); if (Number($this.text()) < 14) { $this.addClass('disabled'); }
                }); var d = this.endDate.getDate(); $('.dp-calendar td.current-month', this.context).each(function() {
                    var $this = $(this); if (Number($this.text()) > d) { $this.addClass('disabled'); }
                });
            } else {
                $('.dp-nav-next-year', this.context).removeClass('disabled'); $('.dp-nav-next-month', this.context).removeClass('disabled'); var d = this.endDate.getDate(); if (d < 13) {
                    var ed = new Date(this.endDate.getTime()); ed.addMonths(-1); if (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) {
                        $('.dp-calendar td.other-month', this.context).each(function() {
                            var $this = $(this); if (Number($this.text()) > d) { $this.addClass('disabled'); }
                        });
                    }
                }
            }
        }, _closeCalendar: function(programatic, ele) {
            if (!ele || ele == this.ele) {
                $(document).unbind('mousedown', this._checkMouse); this._clearCalendar(); $('#dp-popup a').unbind(); $('#dp-popup').empty().remove(); if (!programatic) { $(this.ele).trigger('dpClosed', [this.getSelected()]); }
            }
        }, _clearCalendar: function() { $('.dp-calendar td', this.context).unbind(); $('.dp-calendar', this.context).empty(); }
        }); $.dpConst = { SHOW_HEADER_NONE: 0, SHOW_HEADER_SHORT: 1, SHOW_HEADER_LONG: 2, POS_TOP: 0, POS_BOTTOM: 1, POS_LEFT: 0, POS_RIGHT: 1
        }; $.dpText = { TEXT_PREV_YEAR: 'Previous year', TEXT_PREV_MONTH: 'Previous month', TEXT_NEXT_YEAR: 'Next year', TEXT_NEXT_MONTH: 'Next month', TEXT_CLOSE: 'Close', TEXT_CHOOSE_DATE: 'Choose date'
        }; $.dpVersion = '$Id: jquery.datePicker.js 3739 2007-10-25 13:55:30Z kelvin.luck $'; function _getController(ele) { if (ele._dpId) return $.event._dpCache[ele._dpId]; return false; }; if ($.fn.bgIframe == undefined) { $.fn.bgIframe = function() { return this; }; }; $(window)
.bind('unload', function() {
    var els = $.event._dpCache || []; for (var i in els) { $(els[i].ele)._dpDestroy(); }
});
    })(jQuery); (function($) {
        $.fn.jCarouselLite = function(o) {
            o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, speed: 200, easing: null, vertical: false, circular: true, visible: 3, start: 0, scroll: 1, beforeStart: null, afterEnd: null
            }, o || {}); return this.each(function() {
                var autoInterval; var running = false, animCss = o.vertical ? "top" : "left", sizeCss = o.vertical ? "height" : "width"; var div = $(this), ul = $("ul.li-container", div), tLi = $("li.item", ul), tl = tLi.size(), v = o.visible; if (o.circular) {
                    ul.prepend(tLi.slice(tl - v - 1 + 1).clone())
.append(tLi.slice(0, v).clone()); o.start += v;
                }
                var li = $("li.item", ul), itemLength = li.size(), curr = o.start; div.css("visibility", "visible"); li.css({ overflow: "hidden", float: o.vertical ? "none" : "left" }); ul.css({ margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1" }); div.css({ overflow: "hidden", position: "relative", "z-index": "2", left: "0px" }); var liSize = o.vertical ? height(li) : width(li); var ulSize = liSize * itemLength; var divSize = liSize * v; li.css({ width: li.width(), height: li.height() }); ul.css(sizeCss, ulSize + "px").css(animCss, -(curr * liSize)); div.css(sizeCss, divSize + "px"); if (o.btnPrev)
                    $(o.btnPrev).click(function() { if (o.auto) clearInterval(autoInterval); return go(curr - o.scroll); }); if (o.btnNext)
                    $(o.btnNext).click(function() { if (o.auto) clearInterval(autoInterval); return go(curr + o.scroll); }); if (o.btnGo)
                    $.each(o.btnGo, function(i, val) { $(val).click(function() { return go(o.circular ? o.visible + i : i); }); }); if (o.mouseWheel && div.mousewheel)
                    div.mousewheel(function(e, d) { return d > 0 ? go(curr - o.scroll) : go(curr + o.scroll); }); if (o.auto)
                    autoInterval = setInterval(function() { go(curr + o.scroll); }, o.auto + o.speed); function vis() { return li.slice(curr).slice(0, v); }; function go(to) {
                        if (!running) {
                            if (o.beforeStart)
                                o.beforeStart.call(this, vis()); if (o.circular) { if (to <= o.start - v - 1) { ul.css(animCss, -((itemLength - (v * 2)) * liSize) + "px"); curr = to == o.start - v - 1 ? itemLength - (v * 2) - 1 : itemLength - (v * 2) - o.scroll; } else if (to >= itemLength - v + 1) { ul.css(animCss, -((v) * liSize) + "px"); curr = to == itemLength - v + 1 ? v + 1 : v + o.scroll; } else curr = to; } else { if (to < 0 || to > itemLength - v) return; else curr = to; }
                            running = true; ul.animate(animCss == "left" ? { left: -(curr * liSize)} : { top: -(curr * liSize) }, o.speed, o.easing, function() {
                                if (o.afterEnd)
                                    o.afterEnd.call(this, vis()); running = false;
                            }); if (!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $((curr - o.scroll < 0 && o.btnPrev) || (curr + o.scroll > itemLength - v && o.btnNext) || []).addClass("disabled"); }
                        }
                        return false;
                    };
            });
        }; function css(el, prop) { return parseInt($.css(el[0], prop)) || 0; }; function width(el) { return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); }; function height(el) { return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom'); };
    })(jQuery); Date.dayNames = ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi']; Date.abbrDayNames = ['Paz', 'Pzt', 'Sal', 'Çrş', 'Per', 'Cum', 'Cmt']; Date.monthNames = ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eyl&l', 'Ekim', 'Kasım', 'Aralık']; Date.abbrMonthNames = ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara']; Date.firstDayOfWeek = 1; Date.format = 'dd/mm/yyyy'; Date.fullYearStart = '20'; (function() {
        function add(name, method) {
            if (!Date.prototype[name]) { Date.prototype[name] = method; }
        }; add("isLeapYear", function() { var y = this.getFullYear(); return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0; }); add("isWeekend", function() { return this.getDay() == 0 || this.getDay() == 6; }); add("isWeekDay", function() { return !this.isWeekend(); }); add("getDaysInMonth", function() { return [31, (this.isLeapYear() ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][this.getMonth()]; }); add("getDayName", function(abbreviated) { return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; }); add("getMonthName", function(abbreviated) { return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; }); add("getDayOfYear", function() { var tmpdtm = new Date("1/1/" + this.getFullYear()); return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); }); add("getWeekOfYear", function() { return Math.ceil(this.getDayOfYear() / 7); }); add("setDayOfYear", function(day) { this.setMonth(0); this.setDate(day); return this; }); add("addYears", function(num) { this.setFullYear(this.getFullYear() + num); return this; }); add("addMonths", function(num) {
            var tmpdtm = this.getDate(); this.setMonth(this.getMonth() + num); if (tmpdtm > this.getDate())
                this.addDays(-this.getDate()); return this;
        }); add("addDays", function(num) { this.setDate(this.getDate() + num); return this; }); add("addHours", function(num) { this.setHours(this.getHours() + num); return this; }); add("addMinutes", function(num) { this.setMinutes(this.getMinutes() + num); return this; }); add("addSeconds", function(num) { this.setSeconds(this.getSeconds() + num); return this; }); add("zeroTime", function() { this.setMilliseconds(0); this.setSeconds(0); this.setMinutes(0); this.setHours(0); return this; }); add("asString", function() {
            var r = Date.format; return r
.split('yyyy').join(this.getFullYear())
.split('yy').join((this.getFullYear() + '').substring(2))
.split('mmm').join(this.getMonthName(true))
.split('mm').join(_zeroPad(this.getMonth() + 1))
.split('dd').join(_zeroPad(this.getDate()));
        }); Date.fromString = function(s) {
            var f = Date.format; var d = new Date('01/01/1977'); var iY = f.indexOf('yyyy'); if (iY > -1) { d.setFullYear(Number(s.substr(iY, 4))); } else { d.setFullYear(Number(Date.fullYearStart + s.substr(f.indexOf('yy'), 2))); }
            var iM = f.indexOf('mmm'); if (iM > -1) {
                var mStr = s.substr(iM, 3); for (var i = 0; i < Date.abbrMonthNames.length; i++) { if (Date.abbrMonthNames[i] == mStr) break; }
                d.setMonth(i);
            } else { d.setMonth(Number(s.substr(f.indexOf('mm'), 2)) - 1); }
            d.setDate(Number(s.substr(f.indexOf('dd'), 2))); if (isNaN(d.getTime())) { return false; }
            return d;
        }; var _zeroPad = function(num) {
            var s = '0' + num; return s.substring(s.length - 2)
        };
    })(); (function($) {
        $.fn.jqm = function(o) {
            var p = { overlay: 50, overlayClass: 'jqmOverlay', closeClass: 'jqmClose', trigger: '.jqModal', ajax: F, ajaxText: '', target: F, modal: F, toTop: F, onShow: F, onHide: F, onLoad: F
            }; return this.each(function() { if (this._jqm) return H[this._jqm].c = $.extend({}, H[this._jqm].c, o); s++; this._jqm = s; H[s] = { c: $.extend(p, $.jqm.params, o), a: F, w: $(this).addClass('jqmID' + s), s: s }; if (p.trigger) $(this).jqmAddTrigger(p.trigger); });
        }; $.fn.jqmAddClose = function(e) { return hs(this, e, 'jqmHide'); }; $.fn.jqmAddTrigger = function(e) { return hs(this, e, 'jqmShow'); }; $.fn.jqmShow = function(t) { return this.each(function() { $.jqm.open(this._jqm, t); }); }; $.fn.jqmHide = function(t) { return this.each(function() { $.jqm.close(this._jqm, t) }); }; $.jqm = { hash: {}, open: function(s, t) {
            var h = H[s], c = h.c, cc = '.' + c.closeClass, z = (parseInt(h.w.css('z-index'))), z = (z > 0) ? z : 3000, o = $('<div></div>').css({ height: '100%', width: '100%', position: 'fixed', left: 0, top: 0, 'z-index': z - 1, opacity: c.overlay / 100 }); if (h.a) return F; h.t = t; h.a = true; h.w.css('z-index', z); if (c.modal) { if (!A[0]) L('bind'); A.push(s); }
            else if (c.overlay > 0) h.w.jqmAddClose(o); else o = F; h.o = (o) ? o.addClass(c.overlayClass).prependTo('body') : F; if (ie6) { $('html,body').css({ height: '100%', width: '100%' }); if (o) { o = o.css({ position: 'absolute' })[0]; for (var y in { Top: 1, Left: 1 }) o.style.setExpression(y.toLowerCase(), "(_=(document.documentElement.scroll" + y + " || document.body.scroll" + y + "))+'px'"); } }
            if (c.ajax) { var r = c.target || h.w, u = c.ajax, r = (typeof r == 'string') ? $(r, h.w) : $(r), u = (u.substr(0, 1) == '@') ? $(t).attr(u.substring(1)) : u; r.html(c.ajaxText).load(u, function() { if (c.onLoad) c.onLoad.call(this, h); if (cc) h.w.jqmAddClose($(cc, h.w)); e(h); }); }
            else if (cc) h.w.jqmAddClose($(cc, h.w)); if (c.toTop && h.o) h.w.before('<span id="jqmP' + h.w[0]._jqm + '"></span>').insertAfter(h.o); (c.onShow) ? c.onShow(h) : h.w.show(); e(h); return F;
        }, close: function(s) {
            var h = H[s]; if (!h.a) return F; h.a = F; if (A[0]) { A.pop(); if (!A[0]) L('unbind'); }
            if (h.c.toTop && h.o) $('#jqmP' + h.w[0]._jqm).after(h.w).remove(); if (h.c.onHide) h.c.onHide(h); else { h.w.hide(); if (h.o) h.o.remove(); } return F;
        }, params: {}
        }; var s = 0, H = $.jqm.hash, A = [], ie6 = $.browser.msie && ($.browser.version == "6.0"), F = false, i = $('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({ opacity: 0 }), e = function(h) { if (ie6) if (h.o) h.o.html('<p style="width:100%;height:100%"/>').prepend(i); else if (!$('iframe.jqm', h.w)[0]) h.w.prepend(i); f(h); }, f = function(h) { try { $(':input:visible', h.w)[0].focus(); } catch (_) { } }, L = function(t) { $()[t]("keypress", m)[t]("keydown", m)[t]("mousedown", m); }, m = function(e) { var h = H[A[A.length - 1]], r = (!$(e.target).parents('.jqmID' + h.s)[0]); if (r) f(h); return !r; }, hs = function(w, t, c) { return w.each(function() { var s = this._jqm; $(t).each(function() { if (!this[c]) { this[c] = []; $(this).click(function() { for (var i in { jqmShow: 1, jqmHide: 1 }) for (var s in this[i]) if (H[this[i][s]]) H[this[i][s]].w[i](this); return F; }); } this[c].push(s); }); }); };
    })(jQuery); var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; function ControlVersion() {
        var version; var axo; var e; try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); version = axo.GetVariable("$version"); } catch (e) { }
        if (!version) {
            try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); version = "WIN 6,0,21,0"; axo.AllowScriptAccess = "always"; version = axo.GetVariable("$version"); } catch (e) { }
        }
        if (!version) {
            try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = axo.GetVariable("$version"); } catch (e) { }
        }
        if (!version) {
            try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = "WIN 3,0,18,0"; } catch (e) { }
        }
        if (!version) {
            try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); version = "WIN 2,0,0,11"; } catch (e) { version = -1; }
        }
        return version;
    }
    function GetSwfVer() {
        var flashVer = -1; if (navigator.plugins != null && navigator.plugins.length > 0) {
            if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
                var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; var descArray = flashDescription.split(" "); var tempArrayMajor = descArray[2].split("."); var versionMajor = tempArrayMajor[0]; var versionMinor = tempArrayMajor[1]; var versionRevision = descArray[3]; if (versionRevision == "") { versionRevision = descArray[4]; }
                if (versionRevision[0] == "d") { versionRevision = versionRevision.substring(1); } else if (versionRevision[0] == "r") {
                    versionRevision = versionRevision.substring(1); if (versionRevision.indexOf("d") > 0) { versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); }
                }
                var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
            }
        }
        else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; else if (isIE && isWin && !isOpera) { flashVer = ControlVersion(); }
        return flashVer;
    }
    function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {
        versionStr = GetSwfVer(); if (versionStr == -1) { return false; } else if (versionStr != 0) {
            if (isIE && isWin && !isOpera) { tempArray = versionStr.split(" "); tempString = tempArray[1]; versionArray = tempString.split(","); } else { versionArray = versionStr.split("."); }
            var versionMajor = versionArray[0]; var versionMinor = versionArray[1]; var versionRevision = versionArray[2]; if (versionMajor > parseFloat(reqMajorVer)) { return true; } else if (versionMajor == parseFloat(reqMajorVer)) {
                if (versionMinor > parseFloat(reqMinorVer))
                    return true; else if (versionMinor == parseFloat(reqMinorVer)) {
                    if (versionRevision >= parseFloat(reqRevision))
                        return true;
                }
            }
            return false;
        }
    }
    function AC_AddExtension(src, ext) {
        if (src.indexOf('?') != -1)
            return src.replace(/\?/, ext + '?'); else
            return src + ext;
    }
    function AC_Generateobj(objAttrs, params, embedAttrs) {
        var str = ''; if (isIE && isWin && !isOpera) {
            str += '<object '; for (var i in objAttrs) { str += i + '="' + objAttrs[i] + '" '; }
            str += '>'; for (var i in params) { str += '<param name="' + i + '" value="' + params[i] + '" /> '; }
            str += '</object>';
        }
        else {
            str += '<embed '; for (var i in embedAttrs) { str += i + '="' + embedAttrs[i] + '" '; }
            str += '> </embed>';
        }
        document.write(str);
    }
    function AC_FL_RunContent() {
        var ret = AC_GetArgs
(arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash"); AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
    }
    function AC_SW_RunContent() {
        var ret = AC_GetArgs
(arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000", null); AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
    }
    function AC_GetArgs(args, ext, srcParamName, classid, mimeType) {
        var ret = new Object(); ret.embedAttrs = new Object(); ret.params = new Object(); ret.objAttrs = new Object(); for (var i = 0; i < args.length; i = i + 2) {
            var currArg = args[i].toLowerCase(); switch (currArg) {
                case "classid":
                    break; case "pluginspage":
                    ret.embedAttrs[args[i]] = args[i + 1]; break; case "src":
                case "movie":
                    args[i + 1] = AC_AddExtension(args[i + 1], ext); ret.embedAttrs["src"] = args[i + 1]; ret.params[srcParamName] = args[i + 1]; break; case "onafterupdate":
                case "onbeforeupdate":
                case "onblur":
                case "oncellchange":
                case "onclick":
                case "ondblClick":
                case "ondrag":
                case "ondragend":
                case "ondragenter":
                case "ondragleave":
                case "ondragover":
                case "ondrop":
                case "onfinish":
                case "onfocus":
                case "onhelp":
                case "onmousedown":
                case "onmouseup":
                case "onmouseover":
                case "onmousemove":
                case "onmouseout":
                case "onkeypress":
                case "onkeydown":
                case "onkeyup":
                case "onload":
                case "onlosecapture":
                case "onpropertychange":
                case "onreadystatechange":
                case "onrowsdelete":
                case "onrowenter":
                case "onrowexit":
                case "onrowsinserted":
                case "onstart":
                case "onscroll":
                case "onbeforeeditfocus":
                case "onactivate":
                case "onbeforedeactivate":
                case "ondeactivate":
                case "type":
                case "codebase":
                case "id":
                    ret.objAttrs[args[i]] = args[i + 1]; break; case "width":
                case "height":
                case "align":
                case "vspace":
                case "hspace":
                case "class":
                case "title":
                case "accesskey":
                case "name":
                case "tabindex":
                    ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i + 1]; break; default:
                    ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i + 1];
            }
        }
        ret.objAttrs["classid"] = classid; if (mimeType) ret.embedAttrs["type"] = mimeType; return ret;
    }
    $(document).ready(function() {
        var $photo = $('.header.vertical .photo'); var $img = $('img', $photo); var $info = $('.details .header.vertical .info'); if ($img.width() == 468) { $photo.css('float', 'none'); $info.css('float', 'none').css('margin-top', '10px'); }
        $('.fn').val('Adı'); $('.ln').val('Soyadı'); $('.em').val('Email Adresi'); $('#send-to-friend').jqm({ overlay: 1, trigger: '.sendToFriend' }); $('.fn').focus(function() { if ($(this).val() == 'Adı') $(this).val(''); }).blur(function() { if ($(this).val() == '') $(this).val('Adı'); }); $('.ln').focus(function() { if ($(this).val() == 'Soyadı') $(this).val(''); }).blur(function() { if ($(this).val() == '') $(this).val('Soyadı'); }); $('.em').focus(function() { if ($(this).val() == 'Email Adresi') $(this).val(''); }).blur(function() { if ($(this).val() == '') $(this).val('Email Adresi'); });
    }); function bookmark() {
        var url = window.location.href; var title = 'istanbul.com'; if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) { window.external.AddFavorite(url, title); } else if (navigator.appName == "Netscape") { window.sidebar.addPanel(title, url, ""); } else { }
    }
    function setHome() { document.body.style.behavior = 'url(#default#homepage)'; document.body.setHomePage(window.location.href); }
    function closeBanner() { $("#golge").hide();$("#golge2").hide(); }
    setInterval("closeBanner()", 25000); 
