(function () { var _jquery = window.jquery, _$ = window.$; var jquery = window.jquery = window.$ = function (selector, context) { return new jquery.fn.init(selector, context); }; var quickexpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, issimple = /^.[^:#\[\.]*$/, undefined; jquery.fn = jquery.prototype = { init: function (selector, context) { selector = selector || document; if (selector.nodetype) { this[0] = selector; this.length = 1; return this; } if (typeof selector == "string") { var match = quickexpr.exec(selector); if (match && (match[1] || !context)) { if (match[1]) selector = jquery.clean([match[1]], context); else { var elem = document.getelementbyid(match[3]); if (elem) { if (elem.id != match[3]) return jquery().find(selector); return jquery(elem); } selector = []; } } else return jquery(context).find(selector); } else if (jquery.isfunction(selector)) return jquery(document)[jquery.fn.ready ? "ready" : "load"](selector); return this.setarray(jquery.makearray(selector)); }, jquery: "1.2.6", size: function () { return this.length; }, length: 0, get: function (num) { return num == undefined ? jquery.makearray(this) : this[num]; }, pushstack: function (elems) { var ret = jquery(elems); ret.prevobject = this; return ret; }, setarray: function (elems) { this.length = 0; array.prototype.push.apply(this, elems); return this; }, each: function (callback, args) { return jquery.each(this, callback, args); }, index: function (elem) { var ret = -1; return jquery.inarray(elem && elem.jquery ? elem[0] : elem, this); }, attr: function (name, value, type) { var options = name; if (name.constructor == string) if (value === undefined) return this[0] && jquery[type || "attr"](this[0], name); else { options = {}; options[name] = value; } return this.each(function (i) { for (name in options) jquery.attr(type ? this.style : this, name, jquery.prop(this, options[name], type, i, name)); }); }, css: function (key, value) { if ((key == 'width' || key == 'height') && parsefloat(value) < 0) value = undefined; return this.attr(key, value, "curcss"); }, text: function (text) { if (typeof text != "object" && text != null) return this.empty().append((this[0] && this[0].ownerdocument || document).createtextnode(text)); var ret = ""; jquery.each(text || this, function () { jquery.each(this.childnodes, function () { if (this.nodetype != 8) ret += this.nodetype != 1 ? this.nodevalue : jquery.fn.text([this]); }); }); return ret; }, wrapall: function (html) { if (this[0]) jquery(html, this[0].ownerdocument).clone().insertbefore(this[0]).map(function () { var elem = this; while (elem.firstchild) elem = elem.firstchild; return elem; }).append(this); return this; }, wrapinner: function (html) { return this.each(function () { jquery(this).contents().wrapall(html); }); }, wrap: function (html) { return this.each(function () { jquery(this).wrapall(html); }); }, append: function () { return this.dommanip(arguments, true, false, function (elem) { if (this.nodetype == 1) this.appendchild(elem); }); }, prepend: function () { return this.dommanip(arguments, true, true, function (elem) { if (this.nodetype == 1) this.insertbefore(elem, this.firstchild); }); }, before: function () { return this.dommanip(arguments, false, false, function (elem) { this.parentnode.insertbefore(elem, this); }); }, after: function () { return this.dommanip(arguments, false, true, function (elem) { this.parentnode.insertbefore(elem, this.nextsibling); }); }, end: function () { return this.prevobject || jquery([]); }, find: function (selector) { var elems = jquery.map(this, function (elem) { return jquery.find(selector, elem); }); return this.pushstack(/[^+>] [^+>]/.test(selector) || selector.indexof("..") > -1 ? jquery.unique(elems) : elems); }, clone: function (events) { var ret = this.map(function () { if (jquery.browser.msie && !jquery.isxmldoc(this)) { var clone = this.clonenode(true), container = document.createelement("div"); container.appendchild(clone); return jquery.clean([container.innerhtml])[0]; } else return this.clonenode(true); }); var clone = ret.find("*").andself().each(function () { if (this[expando] != undefined) this[expando] = null; }); if (events === true) this.find("*").andself().each(function (i) { if (this.nodetype == 3) return; var events = jquery.data(this, "events"); for (var type in events) for (var handler in events[type]) jquery.event.add(clone[i], type, events[type][handler], events[type][handler].data); }); return ret; }, filter: function (selector) { return this.pushstack(jquery.isfunction(selector) && jquery.grep(this, function (elem, i) { return selector.call(elem, i); }) || jquery.multifilter(selector, this)); }, not: function (selector) { if (selector.constructor == string) if (issimple.test(selector)) return this.pushstack(jquery.multifilter(selector, this, true)); else selector = jquery.multifilter(selector, this); var isarraylike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodetype; return this.filter(function () { return isarraylike ? jquery.inarray(this, selector) < 0 : this != selector; }); }, add: function (selector) { return this.pushstack(jquery.unique(jquery.merge(this.get(), typeof selector == 'string' ? jquery(selector) : jquery.makearray(selector)))); }, is: function (selector) { return !!selector && jquery.multifilter(selector, this).length > 0; }, hasclass: function (selector) { return this.is("." + selector); }, val: function (value) { if (value == undefined) { if (this.length) { var elem = this[0]; if (jquery.nodename(elem, "select")) { var index = elem.selectedindex, values = [], options = elem.options, one = elem.type == "select-one"; if (index < 0) return null; for (var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++) { var option = options[i]; if (option.selected) { value = jquery.browser.msie && !option.attributes.value.specified ? option.text : option.value; if (one) return value; values.push(value); } } return values; } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if (value.constructor == number) value += ''; return this.each(function () { if (this.nodetype != 1) return; if (value.constructor == array && /radio|checkbox/.test(this.type)) this.checked = (jquery.inarray(this.value, value) >= 0 || jquery.inarray(this.name, value) >= 0); else if (jquery.nodename(this, "select")) { var values = jquery.makearray(value); jquery("option", this).each(function () { this.selected = (jquery.inarray(this.value, values) >= 0 || jquery.inarray(this.text, values) >= 0); }); if (!values.length) this.selectedindex = -1; } else this.value = value; }); }, html: function (value) { return value == undefined ? (this[0] ? this[0].innerhtml : null) : this.empty().append(value); }, replacewith: function (value) { return this.after(value).remove(); }, eq: function (i) { return this.slice(i, i + 1); }, slice: function () { return this.pushstack(array.prototype.slice.apply(this, arguments)); }, map: function (callback) { return this.pushstack(jquery.map(this, function (elem, i) { return callback.call(elem, i, elem); })); }, andself: function () { return this.add(this.prevobject); }, data: function (key, value) { var parts = key.split("."); parts[1] = parts[1] ? "." + parts[1] : ""; if (value === undefined) { var data = this.triggerhandler("getdata" + parts[1] + "!", [parts[0]]); if (data === undefined && this.length) data = jquery.data(this[0], key); return data === undefined && parts[1] ? this.data(parts[0]) : data; } else return this.trigger("setdata" + parts[1] + "!", [parts[0], value]).each(function () { jquery.data(this, key, value); }); }, removedata: function (key) { return this.each(function () { jquery.removedata(this, key); }); }, dommanip: function (args, table, reverse, callback) { var clone = this.length > 1, elems; return this.each(function () { if (!elems) { elems = jquery.clean(args, this.ownerdocument); if (reverse) elems.reverse(); } var obj = this; if (table && jquery.nodename(this, "table") && jquery.nodename(elems[0], "tr")) obj = this.getelementsbytagname("tbody")[0] || this.appendchild(this.ownerdocument.createelement("tbody")); var scripts = jquery([]); jquery.each(elems, function () { var elem = clone ? jquery(this).clone(true)[0] : this; if (jquery.nodename(elem, "script")) scripts = scripts.add(elem); else { if (elem.nodetype == 1) scripts = scripts.add(jquery("script", elem).remove()); callback.call(obj, elem); } }); scripts.each(evalscript); }); } }; jquery.fn.init.prototype = jquery.fn; function evalscript(i, elem) { if (elem.src) jquery.ajax({ url: elem.src, async: false, datatype: "script" }); else jquery.globaleval(elem.text || elem.textcontent || elem.innerhtml || ""); if (elem.parentnode) elem.parentnode.removechild(elem); } function now() { return +new date; } jquery.extend = jquery.fn.extend = function () { var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; if (target.constructor == boolean) { deep = target; target = arguments[1] || {}; i = 2; } if (typeof target != "object" && typeof target != "function") target = {}; if (length == i) { target = this; --i; } for (; i < length; i++) if ((options = arguments[i]) != null) for (var name in options) { var src = target[name], copy = options[name]; if (target === copy) continue; if (deep && copy && typeof copy == "object" && !copy.nodetype) target[name] = jquery.extend(deep, src || (copy.length != null ? [] : {}), copy); else if (copy !== undefined) target[name] = copy; } return target; }; var expando = "jquery" + now(), uuid = 0, windowdata = {}, exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, defaultview = document.defaultview || {}; jquery.extend({ noconflict: function (deep) { window.$ = _$; if (deep) window.jquery = _jquery; return jquery; }, isfunction: function (fn) { return !!fn && typeof fn != "string" && !fn.nodename && fn.constructor != array && /^[\s[]?function/.test(fn + ""); }, isxmldoc: function (elem) { return elem.documentelement && !elem.body || elem.tagname && elem.ownerdocument && !elem.ownerdocument.body; }, globaleval: function (data) { data = jquery.trim(data); if (data) { var head = document.getelementsbytagname("head")[0] || document.documentelement, script = document.createelement("script"); script.type = "text/javascript"; if (jquery.browser.msie) script.text = data; else script.appendchild(document.createtextnode(data)); head.insertbefore(script, head.firstchild); head.removechild(script); } }, nodename: function (elem, name) { return elem.nodename && elem.nodename.touppercase() == name.touppercase(); }, cache: {}, data: function (elem, name, data) { elem = elem == window ? windowdata : elem; var id = elem[expando]; if (!id) id = elem[expando] = ++uuid; if (name && !jquery.cache[id]) jquery.cache[id] = {}; if (data !== undefined) jquery.cache[id][name] = data; return name ? jquery.cache[id][name] : id; }, removedata: function (elem, name) { elem = elem == window ? windowdata : elem; var id = elem[expando]; if (name) { if (jquery.cache[id]) { delete jquery.cache[id][name]; name = ""; for (name in jquery.cache[id]) break; if (!name) jquery.removedata(elem); } } else { try { delete elem[expando]; } catch (e) { if (elem.removeattribute) elem.removeattribute(expando); } delete jquery.cache[id]; } }, each: function (object, callback, args) { var name, i = 0, length = object.length; if (args) { if (length == undefined) { for (name in object) if (callback.apply(object[name], args) === false) break; } else for (; i < length; ) if (callback.apply(object[i++], args) === false) break; } else { if (length == undefined) { for (name in object) if (callback.call(object[name], name, object[name]) === false) break; } else for (var value = object[0]; i < length && callback.call(value, i, value) !== false; value = object[++i]) { } } return object; }, prop: function (elem, value, type, i, name) { if (jquery.isfunction(value)) value = value.call(elem, i); return value && value.constructor == number && type == "curcss" && !exclude.test(name) ? value + "px" : value; }, classname: { add: function (elem, classnames) { jquery.each((classnames || "").split(/\s+/), function (i, classname) { if (elem.nodetype == 1 && !jquery.classname.has(elem.classname, classname)) elem.classname += (elem.classname ? " " : "") + classname; }); }, remove: function (elem, classnames) { if (elem.nodetype == 1) elem.classname = classnames != undefined ? jquery.grep(elem.classname.split(/\s+/), function (classname) { return !jquery.classname.has(classnames, classname); }).join(" ") : ""; }, has: function (elem, classname) { return jquery.inarray(classname, (elem.classname || elem).tostring().split(/\s+/)) > -1; } }, swap: function (elem, options, callback) { var old = {}; for (var name in options) { old[name] = elem.style[name]; elem.style[name] = options[name]; } callback.call(elem); for (var name in options) elem.style[name] = old[name]; }, css: function (elem, name, force) { if (name == "width" || name == "height") { var val, props = { position: "absolute", visibility: "hidden", display: "block" }, which = name == "width" ? ["left", "right"] : ["top", "bottom"]; function getwh() { val = name == "width" ? elem.offsetwidth : elem.offsetheight; var padding = 0, border = 0; jquery.each(which, function () { padding += parsefloat(jquery.curcss(elem, "padding" + this, true)) || 0; border += parsefloat(jquery.curcss(elem, "border" + this + "width", true)) || 0; }); val -= math.round(padding + border); } if (jquery(elem).is(":visible")) getwh(); else jquery.swap(elem, props, getwh); return math.max(0, val); } return jquery.curcss(elem, name, force); }, curcss: function (elem, name, force) { var ret, style = elem.style; function color(elem) { if (!jquery.browser.safari) return false; var ret = defaultview.getcomputedstyle(elem, null); return !ret || ret.getpropertyvalue("color") == ""; } if (name == "opacity" && jquery.browser.msie) { ret = jquery.attr(style, "opacity"); return ret == "" ? "1" : ret; } if (jquery.browser.opera && name == "display") { var save = style.outline; style.outline = "0 solid black"; style.outline = save; } if (name.match(/float/i)) name = stylefloat; if (!force && style && style[name]) ret = style[name]; else if (defaultview.getcomputedstyle) { if (name.match(/float/i)) name = "float"; name = name.replace(/([a-z])/g, "-$1").tolowercase(); var computedstyle = defaultview.getcomputedstyle(elem, null); if (computedstyle && !color(elem)) ret = computedstyle.getpropertyvalue(name); else { var swap = [], stack = [], a = elem, i = 0; for (; a && color(a); a = a.parentnode) stack.unshift(a); for (; i < stack.length; i++) if (color(stack[i])) { swap[i] = stack[i].style.display; stack[i].style.display = "block"; } ret = name == "display" && swap[stack.length - 1] != null ? "none" : (computedstyle && computedstyle.getpropertyvalue(name)) || ""; for (i = 0; i < swap.length; i++) if (swap[i] != null) stack[i].style.display = swap[i]; } if (name == "opacity" && ret == "") ret = "1"; } else if (elem.currentstyle) { var camelcase = name.replace(/\-(\w)/g, function (all, letter) { return letter.touppercase(); }); ret = elem.currentstyle[name] || elem.currentstyle[camelcase]; if (!/^\d+(px)?$/i.test(ret) && /^\d/.test(ret)) { var left = style.left, rsleft = elem.runtimestyle.left; elem.runtimestyle.left = elem.currentstyle.left; style.left = ret || 0; ret = style.pixelleft + "px"; style.left = left; elem.runtimestyle.left = rsleft; } } return ret; }, clean: function (elems, context) { var ret = []; context = context || document; if (typeof context.createelement == 'undefined') context = context.ownerdocument || context[0] && context[0].ownerdocument || document; jquery.each(elems, function (i, elem) { if (!elem) return; if (elem.constructor == number) elem += ''; if (typeof elem == "string") { elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function (all, front, tag) { return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? all : front + ">"; }); var tags = jquery.trim(elem).tolowercase(), div = context.createelement("div"); var wrap = !tags.indexof("", ""] || !tags.indexof("", ""] || tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && [1, "", "
"] || !tags.indexof("", ""] || (!tags.indexof("", ""] || !tags.indexof("", ""] || jquery.browser.msie && [1, "div
", "
"] || [0, "", ""]; div.innerhtml = wrap[1] + elem + wrap[2]; while (wrap[0]--) div = div.lastchild; if (jquery.browser.msie) { var tbody = !tags.indexof("" && tags.indexof("= 0; --j) if (jquery.nodename(tbody[j], "tbody") && !tbody[j].childnodes.length) tbody[j].parentnode.removechild(tbody[j]); if (/^\s/.test(elem)) div.insertbefore(context.createtextnode(elem.match(/^\s*/)[0]), div.firstchild); } elem = jquery.makearray(div.childnodes); } if (elem.length === 0 && (!jquery.nodename(elem, "form") && !jquery.nodename(elem, "select"))) return; if (elem[0] == undefined || jquery.nodename(elem, "form") || elem.options) ret.push(elem); else ret = jquery.merge(ret, elem); }); return ret; }, attr: function (elem, name, value) { if (!elem || elem.nodetype == 3 || elem.nodetype == 8) return undefined; var notxml = !jquery.isxmldoc(elem), set = value !== undefined, msie = jquery.browser.msie; name = notxml && jquery.props[name] || name; if (elem.tagname) { var special = /href|src|style/.test(name); if (name == "selected" && jquery.browser.safari) elem.parentnode.selectedindex; if (name in elem && notxml && !special) { if (set) { if (name == "type" && jquery.nodename(elem, "input") && elem.parentnode) throw "type property can't be changed"; elem[name] = value; } if (jquery.nodename(elem, "form") && elem.getattributenode(name)) return elem.getattributenode(name).nodevalue; return elem[name]; } if (msie && notxml && name == "style") return jquery.attr(elem.style, "csstext", value); if (set) elem.setattribute(name, "" + value); var attr = msie && notxml && special ? elem.getattribute(name, 2) : elem.getattribute(name); return attr === null ? undefined : attr; } if (msie && name == "opacity") { if (set) { elem.zoom = 1; elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/, "") + (parseint(value) + '' == "nan" ? "" : "alpha(opacity=" + value * 100 + ")"); } return elem.filter && elem.filter.indexof("opacity=") >= 0 ? (parsefloat(elem.filter.match(/opacity=([^)]*)/)[1]) / 100) + '' : ""; } name = name.replace(/-([a-z])/ig, function (all, letter) { return letter.touppercase(); }); if (set) elem[name] = value; return elem[name]; }, trim: function (text) { return (text || "").replace(/^\s+|\s+$/g, ""); }, makearray: function (array) { var ret = []; if (array != null) { var i = array.length; if (i == null || array.split || array.setinterval || array.call) ret[0] = array; else while (i) ret[--i] = array[i]; } return ret; }, inarray: function (elem, array) { for (var i = 0, length = array.length; i < length; i++) if (array[i] === elem) return i; return -1; }, merge: function (first, second) { var i = 0, elem, pos = first.length; if (jquery.browser.msie) { while (elem = second[i++]) if (elem.nodetype != 8) first[pos++] = elem; } else while (elem = second[i++]) first[pos++] = elem; return first; }, unique: function (array) { var ret = [], done = {}; try { for (var i = 0, length = array.length; i < length; i++) { var id = jquery.data(array[i]); if (!done[id]) { done[id] = true; ret.push(array[i]); } } } catch (e) { ret = array; } return ret; }, grep: function (elems, callback, inv) { var ret = []; for (var i = 0, length = elems.length; i < length; i++) if (!inv != !callback(elems[i], i)) ret.push(elems[i]); return ret; }, map: function (elems, callback) { var ret = []; for (var i = 0, length = elems.length; i < length; i++) { var value = callback(elems[i], i); if (value != null) ret[ret.length] = value; } return ret.concat.apply([], ret); } }); var useragent = navigator.useragent.tolowercase(); jquery.browser = { version: (useragent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], safari: /webkit/.test(useragent), opera: /opera/.test(useragent), msie: /msie/.test(useragent) && !/opera/.test(useragent), mozilla: /mozilla/.test(useragent) && !/(compatible|webkit)/.test(useragent) }; var stylefloat = jquery.browser.msie ? "stylefloat" : "cssfloat"; jquery.extend({ boxmodel: !jquery.browser.msie || document.compatmode == "css1compat", props: { "for": "htmlfor", "class": "classname", "float": stylefloat, cssfloat: stylefloat, stylefloat: stylefloat, readonly: "readonly", maxlength: "maxlength", cellspacing: "cellspacing"} }); jquery.each({ parent: function (elem) { return elem.parentnode; }, parents: function (elem) { return jquery.dir(elem, "parentnode"); }, next: function (elem) { return jquery.nth(elem, 2, "nextsibling"); }, prev: function (elem) { return jquery.nth(elem, 2, "previoussibling"); }, nextall: function (elem) { return jquery.dir(elem, "nextsibling"); }, prevall: function (elem) { return jquery.dir(elem, "previoussibling"); }, siblings: function (elem) { return jquery.sibling(elem.parentnode.firstchild, elem); }, children: function (elem) { return jquery.sibling(elem.firstchild); }, contents: function (elem) { return jquery.nodename(elem, "iframe") ? elem.contentdocument || elem.contentwindow.document : jquery.makearray(elem.childnodes); } }, function (name, fn) { jquery.fn[name] = function (selector) { var ret = jquery.map(this, fn); if (selector && typeof selector == "string") ret = jquery.multifilter(selector, ret); return this.pushstack(jquery.unique(ret)); }; }); jquery.each({ appendto: "append", prependto: "prepend", insertbefore: "before", insertafter: "after", replaceall: "replacewith" }, function (name, original) { jquery.fn[name] = function () { var args = arguments; return this.each(function () { for (var i = 0, length = args.length; i < length; i++) jquery(args[i])[original](this); }); }; }); jquery.each({ removeattr: function (name) { jquery.attr(this, name, ""); if (this.nodetype == 1) this.removeattribute(name); }, addclass: function (classnames) { jquery.classname.add(this, classnames); }, removeclass: function (classnames) { jquery.classname.remove(this, classnames); }, toggleclass: function (classnames) { jquery.classname[jquery.classname.has(this, classnames) ? "remove" : "add"](this, classnames); }, remove: function (selector) { if (!selector || jquery.filter(selector, [this]).r.length) { jquery("*", this).add(this).each(function () { jquery.event.remove(this); jquery.removedata(this); }); if (this.parentnode) this.parentnode.removechild(this); } }, empty: function () { jquery(">*", this).remove(); while (this.firstchild) this.removechild(this.firstchild); } }, function (name, fn) { jquery.fn[name] = function () { return this.each(fn, arguments); }; }); jquery.each(["height", "width"], function (i, name) { var type = name.tolowercase(); jquery.fn[type] = function (size) { return this[0] == window ? jquery.browser.opera && document.body["client" + name] || jquery.browser.safari && window["inner" + name] || document.compatmode == "css1compat" && document.documentelement["client" + name] || document.body["client" + name] : this[0] == document ? math.max(math.max(document.body["scroll" + name], document.documentelement["scroll" + name]), math.max(document.body["offset" + name], document.documentelement["offset" + name])) : size == undefined ? (this.length ? jquery.css(this[0], type) : null) : this.css(type, size.constructor == string ? size : size + "px"); }; }); function num(elem, prop) { return elem[0] && parseint(jquery.curcss(elem[0], prop, true), 10) || 0; } var chars = jquery.browser.safari && parseint(jquery.browser.version) < 417 ? "(?:[\\w*_-]|\\\\.)" : "(?:[\\w\u0128-\uffff*_-]|\\\\.)", quickchild = new regexp("^>\\s*(" + chars + "+)"), quickid = new regexp("^(" + chars + "+)(#)(" + chars + "+)"), quickclass = new regexp("^([#.]?)(" + chars + "*)"); jquery.extend({ expr: { "": function (a, i, m) { return m[2] == "*" || jquery.nodename(a, m[2]); }, "#": function (a, i, m) { return a.getattribute("id") == m[2]; }, ":": { lt: function (a, i, m) { return i < m[3] - 0; }, gt: function (a, i, m) { return i > m[3] - 0; }, nth: function (a, i, m) { return m[3] - 0 == i; }, eq: function (a, i, m) { return m[3] - 0 == i; }, first: function (a, i) { return i == 0; }, last: function (a, i, m, r) { return i == r.length - 1; }, even: function (a, i) { return i % 2 == 0; }, odd: function (a, i) { return i % 2; }, "first-child": function (a) { return a.parentnode.getelementsbytagname("*")[0] == a; }, "last-child": function (a) { return jquery.nth(a.parentnode.lastchild, 1, "previoussibling") == a; }, "only-child": function (a) { return !jquery.nth(a.parentnode.lastchild, 2, "previoussibling"); }, parent: function (a) { return a.firstchild; }, empty: function (a) { return !a.firstchild; }, contains: function (a, i, m) { return (a.textcontent || a.innertext || jquery(a).text() || "").indexof(m[3]) >= 0; }, visible: function (a) { return "hidden" != a.type && jquery.css(a, "display") != "none" && jquery.css(a, "visibility") != "hidden"; }, hidden: function (a) { return "hidden" == a.type || jquery.css(a, "display") == "none" || jquery.css(a, "visibility") == "hidden"; }, enabled: function (a) { return !a.disabled; }, disabled: function (a) { return a.disabled; }, checked: function (a) { return a.checked; }, selected: function (a) { return a.selected || jquery.attr(a, "selected"); }, text: function (a) { return "text" == a.type; }, radio: function (a) { return "radio" == a.type; }, checkbox: function (a) { return "checkbox" == a.type; }, file: function (a) { return "file" == a.type; }, password: function (a) { return "password" == a.type; }, submit: function (a) { return "submit" == a.type; }, image: function (a) { return "image" == a.type; }, reset: function (a) { return "reset" == a.type; }, button: function (a) { return "button" == a.type || jquery.nodename(a, "button"); }, input: function (a) { return /input|select|textarea|button/i.test(a.nodename); }, has: function (a, i, m) { return jquery.find(m[3], a).length; }, header: function (a) { return /h\d/i.test(a.nodename); }, animated: function (a) { return jquery.grep(jquery.timers, function (fn) { return a == fn.elem; }).length; } } }, parse: [/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/, /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/, new regexp("^([:.#]*)(" + chars + "+)")], multifilter: function (expr, elems, not) { var old, cur = []; while (expr && expr != old) { old = expr; var f = jquery.filter(expr, elems, not); expr = f.t.replace(/^\s*,\s*/, ""); cur = not ? elems = f.r : jquery.merge(cur, f.r); } return cur; }, find: function (t, context) { if (typeof t != "string") return [t]; if (context && context.nodetype != 1 && context.nodetype != 9) return []; context = context || document; var ret = [context], done = [], last, nodename; while (t && last != t) { var r = []; last = t; t = jquery.trim(t); var foundtoken = false, re = quickchild, m = re.exec(t); if (m) { nodename = m[1].touppercase(); for (var i = 0; ret[i]; i++) for (var c = ret[i].firstchild; c; c = c.nextsibling) if (c.nodetype == 1 && (nodename == "*" || c.nodename.touppercase() == nodename)) r.push(c); ret = r; t = t.replace(re, ""); if (t.indexof(" ") == 0) continue; foundtoken = true; } else { re = /^([>+~])\s*(\w*)/i; if ((m = re.exec(t)) != null) { r = []; var merge = {}; nodename = m[2].touppercase(); m = m[1]; for (var j = 0, rl = ret.length; j < rl; j++) { var n = m == "~" || m == "+" ? ret[j].nextsibling : ret[j].firstchild; for (; n; n = n.nextsibling) if (n.nodetype == 1) { var id = jquery.data(n); if (m == "~" && merge[id]) break; if (!nodename || n.nodename.touppercase() == nodename) { if (m == "~") merge[id] = true; r.push(n); } if (m == "+") break; } } ret = r; t = jquery.trim(t.replace(re, "")); foundtoken = true; } } if (t && !foundtoken) { if (!t.indexof(",")) { if (context == ret[0]) ret.shift(); done = jquery.merge(done, ret); r = ret = [context]; t = " " + t.substr(1, t.length); } else { var re2 = quickid; var m = re2.exec(t); if (m) { m = [0, m[2], m[3], m[1]]; } else { re2 = quickclass; m = re2.exec(t); } m[2] = m[2].replace(/\\/g, ""); var elem = ret[ret.length - 1]; if (m[1] == "#" && elem && elem.getelementbyid && !jquery.isxmldoc(elem)) { var oid = elem.getelementbyid(m[2]); if ((jquery.browser.msie || jquery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2]) oid = jquery('[@id="' + m[2] + '"]', elem)[0]; ret = r = oid && (!m[3] || jquery.nodename(oid, m[3])) ? [oid] : []; } else { for (var i = 0; ret[i]; i++) { var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2]; if (tag == "*" && ret[i].nodename.tolowercase() == "object") tag = "param"; r = jquery.merge(r, ret[i].getelementsbytagname(tag)); } if (m[1] == ".") r = jquery.classfilter(r, m[2]); if (m[1] == "#") { var tmp = []; for (var i = 0; r[i]; i++) if (r[i].getattribute("id") == m[2]) { tmp = [r[i]]; break; } r = tmp; } ret = r; } t = t.replace(re2, ""); } } if (t) { var val = jquery.filter(t, r); ret = r = val.r; t = jquery.trim(val.t); } } if (t) ret = []; if (ret && context == ret[0]) ret.shift(); done = jquery.merge(done, ret); return done; }, classfilter: function (r, m, not) { m = " " + m + " "; var tmp = []; for (var i = 0; r[i]; i++) { var pass = (" " + r[i].classname + " ").indexof(m) >= 0; if (!not && pass || not && !pass) tmp.push(r[i]); } return tmp; }, filter: function (t, r, not) { var last; while (t && t != last) { last = t; var p = jquery.parse, m; for (var i = 0; p[i]; i++) { m = p[i].exec(t); if (m) { t = t.substring(m[0].length); m[2] = m[2].replace(/\\/g, ""); break; } } if (!m) break; if (m[1] == ":" && m[2] == "not") r = issimple.test(m[3]) ? jquery.filter(m[3], r, true).r : jquery(r).not(m[3]); else if (m[1] == ".") r = jquery.classfilter(r, m[2], not); else if (m[1] == "[") { var tmp = [], type = m[3]; for (var i = 0, rl = r.length; i < rl; i++) { var a = r[i], z = a[jquery.props[m[2]] || m[2]]; if (z == null || /href|src|selected/.test(m[2])) z = jquery.attr(a, m[2]) || ''; if ((type == "" && !!z || type == "=" && z == m[5] || type == "!=" && z != m[5] || type == "^=" && z && !z.indexof(m[5]) || type == "$=" && z.substr(z.length - m[5].length) == m[5] || (type == "*=" || type == "~=") && z.indexof(m[5]) >= 0) ^ not) tmp.push(a); } r = tmp; } else if (m[1] == ":" && m[2] == "nth-child") { var merge = {}, tmp = [], test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" || !/\d/.test(m[3]) && "0n+" + m[3] || m[3]), first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0; for (var i = 0, rl = r.length; i < rl; i++) { var node = r[i], parentnode = node.parentnode, id = jquery.data(parentnode); if (!merge[id]) { var c = 1; for (var n = parentnode.firstchild; n; n = n.nextsibling) if (n.nodetype == 1) n.nodeindex = c++; merge[id] = true; } var add = false; if (first == 0) { if (node.nodeindex == last) add = true; } else if ((node.nodeindex - last) % first == 0 && (node.nodeindex - last) / first >= 0) add = true; if (add ^ not) tmp.push(node); } r = tmp; } else { var fn = jquery.expr[m[1]]; if (typeof fn == "object") fn = fn[m[2]]; if (typeof fn == "string") fn = eval("false||function(a,i){return " + fn + ";}"); r = jquery.grep(r, function (elem, i) { return fn(elem, i, m, r); }, not); } } return { r: r, t: t }; }, dir: function (elem, dir) { var matched = [], cur = elem[dir]; while (cur && cur != document) { if (cur.nodetype == 1) matched.push(cur); cur = cur[dir]; } return matched; }, nth: function (cur, result, dir, elem) { result = result || 1; var num = 0; for (; cur; cur = cur[dir]) if (cur.nodetype == 1 && ++num == result) break; return cur; }, sibling: function (n, elem) { var r = []; for (; n; n = n.nextsibling) { if (n.nodetype == 1 && n != elem) r.push(n); } return r; } }); jquery.event = { add: function (elem, types, handler, data) { if (elem.nodetype == 3 || elem.nodetype == 8) return; if (jquery.browser.msie && elem.setinterval) elem = window; if (!handler.guid) handler.guid = this.guid++; if (data != undefined) { var fn = handler; handler = this.proxy(fn, function () { return fn.apply(this, arguments); }); handler.data = data; } var events = jquery.data(elem, "events") || jquery.data(elem, "events", {}), handle = jquery.data(elem, "handle") || jquery.data(elem, "handle", function () { if (typeof jquery != "undefined" && !jquery.event.triggered) return jquery.event.handle.apply(arguments.callee.elem, arguments); }); handle.elem = elem; jquery.each(types.split(/\s+/), function (index, type) { var parts = type.split("."); type = parts[0]; handler.type = parts[1]; var handlers = events[type]; if (!handlers) { handlers = events[type] = {}; if (!jquery.event.special[type] || jquery.event.special[type].setup.call(elem) === false) { if (elem.addeventlistener) elem.addeventlistener(type, handle, false); else if (elem.attachevent) elem.attachevent("on" + type, handle); } } handlers[handler.guid] = handler; jquery.event.global[type] = true; }); elem = null; }, guid: 1, global: {}, remove: function (elem, types, handler) { if (elem.nodetype == 3 || elem.nodetype == 8) return; var events = jquery.data(elem, "events"), ret, index; if (events) { if (types == undefined || (typeof types == "string" && types.charat(0) == ".")) for (var type in events) this.remove(elem, type + (types || "")); else { if (types.type) { handler = types.handler; types = types.type; } jquery.each(types.split(/\s+/), function (index, type) { var parts = type.split("."); type = parts[0]; if (events[type]) { if (handler) delete events[type][handler.guid]; else for (handler in events[type]) if (!parts[1] || events[type][handler].type == parts[1]) delete events[type][handler]; for (ret in events[type]) break; if (!ret) { if (!jquery.event.special[type] || jquery.event.special[type].teardown.call(elem) === false) { if (elem.removeeventlistener) elem.removeeventlistener(type, jquery.data(elem, "handle"), false); else if (elem.detachevent) elem.detachevent("on" + type, jquery.data(elem, "handle")); } ret = null; delete events[type]; } } }); } for (ret in events) break; if (!ret) { var handle = jquery.data(elem, "handle"); if (handle) handle.elem = null; jquery.removedata(elem, "events"); jquery.removedata(elem, "handle"); } } }, trigger: function (type, data, elem, donative, extra) { data = jquery.makearray(data); if (type.indexof("!") >= 0) { type = type.slice(0, -1); var exclusive = true; } if (!elem) { if (this.global[type]) jquery("*").add([window, document]).trigger(type, data); } else { if (elem.nodetype == 3 || elem.nodetype == 8) return undefined; var val, ret, fn = jquery.isfunction(elem[type] || null), event = !data[0] || !data[0].preventdefault; if (event) { data.unshift({ type: type, target: elem, preventdefault: function () { }, stoppropagation: function () { }, timestamp: now() }); data[0][expando] = true; } data[0].type = type; if (exclusive) data[0].exclusive = true; var handle = jquery.data(elem, "handle"); if (handle) val = handle.apply(elem, data); if ((!fn || (jquery.nodename(elem, 'a') && type == "click")) && elem["on" + type] && elem["on" + type].apply(elem, data) === false) val = false; if (event) data.shift(); if (extra && jquery.isfunction(extra)) { ret = extra.apply(elem, val == null ? data : data.concat(val)); if (ret !== undefined) val = ret; } if (fn && donative !== false && val !== false && !(jquery.nodename(elem, 'a') && type == "click")) { this.triggered = true; try { elem[type](); } catch (e) { } } this.triggered = false; } return val; }, handle: function (event) { var val, ret, namespace, all, handlers; event = arguments[0] = jquery.event.fix(event || window.event); namespace = event.type.split("."); event.type = namespace[0]; namespace = namespace[1]; all = !namespace && !event.exclusive; handlers = (jquery.data(this, "events") || {})[event.type]; for (var j in handlers) { var handler = handlers[j]; if (all || handler.type == namespace) { event.handler = handler; event.data = handler.data; ret = handler.apply(this, arguments); if (val !== false) val = ret; if (ret === false) { event.preventdefault(); event.stoppropagation(); } } } return val; }, fix: function (event) { if (event[expando] == true) return event; var originalevent = event; event = { originalevent: originalevent }; var props = "altkey attrchange attrname bubbles button cancelable charcode clientx clienty ctrlkey currenttarget data detail eventphase fromelement handler keycode metakey newvalue originaltarget pagex pagey prevvalue relatednode relatedtarget screenx screeny shiftkey srcelement target timestamp toelement type view wheeldelta which".split(" "); for (var i = props.length; i; i--) event[props[i]] = originalevent[props[i]]; event[expando] = true; event.preventdefault = function () { if (originalevent.preventdefault) originalevent.preventdefault(); originalevent.returnvalue = false; }; event.stoppropagation = function () { if (originalevent.stoppropagation) originalevent.stoppropagation(); originalevent.cancelbubble = true; }; event.timestamp = event.timestamp || now(); if (!event.target) event.target = event.srcelement || document; if (event.target.nodetype == 3) event.target = event.target.parentnode; if (!event.relatedtarget && event.fromelement) event.relatedtarget = event.fromelement == event.target ? event.toelement : event.fromelement; if (event.pagex == null && event.clientx != null) { var doc = document.documentelement, body = document.body; event.pagex = event.clientx + (doc && doc.scrollleft || body && body.scrollleft || 0) - (doc.clientleft || 0); event.pagey = event.clienty + (doc && doc.scrolltop || body && body.scrolltop || 0) - (doc.clienttop || 0); } if (!event.which && ((event.charcode || event.charcode === 0) ? event.charcode : event.keycode)) event.which = event.charcode || event.keycode; if (!event.metakey && event.ctrlkey) event.metakey = event.ctrlkey; if (!event.which && event.button) event.which = (event.button & 1 ? 1 : (event.button & 2 ? 3 : (event.button & 4 ? 2 : 0))); return event; }, proxy: function (fn, proxy) { proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++; return proxy; }, special: { ready: { setup: function () { bindready(); return; }, teardown: function () { return; } }, mouseenter: { setup: function () { if (jquery.browser.msie) return false; jquery(this).bind("mouseover", jquery.event.special.mouseenter.handler); return true; }, teardown: function () { if (jquery.browser.msie) return false; jquery(this).unbind("mouseover", jquery.event.special.mouseenter.handler); return true; }, handler: function (event) { if (withinelement(event, this)) return true; event.type = "mouseenter"; return jquery.event.handle.apply(this, arguments); } }, mouseleave: { setup: function () { if (jquery.browser.msie) return false; jquery(this).bind("mouseout", jquery.event.special.mouseleave.handler); return true; }, teardown: function () { if (jquery.browser.msie) return false; jquery(this).unbind("mouseout", jquery.event.special.mouseleave.handler); return true; }, handler: function (event) { if (withinelement(event, this)) return true; event.type = "mouseleave"; return jquery.event.handle.apply(this, arguments); } }} }; jquery.fn.extend({ bind: function (type, data, fn) { return type == "unload" ? this.one(type, data, fn) : this.each(function () { jquery.event.add(this, type, fn || data, fn && data); }); }, one: function (type, data, fn) { var one = jquery.event.proxy(fn || data, function (event) { jquery(this).unbind(event, one); return (fn || data).apply(this, arguments); }); return this.each(function () { jquery.event.add(this, type, one, fn && data); }); }, unbind: function (type, fn) { return this.each(function () { jquery.event.remove(this, type, fn); }); }, trigger: function (type, data, fn) { return this.each(function () { jquery.event.trigger(type, data, this, true, fn); }); }, triggerhandler: function (type, data, fn) { return this[0] && jquery.event.trigger(type, data, this[0], false, fn); }, toggle: function (fn) { var args = arguments, i = 1; while (i < args.length) jquery.event.proxy(fn, args[i++]); return this.click(jquery.event.proxy(fn, function (event) { this.lasttoggle = (this.lasttoggle || 0) % i; event.preventdefault(); return args[this.lasttoggle++].apply(this, arguments) || false; })); }, hover: function (fnover, fnout) { return this.bind('mouseenter', fnover).bind('mouseleave', fnout); }, ready: function (fn) { bindready(); if (jquery.isready) fn.call(document, jquery); else jquery.readylist.push(function () { return fn.call(this, jquery); }); return this; } }); jquery.extend({ isready: false, readylist: [], ready: function () { if (!jquery.isready) { jquery.isready = true; if (jquery.readylist) { jquery.each(jquery.readylist, function () { this.call(document); }); jquery.readylist = null; } jquery(document).triggerhandler("ready"); } } }); var readybound = false; function bindready() { if (readybound) return; readybound = true; if (document.addeventlistener && !jquery.browser.opera) document.addeventlistener("domcontentloaded", jquery.ready, false); if (jquery.browser.msie && window == top) (function () { if (jquery.isready) return; try { document.documentelement.doscroll("left"); } catch (error) { settimeout(arguments.callee, 0); return; } jquery.ready(); })(); if (jquery.browser.opera) document.addeventlistener("domcontentloaded", function () { if (jquery.isready) return; for (var i = 0; i < document.stylesheets.length; i++) if (document.stylesheets[i].disabled) { settimeout(arguments.callee, 0); return; } jquery.ready(); }, false); if (jquery.browser.safari) { var numstyles; (function () { if (jquery.isready) return; if (document.readystate != "loaded" && document.readystate != "complete") { settimeout(arguments.callee, 0); return; } if (numstyles === undefined) numstyles = jquery("style, link[rel=stylesheet]").length; if (document.stylesheets.length != numstyles) { settimeout(arguments.callee, 0); return; } jquery.ready(); })(); } jquery.event.add(window, "load", jquery.ready); } jquery.each(("blur,focus,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + "submit,keydown,keypress,keyup,error").split(","), function (i, name) { jquery.fn[name] = function (fn) { return fn ? this.bind(name, fn) : this.trigger(name); }; }); var withinelement = function (event, elem) { var parent = event.relatedtarget; while (parent && parent != elem) try { parent = parent.parentnode; } catch (error) { parent = elem; } return parent == elem; }; jquery(window).bind("unload", function () { jquery("*").add(document).unbind(); }); jquery.fn.extend({ _load: jquery.fn.load, load: function (url, params, callback) { if (typeof url != 'string') return this._load(url); var off = url.indexof(" "); if (off >= 0) { var selector = url.slice(off, url.length); url = url.slice(0, off); } callback = callback || function () { }; var type = "get"; if (params) if (jquery.isfunction(params)) { callback = params; params = null; } else { params = jquery.param(params); type = "post"; } var self = this; jquery.ajax({ url: url, type: type, datatype: "html", data: params, complete: function (res, status) { if (status == "success" || status == "notmodified") self.html(selector ? jquery("
").append(res.responsetext.replace(//g, "")).find(selector) : res.responsetext); self.each(callback, [res.responsetext, status, res]); } }); return this; }, serialize: function () { return jquery.param(this.serializearray()); }, serializearray: function () { return this.map(function () { return jquery.nodename(this, "form") ? jquery.makearray(this.elements) : this; }).filter(function () { return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodename) || /text|hidden|password/i.test(this.type)); }).map(function (i, elem) { var val = jquery(this).val(); return val == null ? null : val.constructor == array ? jquery.map(val, function (val, i) { return { name: elem.name, value: val }; }) : { name: elem.name, value: val }; }).get(); } }); jquery.each("ajaxstart,ajaxstop,ajaxcomplete,ajaxerror,ajaxsuccess,ajaxsend".split(","), function (i, o) { jquery.fn[o] = function (f) { return this.bind(o, f); }; }); var jsc = now(); jquery.extend({ get: function (url, data, callback, type) { if (jquery.isfunction(data)) { callback = data; data = null; } return jquery.ajax({ type: "get", url: url, data: data, success: callback, datatype: type }); }, getscript: function (url, callback) { return jquery.get(url, null, callback, "script"); }, getjson: function (url, data, callback) { return jquery.get(url, data, callback, "json"); }, post: function (url, data, callback, type) { if (jquery.isfunction(data)) { callback = data; data = {}; } return jquery.ajax({ type: "post", url: url, data: data, success: callback, datatype: type }); }, ajaxsetup: function (settings) { jquery.extend(jquery.ajaxsettings, settings); }, ajaxsettings: { url: location.href, global: true, type: "get", timeout: 0, contenttype: "application/x-www-form-urlencoded", processdata: true, async: true, data: null, username: null, password: null, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*"} }, lastmodified: {}, ajax: function (s) { s = jquery.extend(true, s, jquery.extend(true, {}, jquery.ajaxsettings, s)); var jsonp, jsre = /=\?(&|$)/g, status, data, type = s.type.touppercase(); if (s.data && s.processdata && typeof s.data != "string") s.data = jquery.param(s.data); if (s.datatype == "jsonp") { if (type == "get") { if (!s.url.match(jsre)) s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; } else if (!s.data || !s.data.match(jsre)) s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; s.datatype = "json"; } if (s.datatype == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre))) { jsonp = "jsonp" + jsc++; if (s.data) s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); s.url = s.url.replace(jsre, "=" + jsonp + "$1"); s.datatype = "script"; window[jsonp] = function (tmp) { data = tmp; success(); complete(); window[jsonp] = undefined; try { delete window[jsonp]; } catch (e) { } if (head) head.removechild(script); }; } if (s.datatype == "script" && s.cache == null) s.cache = false; if (s.cache === false && type == "get") { var ts = now(); var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); } if (s.data && type == "get") { s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; s.data = null; } if (s.global && !jquery.active++) jquery.event.trigger("ajaxstart"); var remote = /^(?:\w+:)?\/\/([^\/?#]+)/; if (s.datatype == "script" && type == "get" && remote.test(s.url) && remote.exec(s.url)[1] != location.host) { var head = document.getelementsbytagname("head")[0]; var script = document.createelement("script"); script.src = s.url; if (s.scriptcharset) script.charset = s.scriptcharset; if (!jsonp) { var done = false; script.onload = script.onreadystatechange = function () { if (!done && (!this.readystate || this.readystate == "loaded" || this.readystate == "complete")) { done = true; success(); complete(); head.removechild(script); } }; } head.appendchild(script); return undefined; } var requestdone = false; var xhr = window.activexobject ? new activexobject("microsoft.xmlhttp") : new xmlhttprequest(); if (s.username) xhr.open(type, s.url, s.async, s.username, s.password); else xhr.open(type, s.url, s.async); try { if (s.data) xhr.setrequestheader("content-type", s.contenttype); if (s.ifmodified) xhr.setrequestheader("if-modified-since", jquery.lastmodified[s.url] || "thu, 01 jan 1970 00:00:00 gmt"); xhr.setrequestheader("x-requested-with", "xmlhttprequest"); xhr.setrequestheader("accept", s.datatype && s.accepts[s.datatype] ? s.accepts[s.datatype] + ", */*" : s.accepts._default); } catch (e) { } if (s.beforesend && s.beforesend(xhr, s) === false) { s.global && jquery.active--; xhr.abort(); return false; } if (s.global) jquery.event.trigger("ajaxsend", [xhr, s]); var onreadystatechange = function (istimeout) { if (!requestdone && xhr && (xhr.readystate == 4 || istimeout == "timeout")) { requestdone = true; if (ival) { clearinterval(ival); ival = null; } status = istimeout == "timeout" && "timeout" || !jquery.httpsuccess(xhr) && "error" || s.ifmodified && jquery.httpnotmodified(xhr, s.url) && "notmodified" || "success"; if (status == "success") { try { data = jquery.httpdata(xhr, s.datatype, s.datafilter); } catch (e) { status = "parsererror"; } } if (status == "success") { var modres; try { modres = xhr.getresponseheader("last-modified"); } catch (e) { } if (s.ifmodified && modres) jquery.lastmodified[s.url] = modres; if (!jsonp) success(); } else jquery.handleerror(s, xhr, status); complete(); if (s.async) xhr = null; } }; if (s.async) { var ival = setinterval(onreadystatechange, 13); if (s.timeout > 0) settimeout(function () { if (xhr) { xhr.abort(); if (!requestdone) onreadystatechange("timeout"); } }, s.timeout); } try { xhr.send(s.data); } catch (e) { jquery.handleerror(s, xhr, null, e); } if (!s.async) onreadystatechange(); function success() { if (s.success) s.success(data, status); if (s.global) jquery.event.trigger("ajaxsuccess", [xhr, s]); } function complete() { if (s.complete) s.complete(xhr, status); if (s.global) jquery.event.trigger("ajaxcomplete", [xhr, s]); if (s.global && ! --jquery.active) jquery.event.trigger("ajaxstop"); } return xhr; }, handleerror: function (s, xhr, status, e) { if (s.error) s.error(xhr, status, e); if (s.global) jquery.event.trigger("ajaxerror", [xhr, s, e]); }, active: 0, httpsuccess: function (xhr) { try { return !xhr.status && location.protocol == "file:" || (xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || xhr.status == 1223 || jquery.browser.safari && xhr.status == undefined; } catch (e) { } return false; }, httpnotmodified: function (xhr, url) { try { var xhrres = xhr.getresponseheader("last-modified"); return xhr.status == 304 || xhrres == jquery.lastmodified[url] || jquery.browser.safari && xhr.status == undefined; } catch (e) { } return false; }, httpdata: function (xhr, type, filter) { var ct = xhr.getresponseheader("content-type"), xml = type == "xml" || !type && ct && ct.indexof("xml") >= 0, data = xml ? xhr.responsexml : xhr.responsetext; if (xml && data.documentelement.tagname == "parsererror") throw "parsererror"; if (filter) data = filter(data, type); if (type == "script") jquery.globaleval(data); if (type == "json") data = eval("(" + data + ")"); return data; }, param: function (a) { var s = []; if (a.constructor == array || a.jquery) jquery.each(a, function () { s.push(encodeuricomponent(this.name) + "=" + encodeuricomponent(this.value)); }); else for (var j in a) if (a[j] && a[j].constructor == array) jquery.each(a[j], function () { s.push(encodeuricomponent(j) + "=" + encodeuricomponent(this)); }); else s.push(encodeuricomponent(j) + "=" + encodeuricomponent(jquery.isfunction(a[j]) ? a[j]() : a[j])); return s.join("&").replace(/%20/g, "+"); } }); jquery.fn.extend({ show: function (speed, callback) { return speed ? this.animate({ height: "show", width: "show", opacity: "show" }, speed, callback) : this.filter(":hidden").each(function () { this.style.display = this.oldblock || ""; if (jquery.css(this, "display") == "none") { var elem = jquery("<" + this.tagname + " />").appendto("body"); this.style.display = elem.css("display"); if (this.style.display == "none") this.style.display = "block"; elem.remove(); } }).end(); }, hide: function (speed, callback) { return speed ? this.animate({ height: "hide", width: "hide", opacity: "hide" }, speed, callback) : this.filter(":visible").each(function () { this.oldblock = this.oldblock || jquery.css(this, "display"); this.style.display = "none"; }).end(); }, _toggle: jquery.fn.toggle, toggle: function (fn, fn2) { return jquery.isfunction(fn) && jquery.isfunction(fn2) ? this._toggle.apply(this, arguments) : fn ? this.animate({ height: "toggle", width: "toggle", opacity: "toggle" }, fn, fn2) : this.each(function () { jquery(this)[jquery(this).is(":hidden") ? "show" : "hide"](); }); }, slidedown: function (speed, callback) { return this.animate({ height: "show" }, speed, callback); }, slideup: function (speed, callback) { return this.animate({ height: "hide" }, speed, callback); }, slidetoggle: function (speed, callback) { return this.animate({ height: "toggle" }, speed, callback); }, fadein: function (speed, callback) { return this.animate({ opacity: "show" }, speed, callback); }, fadeout: function (speed, callback) { return this.animate({ opacity: "hide" }, speed, callback); }, fadeto: function (speed, to, callback) { return this.animate({ opacity: to }, speed, callback); }, animate: function (prop, speed, easing, callback) { var optall = jquery.speed(speed, easing, callback); return this[optall.queue === false ? "each" : "queue"](function () { if (this.nodetype != 1) return false; var opt = jquery.extend({}, optall), p, hidden = jquery(this).is(":hidden"), self = this; for (p in prop) { if (prop[p] == "hide" && hidden || prop[p] == "show" && !hidden) return opt.complete.call(this); if (p == "height" || p == "width") { opt.display = jquery.css(this, "display"); opt.overflow = this.style.overflow; } } if (opt.overflow != null) this.style.overflow = "hidden"; opt.curanim = jquery.extend({}, prop); jquery.each(prop, function (name, val) { var e = new jquery.fx(self, opt, name); if (/toggle|show|hide/.test(val)) e[val == "toggle" ? hidden ? "show" : "hide" : val](prop); else { var parts = val.tostring().match(/^([+-]=)?([\d+-.]+)(.*)$/), start = e.cur(true) || 0; if (parts) { var end = parsefloat(parts[2]), unit = parts[3] || "px"; if (unit != "px") { self.style[name] = (end || 1) + unit; start = ((end || 1) / e.cur(true)) * start; self.style[name] = start + unit; } if (parts[1]) end = ((parts[1] == "-=" ? -1 : 1) * end) + start; e.custom(start, end, unit); } else e.custom(start, val, ""); } }); return true; }); }, queue: function (type, fn) { if (jquery.isfunction(type) || (type && type.constructor == array)) { fn = type; type = "fx"; } if (!type || (typeof type == "string" && !fn)) return queue(this[0], type); return this.each(function () { if (fn.constructor == array) queue(this, type, fn); else { queue(this, type).push(fn); if (queue(this, type).length == 1) fn.call(this); } }); }, stop: function (clearqueue, gotoend) { var timers = jquery.timers; if (clearqueue) this.queue([]); this.each(function () { for (var i = timers.length - 1; i >= 0; i--) if (timers[i].elem == this) { if (gotoend) timers[i](true); timers.splice(i, 1); } }); if (!gotoend) this.dequeue(); return this; } }); var queue = function (elem, type, array) { if (elem) { type = type || "fx"; var q = jquery.data(elem, type + "queue"); if (!q || array) q = jquery.data(elem, type + "queue", jquery.makearray(array)); } return q; }; jquery.fn.dequeue = function (type) { type = type || "fx"; return this.each(function () { var q = queue(this, type); q.shift(); if (q.length) q[0].call(this); }); }; jquery.extend({ speed: function (speed, easing, fn) { var opt = speed && speed.constructor == object ? speed : { complete: fn || !fn && easing || jquery.isfunction(speed) && speed, duration: speed, easing: fn && easing || easing && easing.constructor != function && easing }; opt.duration = (opt.duration && opt.duration.constructor == number ? opt.duration : jquery.fx.speeds[opt.duration]) || jquery.fx.speeds.def; opt.old = opt.complete; opt.complete = function () { if (opt.queue !== false) jquery(this).dequeue(); if (jquery.isfunction(opt.old)) opt.old.call(this); }; return opt; }, easing: { linear: function (p, n, firstnum, diff) { return firstnum + diff * p; }, swing: function (p, n, firstnum, diff) { return ((-math.cos(p * math.pi) / 2) + 0.5) * diff + firstnum; } }, timers: [], timerid: null, fx: function (elem, options, prop) { this.options = options; this.elem = elem; this.prop = prop; if (!options.orig) options.orig = {}; } }); jquery.fx.prototype = { update: function () { if (this.options.step) this.options.step.call(this.elem, this.now, this); (jquery.fx.step[this.prop] || jquery.fx.step._default)(this); if (this.prop == "height" || this.prop == "width") this.elem.style.display = "block"; }, cur: function (force) { if (this.elem[this.prop] != null && this.elem.style[this.prop] == null) return this.elem[this.prop]; var r = parsefloat(jquery.css(this.elem, this.prop, force)); return r && r > -10000 ? r : parsefloat(jquery.curcss(this.elem, this.prop)) || 0; }, custom: function (from, to, unit) { this.starttime = now(); this.start = from; this.end = to; this.unit = unit || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; this.update(); var self = this; function t(gotoend) { return self.step(gotoend); } t.elem = this.elem; jquery.timers.push(t); if (jquery.timerid == null) { jquery.timerid = setinterval(function () { var timers = jquery.timers; for (var i = 0; i < timers.length; i++) if (!timers[i]()) timers.splice(i--, 1); if (!timers.length) { clearinterval(jquery.timerid); jquery.timerid = null; } }, 13); } }, show: function () { this.options.orig[this.prop] = jquery.attr(this.elem.style, this.prop); this.options.show = true; this.custom(0, this.cur()); if (this.prop == "width" || this.prop == "height") this.elem.style[this.prop] = "1px"; jquery(this.elem).show(); }, hide: function () { this.options.orig[this.prop] = jquery.attr(this.elem.style, this.prop); this.options.hide = true; this.custom(this.cur(), 0); }, step: function (gotoend) { var t = now(); if (gotoend || t > this.options.duration + this.starttime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curanim[this.prop] = true; var done = true; for (var i in this.options.curanim) if (this.options.curanim[i] !== true) done = false; if (done) { if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; this.elem.style.display = this.options.display; if (jquery.css(this.elem, "display") == "none") this.elem.style.display = "block"; } if (this.options.hide) this.elem.style.display = "none"; if (this.options.hide || this.options.show) for (var p in this.options.curanim) jquery.attr(this.elem.style, p, this.options.orig[p]); } if (done) this.options.complete.call(this.elem); return false; } else { var n = t - this.starttime; this.state = n / this.options.duration; this.pos = jquery.easing[this.options.easing || (jquery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update(); } return true; } }; jquery.extend(jquery.fx, { speeds: { slow: 600, fast: 200, def: 400 }, step: { scrollleft: function (fx) { fx.elem.scrollleft = fx.now; }, scrolltop: function (fx) { fx.elem.scrolltop = fx.now; }, opacity: function (fx) { jquery.attr(fx.elem.style, "opacity", fx.now); }, _default: function (fx) { fx.elem.style[fx.prop] = fx.now + fx.unit; } } }); jquery.fn.offset = function () { var left = 0, top = 0, elem = this[0], results; if (elem) with (jquery.browser) { var parent = elem.parentnode, offsetchild = elem, offsetparent = elem.offsetparent, doc = elem.ownerdocument, safari2 = safari && parseint(version) < 522 && !/adobeair/i.test(useragent), css = jquery.curcss, fixed = css(elem, "position") == "fixed"; if (elem.getboundingclientrect) { var box = elem.getboundingclientrect(); add(box.left + math.max(doc.documentelement.scrollleft, doc.body.scrollleft), box.top + math.max(doc.documentelement.scrolltop, doc.body.scrolltop)); add(-doc.documentelement.clientleft, -doc.documentelement.clienttop); } else { add(elem.offsetleft, elem.offsettop); while (offsetparent) { add(offsetparent.offsetleft, offsetparent.offsettop); if (mozilla && !/^t(able|d|h)$/i.test(offsetparent.tagname) || safari && !safari2) border(offsetparent); if (!fixed && css(offsetparent, "position") == "fixed") fixed = true; offsetchild = /^body$/i.test(offsetparent.tagname) ? offsetchild : offsetparent; offsetparent = offsetparent.offsetparent; } while (parent && parent.tagname && !/^body|html$/i.test(parent.tagname)) { if (!/^inline|table.*$/i.test(css(parent, "display"))) add(-parent.scrollleft, -parent.scrolltop); if (mozilla && css(parent, "overflow") != "visible") border(parent); parent = parent.parentnode; } if ((safari2 && (fixed || css(offsetchild, "position") == "absolute")) || (mozilla && css(offsetchild, "position") != "absolute")) add(-doc.body.offsetleft, -doc.body.offsettop); if (fixed) add(math.max(doc.documentelement.scrollleft, doc.body.scrollleft), math.max(doc.documentelement.scrolltop, doc.body.scrolltop)); } results = { top: top, left: left }; } function border(elem) { add(jquery.curcss(elem, "borderleftwidth", true), jquery.curcss(elem, "bordertopwidth", true)); } function add(l, t) { left += parseint(l, 10) || 0; top += parseint(t, 10) || 0; } return results; }; jquery.fn.extend({ position: function () { var left = 0, top = 0, results; if (this[0]) { var offsetparent = this.offsetparent(), offset = this.offset(), parentoffset = /^body|html$/i.test(offsetparent[0].tagname) ? { top: 0, left: 0} : offsetparent.offset(); offset.top -= num(this, 'margintop'); offset.left -= num(this, '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) && jquery.css(offsetparent, 'position') == 'static')) offsetparent = offsetparent.offsetparent; return jquery(offsetparent); } }); jquery.each(['left', 'top'], function (i, name) { var method = 'scroll' + name; jquery.fn[method] = function (val) { if (!this[0]) return; return val != undefined ? this.each(function () { this == window || this == document ? window.scrollto(!i ? val : jquery(window).scrollleft(), i ? val : jquery(window).scrolltop()) : this[method] = val; }) : this[0] == window || this[0] == document ? self[i ? 'pageyoffset' : 'pagexoffset'] || jquery.boxmodel && document.documentelement[method] || document.body[method] : this[0][method]; }; }); jquery.each(["height", "width"], function (i, name) { var tl = i ? "left" : "top", br = i ? "right" : "bottom"; jquery.fn["inner" + name] = function () { return this[name.tolowercase()]() + num(this, "padding" + tl) + num(this, "padding" + br); }; jquery.fn["outer" + name] = function (margin) { return this["inner" + name]() + num(this, "border" + tl + "width") + num(this, "border" + br + "width") + (margin ? num(this, "margin" + tl) + num(this, "margin" + br) : 0); }; }); })();