#1 JavaScript::Eval (size: 81674, repeated: 1) (function(w, x) {
var y = function(a, b) {
return new y.fn.init(a, b)
},
_jQuery = w.jQuery,
_$ = w.$,
document = w.document,
rootjQuery, quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
isSimple = /^.[^:#\[\.,]*$/,
rnotwhite = /\S/,
rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
userAgent = navigator.userAgent,
browserMatch, readyBound = false,
readyList = [],
DOMContentLoaded, toString = Object.prototype.toString,
hasOwnProperty = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
indexOf = Array.prototype.indexOf;
y.fn = y.prototype = {
init: function(a, b) {
var c, elem, ret, doc;
if (!a) {
return this
}
if (a.nodeType) {
this.context = this[0] = a;
this.length = 1;
return this
}
if (a === "body" && !b) {
this.context = document;
this[0] = document.body;
this.selector = "body";
this.length = 1;
return this
}
if (typeof a === "string") {
c = quickExpr.exec(a);
if (c && (c[1] || !b)) {
if (c[1]) {
doc = (b ? b.ownerDocument || b : document);
ret = rsingleTag.exec(a);
if (ret) {
if (y.isPlainObject(b)) {
a = [document.createElement(ret[1])];
y.fn.attr.call(a, b, true)
} else {
a = [doc.createElement(ret[1])]
}
} else {
ret = buildFragment([c[1]], [doc]);
a = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes
}
return y.merge(this, a)
} else {
elem = document.getElementById(c[2]);
if (elem) {
if (elem.id !== c[2]) {
return rootjQuery.find(a)
}
this.length = 1;
this[0] = elem
}
this.context = document;
this.selector = a;
return this
}
} else if (!b && /^\w+$/.test(a)) {
this.selector = a;
this.context = document;
a = document.getElementsByTagName(a);
return y.merge(this, a)
} else if (!b || b.jquery) {
return (b || rootjQuery).find(a)
} else {
return y(b).find(a)
}
} else if (y.isFunction(a)) {
return rootjQuery.ready(a)
}
if (a.selector !== x) {
this.selector = a.selector;
this.context = a.context
}
return y.makeArray(a, this)
},
selector: "",
jquery: "1.4.2",
length: 0,
size: function() {
return this.length
},
toArray: function() {
return slice.call(this, 0)
},
get: function(a) {
return a == null ? this.toArray() : (a < 0 ? this.slice(a)[0] : this[a])
},
pushStack: function(a, b, c) {
var d = y();
if (y.isArray(a)) {
push.apply(d, a)
} else {
y.merge(d, a)
}
d.prevObject = this;
d.context = this.context;
if (b === "find") {
d.selector = this.selector + (this.selector ? " " : "") + c
} else if (b) {
d.selector = this.selector + "." + b + "(" + c + ")"
}
return d
},
each: function(a, b) {
return y.each(this, a, b)
},
ready: function(a) {
y.bindReady();
if (y.isReady) {
a.call(document, y)
} else if (readyList) {
readyList.push(a)
}
return this
},
eq: function(i) {
return i === -1 ? this.slice(i) : this.slice(i, +i + 1)
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq(-1)
},
slice: function() {
return this.pushStack(slice.apply(this, arguments), "slice", slice.call(arguments).join(","))
},
map: function(b) {
return this.pushStack(y.map(this, function(a, i) {
return b.call(a, i, a)
}))
},
end: function() {
return this.prevObject || y(null)
},
push: push,
sort: [].sort,
splice: [].splice
};
y.fn.init.prototype = y.fn;
y.extend = y.fn.extend = function() {
var a = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false,
options, name, src, copy;
if (typeof a === "boolean") {
deep = a;
a = arguments[1] || {};
i = 2
}
if (typeof a !== "object" && !y.isFunction(a)) {
a = {}
}
if (length === i) {
a = this;
--i
}
for (; i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
src = a[name];
copy = options[name];
if (a === copy) {
continue
}
if (deep && copy && (y.isPlainObject(copy) || y.isArray(copy))) {
var b = src && (y.isPlainObject(src) || y.isArray(src)) ? src : y.isArray(copy) ? [] : {};
a[name] = y.extend(deep, b, copy)
} else if (copy !== x) {
a[name] = copy
}
}
}
}
return a
};
y.extend({
noConflict: function(a) {
w.$ = _$;
if (a) {
w.jQuery = _jQuery
}
return y
},
isReady: false,
ready: function() {
if (!y.isReady) {
if (!document.body) {
return setTimeout(y.ready, 13)
}
y.isReady = true;
if (readyList) {
var a, i = 0;
while ((a = readyList[i++])) {
a.call(document, y)
}
readyList = null
}
if (y.fn.triggerHandler) {
y(document).triggerHandler("ready")
}
}
},
bindReady: function() {
if (readyBound) {
return
}
readyBound = true;
if (document.readyState === "complete") {
return y.ready()
}
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
w.addEventListener("load", y.ready, false)
} else if (document.attachEvent) {
document.attachEvent("onreadystatechange", DOMContentLoaded);
w.attachEvent("onload", y.ready);
var a = false;
try {
a = w.frameElement == null
} catch (e) {}
if (document.documentElement.doScroll && a) {
doScrollCheck()
}
}
},
isFunction: function(a) {
return toString.call(a) === "[object Function]"
},
isArray: function(a) {
return toString.call(a) === "[object Array]"
},
isPlainObject: function(a) {
if (!a || toString.call(a) !== "[object Object]" || a.nodeType || a.setInterval) {
return false
}
if (a.constructor && !hasOwnProperty.call(a, "constructor") && !hasOwnProperty.call(a.constructor.prototype, "isPrototypeOf")) {
return false
}
var b;
for (b in a) {}
return b === x || hasOwnProperty.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 = y.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 w.JSON && w.JSON.parse ? w.JSON.parse(a) : (new Function("return " + a))()
} else {
y.error("Invalid JSON: " + a)
}
},
noop: function() {},
globalEval: function(a) {
if (a && rnotwhite.test(a)) {
var b = document.getElementsByTagName("head")[0] || document.documentElement,
script = document.createElement("script");
script.type = "text/javascript";
if (y.support.scriptEval) {
script.appendChild(document.createTextNode(a))
} else {
script.text = a
}
b.insertBefore(script, b.firstChild);
b.removeChild(script)
}
},
nodeName: function(a, b) {
return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
},
each: function(a, b, c) {
var d, i = 0,
length = a.length,
isObj = length === x || y.isFunction(a);
if (c) {
if (isObj) {
for (d in a) {
if (b.apply(a[d], c) === false) {
break
}
}
} else {
for (; i < length;) {
if (b.apply(a[i++], c) === false) {
break
}
}
}
} else {
if (isObj) {
for (d in a) {
if (b.call(a[d], d, a[d]) === false) {
break
}
}
} else {
for (var e = a[0]; i < length && b.call(e, i, e) !== false; e = a[++i]) {}
}
}
return a
},
trim: function(a) {
return (a || "").replace(rtrim, "")
},
makeArray: function(a, b) {
var c = b || [];
if (a != null) {
if (a.length == null || typeof a === "string" || y.isFunction(a) || (typeof a !== "function" && a.setInterval)) {
push.call(c, a)
} else {
y.merge(c, a)
}
}
return c
},
inArray: function(a, b) {
if (b.indexOf) {
return b.indexOf(a)
}
for (var i = 0, length = b.length; i < length; i++) {
if (b[i] === a) {
return i
}
}
return -1
},
merge: function(a, b) {
var i = a.length,
j = 0;
if (typeof b.length === "number") {
for (var l = b.length; j < l; j++) {
a[i++] = b[j]
}
} else {
while (b[j] !== x) {
a[i++] = b[j++]
}
}
a.length = i;
return a
},
grep: function(a, b, c) {
var d = [];
for (var i = 0, length = a.length; i < length; i++) {
if (!c !== !b(a[i], i)) {
d.push(a[i])
}
}
return d
},
map: function(a, b, c) {
var d = [],
value;
for (var i = 0, length = a.length; i < length; i++) {
value = b(a[i], i, c);
if (value != null) {
d[d.length] = value
}
}
return d.concat.apply([], d)
},
guid: 1,
proxy: function(a, b, c) {
if (arguments.length === 2) {
if (typeof b === "string") {
c = a;
a = c[b];
b = x
} else if (b && !y.isFunction(b)) {
c = b;
b = x
}
}
if (!b && a) {
b = function() {
return a.apply(c || this, arguments)
}
}
if (a) {
b.guid = a.guid = a.guid || b.guid || y.guid++
}
return b
},
uaMatch: function(a) {
a = a.toLowerCase();
var b = /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || !/compatible/.test(a) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec(a) || [];
return {
browser: b[1] || "",
version: b[2] || "0"
}
},
browser: {}
});
browserMatch = y.uaMatch(userAgent);
if (browserMatch.browser) {
y.browser[browserMatch.browser] = true;
y.browser.version = browserMatch.version
}
if (y.browser.webkit) {
y.browser.safari = true
}
if (indexOf) {
y.inArray = function(a, b) {
return indexOf.call(b, a)
}
}
rootjQuery = y(document);
if (document.addEventListener) {
DOMContentLoaded = function() {
document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
y.ready()
}
} else if (document.attachEvent) {
DOMContentLoaded = function() {
if (document.readyState === "complete") {
document.detachEvent("onreadystatechange", DOMContentLoaded);
y.ready()
}
}
}
function doScrollCheck() {
if (y.isReady) {
return
}
try {
document.documentElement.doScroll("left")
} catch (error) {
setTimeout(doScrollCheck, 1);
return
}
y.ready()
}
function evalScript(i, a) {
if (a.src) {
y.ajax({
url: a.src,
async: false,
dataType: "script"
})
} else {
y.globalEval(a.text || a.textContent || a.innerHTML || "")
}
if (a.parentNode) {
a.parentNode.removeChild(a)
}
}
function access(a, b, c, d, e, f) {
var g = a.length;
if (typeof b === "object") {
for (var k in b) {
access(a, k, b[k], d, e, c)
}
return a
}
if (c !== x) {
d = !f && d && y.isFunction(c);
for (var i = 0; i < g; i++) {
e(a[i], b, d ? c.call(a[i], i, e(a[i], b)) : c, f)
}
return a
}
return g ? e(a[0], b) : x
}
function now() {
return (new Date).getTime()
}(function() {
y.support = {};
var d = document.documentElement,
script = document.createElement("script"),
div = document.createElement("div"),
id = "script" + now();
div.style.display = "none";
div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var f = div.getElementsByTagName("*"),
a = div.getElementsByTagName("a")[0];
if (!f || !f.length || !a) {
return
}
y.support = {
leadingWhitespace: div.firstChild.nodeType === 3,
tbody: !div.getElementsByTagName("tbody").length,
htmlSerialize: !! div.getElementsByTagName("link").length,
style: /red/.test(a.getAttribute("style")),
hrefNormalized: a.getAttribute("href") === "/a",
opacity: /^0.55$/.test(a.style.opacity),
cssFloat: !! a.style.cssFloat,
checkOn: div.getElementsByTagName("input")[0].value === "on",
optSelected: document.createElement("select").appendChild(document.createElement("option")).selected,
parentNode: div.removeChild(div.appendChild(document.createElement("div"))).parentNode === null,
deleteExpando: true,
checkClone: false,
scriptEval: false,
noCloneEvent: true,
boxModel: null
};
script.type = "text/javascript";
try {
script.appendChild(document.createTextNode("window." + id + "=1;"))
} catch (e) {}
d.insertBefore(script, d.firstChild);
if (w[id]) {
y.support.scriptEval = true;
delete w[id]
}
try {
delete script.test
} catch (e) {
y.support.deleteExpando = false
}
d.removeChild(script);
if (div.attachEvent && div.fireEvent) {
div.attachEvent("onclick", function click() {
y.support.noCloneEvent = false;
div.detachEvent("onclick", click)
});
div.cloneNode(true).fireEvent("onclick")
}
div = document.createElement("div");
div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
var g = document.createDocumentFragment();
g.appendChild(div.firstChild);
y.support.checkClone = g.cloneNode(true).cloneNode(true).lastChild.checked;
y(function() {
var a = document.createElement("div");
a.style.width = a.style.paddingLeft = "1px";
document.body.appendChild(a);
y.boxModel = y.support.boxModel = a.offsetWidth === 2;
document.body.removeChild(a).style.display = 'none';
a = null
});
var h = function(a) {
var b = document.createElement("div");
a = "on" + a;
var c = (a in b);
if (!c) {
b.setAttribute(a, "return;");
c = typeof b[a] === "function"
}
b = null;
return c
};
y.support.submitBubbles = h("submit");
y.support.changeBubbles = h("change");
d = script = div = f = a = null
})();
y.props = {
"for": "htmlFor",
"class": "className",
readonly: "readOnly",
maxlength: "maxLength",
cellspacing: "cellSpacing",
rowspan: "rowSpan",
colspan: "colSpan",
tabindex: "tabIndex",
usemap: "useMap",
frameborder: "frameBorder"
};
var z = "jQuery" + now(),
uuid = 0,
windowData = {};
y.extend({
cache: {},
expando: z,
noData: {
"embed": true,
"object": true,
"applet": true
},
data: function(a, b, c) {
if (a.nodeName && y.noData[a.nodeName.toLowerCase()]) {
return
}
a = a == w ? windowData : a;
var d = a[z],
cache = y.cache,
thisCache;
if (!d && typeof b === "string" && c === x) {
return null
}
if (!d) {
d = ++uuid
}
if (typeof b === "object") {
a[z] = d;
thisCache = cache[d] = y.extend(true, {}, b)
} else if (!cache[d]) {
a[z] = d;
cache[d] = {}
}
thisCache = cache[d];
if (c !== x) {
thisCache[b] = c
}
return typeof b === "string" ? thisCache[b] : thisCache
},
removeData: function(a, b) {
if (a.nodeName && y.noData[a.nodeName.toLowerCase()]) {
return
}
a = a == w ? windowData : a;
var c = a[z],
cache = y.cache,
thisCache = cache[c];
if (b) {
if (thisCache) {
delete thisCache[b];
if (y.isEmptyObject(thisCache)) {
y.removeData(a)
}
}
} else {
if (y.support.deleteExpando) {
delete a[y.expando]
} else if (a.removeAttribute) {
a.removeAttribute(y.expando)
}
delete cache[c]
}
}
});
y.fn.extend({
data: function(a, b) {
if (typeof a === "undefined" && this.length) {
return y.data(this[0])
} else if (typeof a === "object") {
return this.each(function() {
y.data(this, a)
})
}
var c = a.split(".");
c[1] = c[1] ? "." + c[1] : "";
if (b === x) {
var d = this.triggerHandler("getData" + c[1] + "!", [c[0]]);
if (d === x && this.length) {
d = y.data(this[0], a)
}
return d === x && c[1] ? this.data(c[0]) : d
} else {
return this.trigger("setData" + c[1] + "!", [c[0], b]).each(function() {
y.data(this, a, b)
})
}
},
removeData: function(a) {
return this.each(function() {
y.removeData(this, a)
})
}
});
y.extend({
queue: function(a, b, c) {
if (!a) {
return
}
b = (b || "fx") + "queue";
var q = y.data(a, b);
if (!c) {
return q || []
}
if (!q || y.isArray(c)) {
q = y.data(a, b, y.makeArray(c))
} else {
q.push(c)
}
return q
},
dequeue: function(a, b) {
b = b || "fx";
var c = y.queue(a, b),
fn = c.shift();
if (fn === "inprogress") {
fn = c.shift()
}
if (fn) {
if (b === "fx") {
c.unshift("inprogress")
}
fn.call(a, function() {
y.dequeue(a, b)
})
}
}
});
y.fn.extend({
queue: function(c, d) {
if (typeof c !== "string") {
d = c;
c = "fx"
}
if (d === x) {
return y.queue(this[0], c)
}
return this.each(function(i, a) {
var b = y.queue(this, c, d);
if (c === "fx" && b[0] !== "inprogress") {
y.dequeue(this, c)
}
})
},
dequeue: function(a) {
return this.each(function() {
y.dequeue(this, a)
})
},
delay: function(b, c) {
b = y.fx ? y.fx.speeds[b] || b : b;
c = c || "fx";
return this.queue(c, function() {
var a = this;
setTimeout(function() {
y.dequeue(a, c)
}, b)
})
},
clearQueue: function(a) {
return this.queue(a || "fx", [])
}
});
var A = /[\n\t]/g,
rspace = /\s+/,
rreturn = /\r/g,
rspecialurl = /href|src|style/,
rtype = /(button|input)/i,
rfocusable = /(button|input|object|select|textarea)/i,
rclickable = /^(a|area)$/i,
rradiocheck = /radio|checkbox/;
y.fn.extend({
attr: function(a, b) {
return access(this, a, b, true, y.attr)
},
removeAttr: function(a, b) {
return this.each(function() {
y.attr(this, a, "");
if (this.nodeType === 1) {
this.removeAttribute(a)
}
})
},
addClass: function(b) {
if (y.isFunction(b)) {
return this.each(function(i) {
var a = y(this);
a.addClass(b.call(this, i, a.attr("class")))
})
}
if (b && typeof b === "string") {
var d = (b || "").split(rspace);
for (var i = 0, l = this.length; i < l; i++) {
var e = this[i];
if (e.nodeType === 1) {
if (!e.className) {
e.className = b
} else {
var f = " " + e.className + " ",
setClass = e.className;
for (var c = 0, cl = d.length; c < cl; c++) {
if (f.indexOf(" " + d[c] + " ") < 0) {
setClass += " " + d[c]
}
}
e.className = y.trim(setClass)
}
}
}
}
return this
},
removeClass: function(b) {
if (y.isFunction(b)) {
return this.each(function(i) {
var a = y(this);
a.removeClass(b.call(this, i, a.attr("class")))
})
}
if ((b && typeof b === "string") || b === x) {
var d = (b || "").split(rspace);
for (var i = 0, l = this.length; i < l; i++) {
var e = this[i];
if (e.nodeType === 1 && e.className) {
if (b) {
var f = (" " + e.className + " ").replace(A, " ");
for (var c = 0, cl = d.length; c < cl; c++) {
f = f.replace(" " + d[c] + " ", " ")
}
e.className = y.trim(f)
} else {
e.className = ""
}
}
}
}
return this
},
toggleClass: function(b, c) {
var d = typeof b,
isBool = typeof c === "boolean";
if (y.isFunction(b)) {
return this.each(function(i) {
var a = y(this);
a.toggleClass(b.call(this, i, a.attr("class"), c), c)
})
}
return this.each(function() {
if (d === "string") {
var a, i = 0,
self = y(this),
state = c,
classNames = b.split(rspace);
while ((a = classNames[i++])) {
state = isBool ? state : !self.hasClass(a);
self[state ? "addClass" : "removeClass"](a)
}
} else if (d === "undefined" || d === "boolean") {
if (this.className) {
y.data(this, "__className__", this.className)
}
this.className = this.className || b === false ? "" : y.data(this, "__className__") || ""
}
})
},
hasClass: function(a) {
var b = " " + a + " ";
for (var i = 0, l = this.length; i < l; i++) {
if ((" " + this[i].className + " ").replace(A, " ").indexOf(b) > -1) {
return true
}
}
return false
},
val: function(c) {
if (c === x) {
var d = this[0];
if (d) {
if (y.nodeName(d, "option")) {
return (d.attributes.value || {}).specified ? d.value : d.text
}
if (y.nodeName(d, "select")) {
var e = d.selectedIndex,
values = [],
options = d.options,
one = d.type === "select-one";
if (e < 0) {
return null
}
for (var i = one ? e : 0, max = one ? e + 1 : options.length; i < max; i++) {
var f = options[i];
if (f.selected) {
c = y(f).val();
if (one) {
return c
}
values.push(c)
}
}
return values
}
if (rradiocheck.test(d.type) && !y.support.checkOn) {
return d.getAttribute("value") === null ? "on" : d.value
}
return (d.value || "").replace(rreturn, "")
}
return x
}
var g = y.isFunction(c);
return this.each(function(i) {
var a = y(this),
val = c;
if (this.nodeType !== 1) {
return
}
if (g) {
val = c.call(this, i, a.val())
}
if (typeof val === "number") {
val += ""
}
if (y.isArray(val) && rradiocheck.test(this.type)) {
this.checked = y.inArray(a.val(), val) >= 0
} else if (y.nodeName(this, "select")) {
var b = y.makeArray(val);
y("option", this).each(function() {
this.selected = y.inArray(y(this).val(), b) >= 0
});
if (!b.length) {
this.selectedIndex = -1
}
} else {
this.value = val
}
})
}
});
y.extend({
attrFn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
attr: function(a, b, c, d) {
if (!a || a.nodeType === 3 || a.nodeType === 8) {
return x
}
if (d && b in y.attrFn) {
return y(a)[b](c)
}
var e = a.nodeType !== 1 || !y.isXMLDoc(a),
set = c !== x;
b = e && y.props[b] || b;
if (a.nodeType === 1) {
var f = rspecialurl.test(b);
if (b === "selected" && !y.support.optSelected) {
var g = a.parentNode;
if (g) {
g.selectedIndex;
if (g.parentNode) {
g.parentNode.selectedIndex
}
}
}
if (b in a && e && !f) {
if (set) {
if (b === "type" && rtype.test(a.nodeName) && a.parentNode) {
y.error("type property can't be changed")
}
a[b] = c
}
if (y.nodeName(a, "form") && a.getAttributeNode(b)) {
return a.getAttributeNode(b).nodeValue
}
if (b === "tabIndex") {
var h = a.getAttributeNode("tabIndex");
return h && h.specified ? h.value : rfocusable.test(a.nodeName) || rclickable.test(a.nodeName) && a.href ? 0 : x
}
return a[b]
}
if (!y.support.style && e && b === "style") {
if (set) {
a.style.cssText = "" + c
}
return a.style.cssText
}
if (set) {
a.setAttribute(b, "" + c)
}
var i = !y.support.hrefNormalized && e && f ? a.getAttribute(b, 2) : a.getAttribute(b);
return i === null ? x : i
}
return y.style(a, b, c)
}
});
var B = /\.(.*)$/,
fcleanup = function(b) {
return b.replace(/[^\w\s\.\|`]/g, function(a) {
return "\\" + a
})
};
y.event = {
add: function(a, b, c, d) {
if (a.nodeType === 3 || a.nodeType === 8) {
return
}
if (a.setInterval && (a !== w && !a.frameElement)) {
a = w
}
var e, handleObj;
if (c.handler) {
e = c;
c = e.handler
}
if (!c.guid) {
c.guid = y.guid++
}
var f = y.data(a);
if (!f) {
return
}
var g = f.events = f.events || {},
eventHandle = f.handle,
eventHandle;
if (!eventHandle) {
f.handle = eventHandle = function() {
return typeof y !== "undefined" && !y.event.triggered ? y.event.handle.apply(eventHandle.elem, arguments) : x
}
}
eventHandle.elem = a;
b = b.split(" ");
var h, i = 0,
namespaces;
while ((h = b[i++])) {
handleObj = e ? y.extend({}, e) : {
handler: c,
data: d
};
if (h.indexOf(".") > -1) {
namespaces = h.split(".");
h = namespaces.shift();
handleObj.namespace = namespaces.slice(0).sort().join(".")
} else {
namespaces = [];
handleObj.namespace = ""
}
handleObj.type = h;
handleObj.guid = c.guid;
var j = g[h],
special = y.event.special[h] || {};
if (!j) {
j = g[h] = [];
if (!special.setup || special.setup.call(a, d, namespaces, eventHandle) === false) {
if (a.addEventListener) {
a.addEventListener(h, eventHandle, false)
} else if (a.attachEvent) {
a.attachEvent("on" + h, eventHandle)
}
}
}
if (special.add) {
special.add.call(a, handleObj);
if (!handleObj.handler.guid) {
handleObj.handler.guid = c.guid
}
}
j.push(handleObj);
y.event.global[h] = true
}
a = null
},
global: {},
remove: function(a, b, c, d) {
if (a.nodeType === 3 || a.nodeType === 8) {
return
}
var e, type, fn, i = 0,
all, namespaces, namespace, special, eventType, handleObj, origType, elemData = y.data(a),
events = elemData && elemData.events;
if (!elemData || !events) {
return
}
if (b && b.type) {
c = b.handler;
b = b.type
}
if (!b || typeof b === "string" && b.charAt(0) === ".") {
b = b || "";
for (type in events) {
y.event.remove(a, type + b)
}
return
}
b = b.split(" ");
while ((type = b[i++])) {
origType = type;
handleObj = null;
all = type.indexOf(".") < 0;
namespaces = [];
if (!all) {
namespaces = type.split(".");
type = namespaces.shift();
namespace = new RegExp("(^|\\.)" + y.map(namespaces.slice(0).sort(), fcleanup).join("\\.(?:.*\\.)?") + "(\\.|$)")
}
eventType = events[type];
if (!eventType) {
continue
}
if (!c) {
for (var j = 0; j < eventType.length; j++) {
handleObj = eventType[j];
if (all || namespace.test(handleObj.namespace)) {
y.event.remove(a, origType, handleObj.handler, j);
eventType.splice(j--, 1)
}
}
continue
}
special = y.event.special[type] || {};
for (var j = d || 0; j < eventType.length; j++) {
handleObj = eventType[j];
if (c.guid === handleObj.guid) {
if (all || namespace.test(handleObj.namespace)) {
if (d == null) {
eventType.splice(j--, 1)
}
if (special.remove) {
special.remove.call(a, handleObj)
}
}
if (d != null) {
break
}
}
}
if (eventType.length === 0 || d != null && eventType.length === 1) {
if (!special.teardown || special.teardown.call(a, namespaces) === false) {
C(a, type, elemData.handle)
}
e = null;
delete events[type]
}
}
if (y.isEmptyObject(events)) {
var f = elemData.handle;
if (f) {
f.elem = null
}
delete elemData.events;
delete elemData.handle;
if (y.isEmptyObject(elemData)) {
y.removeData(a)
}
}
},
trigger: function(a, b, c) {
var d = a.type || a,
bubbling = arguments[3];
if (!bubbling) {
a = typeof a === "object" ? a[z] ? a : y.extend(y.Event(d), a) : y.Event(d);
if (d.indexOf("!") >= 0) {
a.type = d = d.slice(0, -1);
a.exclusive = true
}
if (!c) {
a.stopPropagation();
if (y.event.global[d]) {
y.each(y.cache, function() {
if (this.events && this.events[d]) {
y.event.trigger(a, b, this.handle.elem)
}
})
}
}
if (!c || c.nodeType === 3 || c.nodeType === 8) {
return x
}
a.result = x;
a.target = c;
b = y.makeArray(b);
b.unshift(a)
}
a.currentTarget = c;
var f = y.data(c, "handle");
if (f) {
f.apply(c, b)
}
var g = c.parentNode || c.ownerDocument;
try {
if (!(c && c.nodeName && y.noData[c.nodeName.toLowerCase()])) {
if (c["on" + d] && c["on" + d].apply(c, b) === false) {
a.result = false
}
}
} catch (e) {}
if (!a.isPropagationStopped() && g) {
y.event.trigger(a, b, g, true)
} else if (!a.isDefaultPrevented()) {
var h = a.target,
old, isClick = y.nodeName(h, "a") && d === "click",
special = y.event.special[d] || {};
if ((!special._default || special._default.call(c, a) === false) && !isClick && !(h && h.nodeName && y.noData[h.nodeName.toLowerCase()])) {
try {
if (h[d]) {
old = h["on" + d];
if (old) {
h["on" + d] = null
}
y.event.triggered = true;
h[d]()
}
} catch (e) {}
if (old) {
h["on" + d] = old
}
y.event.triggered = false
}
}
},
handle: function(a) {
var b, handlers, namespaces, namespace, c;
a = arguments[0] = y.event.fix(a || w.event);
a.currentTarget = this;
b = a.type.indexOf(".") < 0 && !a.exclusive;
if (!b) {
namespaces = a.type.split(".");
a.type = namespaces.shift();
namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)")
}
var c = y.data(this, "events"),
handlers = c[a.type];
if (c && handlers) {
handlers = handlers.slice(0);
for (var j = 0, l = handlers.length; j < l; j++) {
var d = handlers[j];
if (b || namespace.test(d.namespace)) {
a.handler = d.handler;
a.data = d.data;
a.handleObj = d;
var e = d.handler.apply(this, arguments);
if (e !== x) {
a.result = e;
if (e === 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[z]) {
return a
}
var b = a;
a = y.Event(b);
for (var i = this.props.length, prop; i;) {
prop = this.props[--i];
a[prop] = b[prop]
}
if (!a.target) {
a.target = a.srcElement || document
}
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) {
var c = document.documentElement,
body = document.body;
a.pageX = a.clientX + (c && c.scrollLeft || body && body.scrollLeft || 0) - (c && c.clientLeft || body && body.clientLeft || 0);
a.pageY = a.clientY + (c && c.scrollTop || body && body.scrollTop || 0) - (c && c.clientTop || body && body.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 !== x) {
a.which = (a.button & 1 ? 1 : (a.button & 2 ? 3 : (a.button & 4 ? 2 : 0)))
}
return a
},
guid: 1E8,
proxy: y.proxy,
special: {
ready: {
setup: y.bindReady,
teardown: y.noop
},
live: {
add: function(a) {
y.event.add(this, a.origType, y.extend({}, a, {
handler: liveHandler
}))
},
remove: function(a) {
var b = true,
type = a.origType.replace(B, "");
y.each(y.data(this, "events").live || [], function() {
if (type === this.origType.replace(B, "")) {
b = false;
return false
}
});
if (b) {
y.event.remove(this, a.origType, liveHandler)
}
}
},
beforeunload: {
setup: function(a, b, c) {
if (this.setInterval) {
this.onbeforeunload = c
}
return false
},
teardown: function(a, b) {
if (this.onbeforeunload === b) {
this.onbeforeunload = null
}
}
}
}
};
var C = document.removeEventListener ?
function(a, b, c) {
a.removeEventListener(b, c, false)
} : function(a, b, c) {
a.detachEvent("on" + b, c)
};
y.Event = function(a) {
if (!this.preventDefault) {
return new y.Event(a)
}
if (a && a.type) {
this.originalEvent = a;
this.type = a.type
} else {
this.type = a
}
this.timeStamp = now();
this[z] = true
};
function returnFalse() {
return false
}
function returnTrue() {
return true
}
y.Event.prototype = {
preventDefault: function() {
this.isDefaultPrevented = returnTrue;
var e = this.originalEvent;
if (!e) {
return
}
if (e.preventDefault) {
e.preventDefault()
}
e.returnValue = false
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
var e = this.originalEvent;
if (!e) {
return
}
if (e.stopPropagation) {
e.stopPropagation()
}
e.cancelBubble = true
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = returnTrue;
this.stopPropagation()
},
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse
};
var D = function(a) {
var b = a.relatedTarget;
try {
while (b && b !== this) {
b = b.parentNode
}
if (b !== this) {
a.type = a.data;
y.event.handle.apply(this, arguments)
}
} catch (e) {}
},
delegate = function(a) {
a.type = a.data;
y.event.handle.apply(this, arguments)
};
y.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function(b, c) {
y.event.special[b] = {
setup: function(a) {
y.event.add(this, c, a && a.selector ? delegate : D, b)
},
teardown: function(a) {
y.event.remove(this, c, a && a.selector ? delegate : D)
}
}
});
if (!y.support.submitBubbles) {
y.event.special.submit = {
setup: function(b, c) {
if (this.nodeName.toLowerCase() !== "form") {
y.event.add(this, "click.specialSubmit", function(e) {
var a = e.target,
type = a.type;
if ((type === "submit" || type === "image") && y(a).closest("form").length) {
return trigger("submit", this, arguments)
}
});
y.event.add(this, "keypress.specialSubmit", function(e) {
var a = e.target,
type = a.type;
if ((type === "text" || type === "password") && y(a).closest("form").length && e.keyCode === 13) {
return trigger("submit", this, arguments)
}
})
} else {
return false
}
},
teardown: function(a) {
y.event.remove(this, ".specialSubmit")
}
}
}
if (!y.support.changeBubbles) {
var E = /textarea|input|select/i,
changeFilters, getVal = function(b) {
var c = b.type,
val = b.value;
if (c === "radio" || c === "checkbox") {
val = b.checked
} else if (c === "select-multiple") {
val = b.selectedIndex > -1 ? y.map(b.options, function(a) {
return a.selected
}).join("-") : ""
} else if (b.nodeName.toLowerCase() === "select") {
val = b.selectedIndex
}
return val
},
testChange = function testChange(e) {
var a = e.target,
data, val;
if (!E.test(a.nodeName) || a.readOnly) {
return
}
data = y.data(a, "_change_data");
val = getVal(a);
if (e.type !== "focusout" || a.type !== "radio") {
y.data(a, "_change_data", val)
}
if (data === x || val === data) {
return
}
if (data != null || val) {
e.type = "change";
return y.event.trigger(e, arguments[1], a)
}
};
y.event.special.change = {
filters: {
focusout: testChange,
click: function(e) {
var a = e.target,
type = a.type;
if (type === "radio" || type === "checkbox" || a.nodeName.toLowerCase() === "select") {
return testChange.call(this, e)
}
},
keydown: function(e) {
var a = e.target,
type = a.type;
if ((e.keyCode === 13 && a.nodeName.toLowerCase() !== "textarea") || (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || type === "select-multiple") {
return testChange.call(this, e)
}
},
beforeactivate: function(e) {
var a = e.target;
y.data(a, "_change_data", getVal(a))
}
},
setup: function(a, b) {
if (this.type === "file") {
return false
}
for (var c in changeFilters) {
y.event.add(this, c + ".specialChange", changeFilters[c])
}
return E.test(this.nodeName)
},
teardown: function(a) {
y.event.remove(this, ".specialChange");
return E.test(this.nodeName)
}
};
changeFilters = y.event.special.change.filters
}
function trigger(a, b, c) {
c[0].type = a;
return y.event.handle.apply(b, c)
}
if (document.addEventListener) {
y.each({
focus: "focusin",
blur: "focusout"
}, function(a, b) {
y.event.special[b] = {
setup: function() {
this.addEventListener(a, handler, true)
},
teardown: function() {
this.removeEventListener(a, handler, true)
}
};
function handler(e) {
e = y.event.fix(e);
e.type = b;
return y.event.handle.call(this, e)
}
})
}
y.each(["bind", "one"], function(i, g) {
y.fn[g] = function(b, c, d) {
if (typeof b === "object") {
for (var e in b) {
this[g](e, c, b[e], d)
}
return this
}
if (y.isFunction(c)) {
d = c;
c = x
}
var f = g === "one" ? y.proxy(d, function(a) {
y(this).unbind(a, f);
return d.apply(this, arguments)
}) : d;
if (b === "unload" && g !== "one") {
this.one(b, c, d)
} else {
for (var i = 0, l = this.length; i < l; i++) {
y.event.add(this[i], b, f, c)
}
}
return this
}
});
y.fn.extend({
unbind: function(a, b) {
if (typeof a === "object" && !a.preventDefault) {
for (var c in a) {
this.unbind(c, a[c])
}
} else {
for (var i = 0, l = this.length; i < l; i++) {
y.event.remove(this[i], a, b)
}
}
return this
},
delegate: function(a, b, c, d) {
return this.live(b, c, d, a)
},
undelegate: function(a, b, c) {
if (arguments.length === 0) {
return this.unbind("live")
} else {
return this.die(b, null, c, a)
}
},
trigger: function(a, b) {
return this.each(function() {
y.event.trigger(a, b, this)
})
},
triggerHandler: function(a, b) {
if (this[0]) {
var c = y.Event(a);
c.preventDefault();
c.stopPropagation();
y.event.trigger(c, b, this[0]);
return c.result
}
},
toggle: function(c) {
var d = arguments,
i = 1;
while (i < d.length) {
y.proxy(c, d[i++])
}
return this.click(y.proxy(c, function(a) {
var b = (y.data(this, "lastToggle" + c.guid) || 0) % i;
y.data(this, "lastToggle" + c.guid, b + 1);
a.preventDefault();
return d[b].apply(this, arguments) || false
}))
},
hover: function(a, b) {
return this.mouseenter(a).mouseleave(b || a)
}
});
var F = {
focus: "focusin",
blur: "focusout",
mouseenter: "mouseover",
mouseleave: "mouseout"
};
y.each(["live", "die"], function(i, f) {
y.fn[f] = function(a, b, c, d) {
var e, i = 0,
match, namespaces, preType, selector = d || this.selector,
context = d ? this : y(this.context);
if (y.isFunction(b)) {
c = b;
b = x
}
a = (a || "").split(" ");
while ((e = a[i++]) != null) {
match = B.exec(e);
namespaces = "";
if (match) {
namespaces = match[0];
e = e.replace(B, "")
}
if (e === "hover") {
a.push("mouseenter" + namespaces, "mouseleave" + namespaces);
continue
}
preType = e;
if (e === "focus" || e === "blur") {
a.push(F[e] + namespaces);
e = e + namespaces
} else {
e = (F[e] || e) + namespaces
}
if (f === "live") {
context.each(function() {
y.event.add(this, liveConvert(e, selector), {
data: b,
selector: selector,
handler: c,
origType: e,
origHandler: c,
preType: preType
})
})
} else {
context.unbind(liveConvert(e, selector), c)
}
}
return this
}
});
function liveHandler(a) {
var b, elems = [],
selectors = [],
args = arguments,
related, match, handleObj, elem, j, i, l, data, events = y.data(this, "events");
if (a.liveFired === this || !events || !events.live || a.button && a.type === "click") {
return
}
a.liveFired = this;
var c = events.live.slice(0);
for (j = 0; j < c.length; j++) {
handleObj = c[j];
if (handleObj.origType.replace(B, "") === a.type) {
selectors.push(handleObj.selector)
} else {
c.splice(j--, 1)
}
}
match = y(a.target).closest(selectors, a.currentTarget);
for (i = 0, l = match.length; i < l; i++) {
for (j = 0; j < c.length; j++) {
handleObj = c[j];
if (match[i].selector === handleObj.selector) {
elem = match[i].elem;
related = null;
if (handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave") {
related = y(a.relatedTarget).closest(handleObj.selector)[0]
}
if (!related || related !== elem) {
elems.push({
elem: elem,
handleObj: handleObj
})
}
}
}
}
for (i = 0, l = elems.length; i < l; i++) {
match = elems[i];
a.currentTarget = match.elem;
a.data = match.handleObj.data;
a.handleObj = match.handleObj;
if (match.handleObj.origHandler.apply(match.elem, args) === false) {
b = false;
break
}
}
return b
}
function liveConvert(a, b) {
return "live." + (a && a !== "*" ? a + "." : "") + b.replace(/\./g, "`").replace(/ /g, "&")
}
y.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(i, b) {
y.fn[b] = function(a) {
return a ? this.bind(b, a) : this.trigger(b)
};
if (y.attrFn) {
y.attrFn[b] = true
}
});
if (w.attachEvent && !w.addEventListener) {
w.attachEvent("onunload", function() {
for (var a in y.cache) {
if (y.cache[a].handle) {
try {
y.event.remove(y.cache[a].handle.elem)
} catch (e) {}
}
}
})
}(function() {
var j = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
baseHasDuplicate = true;
[0, 0].sort(function() {
baseHasDuplicate = false;
return 0
});
var k = function(a, b, c, d) {
c = c || [];
var e = b = b || document;
if (b.nodeType !== 1 && b.nodeType !== 9) {
return []
}
if (!a || typeof a !== "string") {
return c
}
var f = [],
m, set, checkSet, extra, prune = true,
contextXML = t(b),
soFar = a;
while ((j.exec(""), m = j.exec(soFar)) !== null) {
soFar = m[3];
f.push(m[1]);
if (m[2]) {
extra = m[3];
break
}
}
if (f.length > 1 && o.exec(a)) {
if (f.length === 2 && n.relative[f[0]]) {
set = u(f[0] + f[1], b)
} else {
set = n.relative[f[0]] ? [b] : k(f.shift(), b);
while (f.length) {
a = f.shift();
if (n.relative[a]) {
a += f.shift()
}
set = u(a, set)
}
}
} else {
if (!d && f.length > 1 && b.nodeType === 9 && !contextXML && n.match.ID.test(f[0]) && !n.match.ID.test(f[f.length - 1])) {
var g = k.find(f.shift(), b, contextXML);
b = g.expr ? k.filter(g.expr, g.set)[0] : g.set[0]
}
if (b) {
var g = d ? {
expr: f.pop(),
set: q(d)
} : k.find(f.pop(), f.length === 1 && (f[0] === "~" || f[0] === "+") && b.parentNode ? b.parentNode : b, contextXML);
set = g.expr ? k.filter(g.expr, g.set) : g.set;
if (f.length > 0) {
checkSet = q(set)
} else {
prune = false
}
while (f.length) {
var h = f.pop(),
pop = h;
if (!n.relative[h]) {
h = ""
} else {
pop = f.pop()
}
if (pop == null) {
pop = b
}
n.relative[h](checkSet, pop, contextXML)
}
} else {
checkSet = f = []
}
}
if (!checkSet) {
checkSet = set
}
if (!checkSet) {
k.error(h || a)
}
if (toString.call(checkSet) === "[object Array]") {
if (!prune) {
c.push.apply(c, checkSet)
} else if (b && b.nodeType === 1) {
for (var i = 0; checkSet[i] != null; i++) {
if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && s(b, checkSet[i]))) {
c.push(set[i])
}
}
} else {
for (var i = 0; checkSet[i] != null; i++) {
if (checkSet[i] && checkSet[i].nodeType === 1) {
c.push(set[i])
}
}
}
} else {
q(checkSet, c)
}
if (extra) {
k(extra, e, c, d);
k.uniqueSort(c)
}
return c
};
k.uniqueSort = function(a) {
if (r) {
hasDuplicate = baseHasDuplicate;
a.sort(r);
if (hasDuplicate) {
for (var i = 1; i < a.length; i++) {
if (a[i] === a[i - 1]) {
a.splice(i--, 1)
}
}
}
}
return a
};
k.matches = function(a, b) {
return k(a, null, null, b)
};
k.find = function(a, b, c) {
var d, match;
if (!a) {
return []
}
for (var i = 0, l = n.order.length; i < l; i++) {
var e = n.order[i],
match;
if ((match = n.leftMatch[e].exec(a))) {
var f = match[1];
match.splice(1, 1);
if (f.substr(f.length - 1) !== "\\") {
match[1] = (match[1] || "").replace(/\\/g, "");
d = n.find[e](match, b, c);
if (d != null) {
a = a.replace(n.match[e], "");
break
}
}
}
}
if (!d) {
d = b.getElementsByTagName("*")
}
return {
set: d,
expr: a
}
};
k.filter = function(a, b, c, d) {
var e = a,
result = [],
curLoop = b,
match, anyFound, isXMLFilter = b && b[0] && t(b[0]);
while (a && b.length) {
for (var f in n.filter) {
if ((match = n.leftMatch[f].exec(a)) != null && match[2]) {
var g = n.filter[f],
found, item, left = match[1];
anyFound = false;
match.splice(1, 1);
if (left.substr(left.length - 1) === "\\") {
continue
}
if (curLoop === result) {
result = []
}
if (n.preFilter[f]) {
match = n.preFilter[f](match, curLoop, c, result, d, isXMLFilter);
if (!match) {
anyFound = found = true
} else if (match === true) {
continue
}
}
if (match) {
for (var i = 0;
(item = curLoop[i]) != null; i++) {
if (item) {
found = g(item, match, i, curLoop);
var h = d ^ !! found;
if (c && found != null) {
if (h) {
anyFound = true
} else {
curLoop[i] = false
}
} else if (h) {
result.push(item);
anyFound = true
}
}
}
}
if (found !== x) {
if (!c) {
curLoop = result
}
a = a.replace(n.match[f], "");
if (!anyFound) {
return []
}
break
}
}
}
if (a === e) {
if (anyFound == null) {
k.error(a)
} else {
break
}
}
e = a
}
return curLoop
};
k.error = function(a) {
throw "Syntax error, unrecognized expression: " + a;
};
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(a) {
return a.getAttribute("href")
}
},
relative: {
"+": function(a, b) {
var c = typeof b === "string",
isTag = c && !/\W/.test(b),
isPartStrNotTag = c && !isTag;
if (isTag) {
b = b.toLowerCase()
}
for (var i = 0, l = a.length, elem; i < l; i++) {
if ((elem = a[i])) {
while ((elem = elem.previousSibling) && elem.nodeType !== 1) {}
a[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === b ? elem || false : elem === b
}
}
if (isPartStrNotTag) {
k.filter(b, a, true)
}
},
">": function(a, b) {
var c = typeof b === "string";
if (c && !/\W/.test(b)) {
b = b.toLowerCase();
for (var i = 0, l = a.length; i < l; i++) {
var d = a[i];
if (d) {
var e = d.parentNode;
a[i] = e.nodeName.toLowerCase() === b ? e : false
}
}
} else {
for (var i = 0, l = a.length; i < l; i++) {
var d = a[i];
if (d) {
a[i] = c ? d.parentNode : d.parentNode === b
}
}
if (c) {
k.filter(b, a, true)
}
}
},
"": function(a, b, c) {
var d = done++,
checkFn = dirCheck;
if (typeof b === "string" && !/\W/.test(b)) {
var e = b = b.toLowerCase();
checkFn = dirNodeCheck
}
checkFn("parentNode", b, d, a, e, c)
},
"~": function(a, b, c) {
var d = done++,
checkFn = dirCheck;
if (typeof b === "string" && !/\W/.test(b)) {
var e = b = b.toLowerCase();
checkFn = dirNodeCheck
}
checkFn("previousSibling", b, d, a, e, c)
}
},
find: {
ID: function(a, b, c) {
if (typeof b.getElementById !== "undefined" && !c) {
var m = b.getElementById(a[1]);
return m ? [m] : []
}
},
NAME: function(a, b) {
if (typeof b.getElementsByName !== "undefined") {
var c = [],
results = b.getElementsByName(a[1]);
for (var i = 0, l = results.length; i < l; i++) {
if (results[i].getAttribute("name") === a[1]) {
c.push(results[i])
}
}
return c.length === 0 ? null : c
}
},
TAG: function(a, b) {
return b.getElementsByTagName(a[1])
}
},
preFilter: {
CLASS: function(a, b, c, d, e, f) {
a = " " + a[1].replace(/\\/g, "") + " ";
if (f) {
return a
}
for (var i = 0, elem;
(elem = b[i]) != null; i++) {
if (elem) {
if (e ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(a) >= 0)) {
if (!c) {
d.push(elem)
}
} else if (c) {
b[i] = false
}
}
}
return false
},
ID: function(a) {
return a[1].replace(/\\/g, "")
},
TAG: function(a, b) {
return a[1].toLowerCase()
},
CHILD: function(a) {
if (a[1] === "nth") {
var b = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]);
a[2] = (b[1] + (b[2] || 1)) - 0;
a[3] = b[3] - 0
}
a[0] = done++;
return a
},
ATTR: function(a, b, c, d, e, f) {
var g = a[1].replace(/\\/g, "");
if (!f && n.attrMap[g]) {
a[1] = n.attrMap[g]
}
if (a[2] === "~=") {
a[4] = " " + a[4] + " "
}
return a
},
PSEUDO: function(a, b, c, d, e) {
if (a[1] === "not") {
if ((j.exec(a[3]) || "").length > 1 || /^\w/.test(a[3])) {
a[3] = k(a[3], null, null, b)
} else {
var f = k.filter(a[3], b, c, true ^ e);
if (!c) {
d.push.apply(d, f)
}
return false
}
} else if (n.match.POS.test(a[0]) || n.match.CHILD.test(a[0])) {
return true
}
return a
},
POS: function(a) {
a.unshift(true);
return a
}
},
filters: {
enabled: function(a) {
return a.disabled === false && a.type !== "hidden"
},
disabled: function(a) {
return a.disabled === true
},
checked: function(a) {
return a.checked === true
},
selected: function(a) {
a.parentNode.selectedIndex;
return a.selected === true
},
parent: function(a) {
return !!a.firstChild
},
empty: function(a) {
return !a.firstChild
},
has: function(a, i, b) {
return !!k(b[3], a).length
},
header: function(a) {
return /h\d/i.test(a.nodeName)
},
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 || a.nodeName.toLowerCase() === "button"
},
input: function(a) {
return /input|select|textarea|button/i.test(a.nodeName)
}
},
setFilters: {
first: function(a, i) {
return i === 0
},
last: function(a, i, b, c) {
return i === c.length - 1
},
even: function(a, i) {
return i % 2 === 0
},
odd: function(a, i) {
return i % 2 === 1
},
lt: function(a, i, b) {
return i < b[3] - 0
},
gt: function(a, i, b) {
return i > b[3] - 0
},
nth: function(a, i, b) {
return b[3] - 0 === i
},
eq: function(a, i, b) {
return b[3] - 0 === i
}
},
filter: {
PSEUDO: function(a, b, i, c) {
var d = b[1],
filter = n.filters[d];
if (filter) {
return filter(a, i, b, c)
} else if (d === "contains") {
return (a.textContent || a.innerText || getText([a]) || "").indexOf(b[3]) >= 0
} else if (d === "not") {
var e = b[3];
for (var i = 0, l = e.length; i < l; i++) {
if (e[i] === a) {
return false
}
}
return true
} else {
k.error("Syntax error, unrecognized expression: " + d)
}
},
CHILD: function(a, b) {
var c = b[1],
node = a;
switch (c) {
case 'only':
case 'first':
while ((node = node.previousSibling)) {
if (node.nodeType === 1) {
return false
}
}
if (c === "first") {
return true
}
node = a;
case 'last':
while ((node = node.nextSibling)) {
if (node.nodeType === 1) {
return false
}
}
return true;
case 'nth':
var d = b[2],
last = b[3];
if (d === 1 && last === 0) {
return true
}
var e = b[0],
parent = a.parentNode;
if (parent && (parent.sizcache !== e || !a.nodeIndex)) {
var f = 0;
for (node = parent.firstChild; node; node = node.nextSibling) {
if (node.nodeType === 1) {
node.nodeIndex = ++f
}
}
parent.sizcache = e
}
var g = a.nodeIndex - last;
if (d === 0) {
return g === 0
} else {
return (g % d === 0 && g / d >= 0)
}
}
},
ID: function(a, b) {
return a.nodeType === 1 && a.getAttribute("id") === b
},
TAG: function(a, b) {
return (b === "*" && a.nodeType === 1) || a.nodeName.toLowerCase() === b
},
CLASS: function(a, b) {
return (" " + (a.className || a.getAttribute("class")) + " ").indexOf(b) > -1
},
ATTR: function(a, b) {
var c = b[1],
result = n.attrHandle[c] ? n.attrHandle[c](a) : a[c] != null ? a[c] : a.getAttribute(c),
value = result + "",
p = b[2],
check = b[4];
return result == null ? p === "!=" : p === "=" ? value === check : p === "*=" ? value.indexOf(check) >= 0 : p === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : p === "!=" ? value !== check : p === "^=" ? value.indexOf(check) === 0 : p === "$=" ? value.substr(value.length - check.length) === check : p === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false
},
POS: function(a, b, i, c) {
var d = b[2],
filter = n.setFilters[d];
if (filter) {
return filter(a, i, b, c)
}
}
}
};
var o = n.match.POS;
for (var p in n.match) {
n.match[p] = new RegExp(n.match[p].source + /(?![^\[]*\])(?![^\(]*\))/.source);
n.leftMatch[p] = new RegExp(/(^(?:.|\r|\n)*?)/.source + n.match[p].source.replace(/\\(\d+)/g, function(a, b) {
return "\\" + (b - 0 + 1)
}))
}
var q = function(a, b) {
a = Array.prototype.slice.call(a, 0);
if (b) {
b.push.apply(b, a);
return b
}
return a
};
try {
Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType
} catch (e) {
q = function(a, b) {
var c = b || [];
if (toString.call(a) === "[object Array]") {
Array.prototype.push.apply(c, a)
} else {
if (typeof a.length === "number") {
for (var i = 0, l = a.length; i < l; i++) {
c.push(a[i])
}
} else {
for (var i = 0; a[i]; i++) {
c.push(a[i])
}
}
}
return c
}
}
var r;
if (document.documentElement.compareDocumentPosition) {
r = function(a, b) {
if (!a.compareDocumentPosition || !b.compareDocumentPosition) {
if (a == b) {
hasDuplicate = true
}
return a.compareDocumentPosition ? -1 : 1
}
var c = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
if (c === 0) {
hasDuplicate = true
}
return c
}
} else if ("sourceIndex" in document.documentElement) {
r = function(a, b) {
if (!a.sourceIndex || !b.sourceIndex) {
if (a == b) {
hasDuplicate = true
}
return a.sourceIndex ? -1 : 1
}
var c = a.sourceIndex - b.sourceIndex;
if (c === 0) {
hasDuplicate = true
}
return c
}
} else if (document.createRange) {
r = function(a, b) {
if (!a.ownerDocument || !b.ownerDocument) {
if (a == b) {
hasDuplicate = true
}
return a.ownerDocument ? -1 : 1
}
var c = a.ownerDocument.createRange(),
bRange = b.ownerDocument.createRange();
c.setStart(a, 0);
c.setEnd(a, 0);
bRange.setStart(b, 0);
bRange.setEnd(b, 0);
var d = c.compareBoundaryPoints(Range.START_TO_END, bRange);
if (d === 0) {
hasDuplicate = true
}
return d
}
}
function getText(a) {
var b = "",
elem;
for (var i = 0; a[i]; i++) {
elem = a[i];
if (elem.nodeType === 3 || elem.nodeType === 4) {
b += elem.nodeValue
} else if (elem.nodeType !== 8) {
b += getText(elem.childNodes)
}
}
return b
}(function() {
var d = document.createElement("div"),
id = "script" + (new Date).getTime();
d.innerHTML = "<a name='" + id + "'/>";
var e = document.documentElement;
e.insertBefore(d, e.firstChild);
if (document.getElementById(id)) {
n.find.ID = function(a, b, c) {
if (typeof b.getElementById !== "undefined" && !c) {
var m = b.getElementById(a[1]);
return m ? m.id === a[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === a[1] ? [m] : x : []
}
};
n.filter.ID = function(a, b) {
var c = typeof a.getAttributeNode !== "undefined" && a.getAttributeNode("id");
return a.nodeType === 1 && c && c.nodeValue === b
}
}
e.removeChild(d);
e = d = null
})();
(function() {
var e = document.createElement("div");
e.appendChild(document.createComment(""));
if (e.getElementsByTagName("*").length > 0) {
n.find.TAG = function(a, b) {
var c = b.getElementsByTagName(a[1]);
if (a[1] === "*") {
var d = [];
for (var i = 0; c[i]; i++) {
if (c[i].nodeType === 1) {
d.push(c[i])
}
}
c = d
}
return c
}
}
e.innerHTML = "<a href='#'></a>";
if (e.firstChild && typeof e.firstChild.getAttribute !== "undefined" && e.firstChild.getAttribute("href") !== "#") {
n.attrHandle.href = function(a) {
return a.getAttribute("href", 2)
}
}
e = null
})();
if (document.querySelectorAll) {
(function() {
var f = k,
div = document.createElement("div");
div.innerHTML = "<p class='TEST'></p>";
if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) {
return
}
k = function(a, b, c, d) {
b = b || document;
if (!d && b.nodeType === 9 && !t(b)) {
try {
return q(b.querySelectorAll(a), c)
} catch (e) {}
}
return f(a, b, c, d)
};
for (var g in f) {
k[g] = f[g]
}
div = null
})()
}(function() {
var d = document.createElement("div");
d.innerHTML = "<div class='test e'></div><div class='test'></div>";
if (!d.getElementsByClassName || d.getElementsByClassName("e").length === 0) {
return
}
d.lastChild.className = "e";
if (d.getElementsByClassName("e").length === 1) {
return
}
n.order.splice(1, 0, "CLASS");
n.find.CLASS = function(a, b, c) {
if (typeof b.getElementsByClassName !== "undefined" && !c) {
return b.getElementsByClassName(a[1])
}
};
d = null
})();
function dirNodeCheck(a, b, c, d, e, f) {
for (var i = 0, l = d.length; i < l; i++) {
var g = d[i];
if (g) {
g = g[a];
var h = false;
while (g) {
if (g.sizcache === c) {
h = d[g.sizset];
break
}
if (g.nodeType === 1 && !f) {
g.sizcache = c;
g.sizset = i
}
if (g.nodeName.toLowerCase() === b) {
h = g;
break
}
g = g[a]
}
d[i] = h
}
}
}
function dirCheck(a, b, c, d, e, f) {
for (var i = 0, l = d.length; i < l; i++) {
var g = d[i];
if (g) {
g = g[a];
var h = false;
while (g) {
if (g.sizcache === c) {
h = d[g.sizset];
break
}
if (g.nodeType === 1) {
if (!f) {
g.sizcache = c;
g.sizset = i
}
if (typeof b !== "string") {
if (g === b) {
h = true;
break
}
} else if (k.filter(b, [g]).length > 0) {
h = g;
break
}
}
g = g[a]
}
d[i] = h
}
}
}
var s = document.compareDocumentPosition ?
function(a, b) {
return !!(a.compareDocumentPosition(b) & 16)
} : function(a, b) {
return a !== b && (a.contains ? a.contains(b) : true)
};
var t = function(a) {
var b = (a ? a.ownerDocument || a : 0).documentElement;
return b ? b.nodeName !== "HTML" : false
};
var u = function(a, b) {
var c = [],
later = "",
match, root = b.nodeType ? [b] : b;
while ((match = n.match.PSEUDO.exec(a))) {
later += match[0];
a = a.replace(n.match.PSEUDO, "")
}
a = n.relative[a] ? a + "*" : a;
for (var i = 0, l = root.length; i < l; i++) {
k(a, root[i], c)
}
return k.filter(later, c)
};
y.find = k;
y.expr = k.selectors;
y.expr[":"] = y.expr.filters;
y.unique = k.uniqueSort;
y.text = getText;
y.isXMLDoc = t;
y.contains = s;
return;
w.Sizzle = k
})();
var G = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
rmultiselector = /,/,
slice = Array.prototype.slice;
var H = function(b, c, d) {
if (y.isFunction(c)) {
return y.grep(b, function(a, i) {
return !!c.call(a, i, a) === d
})
} else if (c.nodeType) {
return y.grep(b, function(a, i) {
return (a === c) === d
})
} else if (typeof c === "string") {
var e = y.grep(b, function(a) {
return a.nodeType === 1
});
if (isSimple.test(c)) {
return y.filter(c, e, !d)
} else {
c = y.filter(c, e)
}
}
return y.grep(b, function(a, i) {
return (y.inArray(a, c) >= 0) === d
})
};
y.fn.extend({
find: function(a) {
var b = this.pushStack("", "find", a),
length = 0;
for (var i = 0, l = this.length; i < l; i++) {
length = b.length;
y.find(a, this[i], b);
if (i > 0) {
for (var n = length; n < b.length; n++) {
for (var r = 0; r < length; r++) {
if (b[r] === b[n]) {
b.splice(n--, 1);
break
}
}
}
}
}
return b
},
has: function(a) {
var b = y(a);
return this.filter(function() {
for (var i = 0, l = b.length; i < l; i++) {
if (y.contains(this, b[i])) {
return true
}
}
})
},
not: function(a) {
return this.pushStack(H(this, a, false), "not", a)
},
filter: function(a) {
return this.pushStack(H(this, a, true), "filter", a)
},
is: function(a) {
return !!a && y.filter(a, this).length > 0
},
closest: function(b, c) {
if (y.isArray(b)) {
var d = [],
cur = this[0],
match, matches = {},
selector;
if (cur && b.length) {
for (var i = 0, l = b.length; i < l; i++) {
selector = b[i];
if (!matches[selector]) {
matches[selector] = y.expr.match.POS.test(selector) ? y(selector, c || this.context) : selector
}
}
while (cur && cur.ownerDocument && cur !== c) {
for (selector in matches) {
match = matches[selector];
if (match.jquery ? match.index(cur) > -1 : y(cur).is(match)) {
d.push({
selector: selector,
elem: cur
});
delete matches[selector]
}
}
cur = cur.parentNode
}
}
return d
}
var e = y.expr.match.POS.test(b) ? y(b, c || this.context) : null;
return this.map(function(i, a) {
while (a && a.ownerDocument && a !== c) {
if (e ? e.index(a) > -1 : y(a).is(b)) {
return a
}
a = a.parentNode
}
return null
})
},
index: function(a) {
if (!a || typeof a === "string") {
return y.inArray(this[0], a ? y(a) : this.parent().children())
}
return y.inArray(a.jquery ? a[0] : a, this)
},
add: function(a, b) {
var c = typeof a === "string" ? y(a, b || this.context) : y.makeArray(a),
all = y.merge(this.get(), c);
return this.pushStack(isDisconnected(c[0]) || isDisconnected(all[0]) ? all : y.unique(all))
},
andSelf: function() {
return this.add(this.prevObject)
}
});
function isDisconnected(a) {
return !a || !a.parentNode || a.parentNode.nodeType === 11
}
y.each({
parent: function(a) {
var b = a.parentNode;
return b && b.nodeType !== 11 ? b : null
},
parents: function(a) {
return y.dir(a, "parentNode")
},
parentsUntil: function(a, i, b) {
return y.dir(a, "parentNode", b)
},
next: function(a) {
return y.nth(a, 2, "nextSibling")
},
prev: function(a) {
return y.nth(a, 2, "previousSibling")
},
nextAll: function(a) {
return y.dir(a, "nextSibling")
},
prevAll: function(a) {
return y.dir(a, "previousSibling")
},
nextUntil: function(a, i, b) {
return y.dir(a, "nextSibling", b)
},
prevUntil: function(a, i, b) {
return y.dir(a, "previousSibling", b)
},
siblings: function(a) {
return y.sibling(a.parentNode.firstChild, a)
},
children: function(a) {
return y.sibling(a.firstChild)
},
contents: function(a) {
return y.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : y.makeArray(a.childNodes)
}
}, function(d, e) {
y.fn[d] = function(a, b) {
var c = y.map(this, e, a);
if (!G.test(d)) {
b = a
}
if (b && typeof b === "string") {
c = y.filter(b, c)
}
c = this.length > 1 ? y.unique(c) : c;
if ((this.length > 1 || rmultiselector.test(b)) && rparentsprev.test(d)) {
c = c.reverse()
}
return this.pushStack(c, d, slice.call(arguments).join(","))
}
});
y.extend({
filter: function(a, b, c) {
if (c) {
a = ":not(" + a + ")"
}
return y.find.matches(a, b)
},
dir: function(a, b, c) {
var d = [],
cur = a[b];
while (cur && cur.nodeType !== 9 && (c === x || cur.nodeType !== 1 || !y(cur).is(c))) {
if (cur.nodeType === 1) {
d.push(cur)
}
cur = cur[b]
}
return d
},
nth: function(a, b, c, d) {
b = b || 1;
var e = 0;
for (; a; a = a[c]) {
if (a.nodeType === 1 && ++e === b) {
break
}
}
return a
},
sibling: function(n, a) {
var r = [];
for (; n; n = n.nextSibling) {
if (n.nodeType === 1 && n !== a) {
r.push(n)
}
}
return r
}
});
var I = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
rnocache = /<script|<object|<embed|<option|<style/i,
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
fcloseTag = function(a, b, c) {
return rselfClosing.test(c) ? a : b + "></" + c + ">"
},
wrapMap = {
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, "", ""]
};
wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
if (!y.support.htmlSerialize) {
wrapMap._default = [1, "div<div>", "</div>"]
}
y.fn.extend({
text: function(b) {
if (y.isFunction(b)) {
return this.each(function(i) {
var a = y(this);
a.text(b.call(this, i, a.text()))
})
}
if (typeof b !== "object" && b !== x) {
return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(b))
}
return y.text(this)
},
wrapAll: function(b) {
if (y.isFunction(b)) {
return this.each(function(i) {
y(this).wrapAll(b.call(this, i))
})
}
if (this[0]) {
var c = y(b, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) {
c.insertBefore(this[0])
}
c.map(function() {
var a = this;
while (a.firstChild && a.firstChild.nodeType === 1) {
a = a.firstChild
}
return a
}).append(this)
}
return this
},
wrapInner: function(b) {
if (y.isFunction(b)) {
return this.each(function(i) {
y(this).wrapInner(b.call(this, i))
})
}
return this.each(function() {
var a = y(this),
contents = a.contents();
if (contents.length) {
contents.wrapAll(b)
} else {
a.append(b)
}
})
},
wrap: function(a) {
return this.each(function() {
y(this).wrapAll(a)
})
},
unwrap: function() {
return this.parent().each(function() {
if (!y.nodeName(this, "body")) {
y(this).replaceWith(this.childNodes)
}
}).end()
},
append: function() {
return this.domManip(arguments, true, function(a) {
if (this.nodeType === 1) {
this.appendChild(a)
}
})
},
prepend: function() {
return this.domManip(arguments, true, function(a) {
if (this.nodeType === 1) {
this.insertBefore(a, this.firstChild)
}
})
},
before: function() {
if (this[0] && this[0].parentNode) {
return this.domManip(arguments, false, function(a) {
this.parentNode.insertBefore(a, this)
})
} else if (arguments.length) {
var b = y(arguments[0]);
b.push.apply(b, this.toArray());
return this.pushStack(b, "before", arguments)
}
},
after: function() {
if (this[0] && this[0].parentNode) {
return this.domManip(arguments, false, function(a) {
this.parentNode.insertBefore(a, this.nextSibling)
})
} else if (arguments.length) {
var b = this.pushStack(this, "after", arguments);
b.push.apply(b, y(arguments[0]).toArray());
return b
}
},
remove: function(a, b) {
for (var i = 0, elem;
(elem = this[i]) != null; i++) {
if (!a || y.filter(a, [elem]).length) {
if (!b && elem.nodeType === 1) {
y.cleanData(elem.getElementsByTagName("*"));
y.cleanData([elem])
}
if (elem.parentNode) {
elem.parentNode.removeChild(elem)
}
}
}
return this
},
empty: function() {
for (var i = 0, elem;
(elem = this[i]) != null; i++) {
if (elem.nodeType === 1) {
y.cleanData(elem.getElementsByTagName("*"))
}
while (elem.firstChild) {
elem.removeChild(elem.firstChild)
}
}
return this
},
clone: function(c) {
var d = this.map(function() {
if (!y.support.noCloneEvent && !y.isXMLDoc(this)) {
var a = this.outerHTML,
ownerDocument = this.ownerDocument;
if (!a) {
var b = ownerDocument.createElement("div");
b.appendChild(this.cloneNode(true));
a = b.innerHTML
}
return y.clean([a.replace(I, "").replace(/=([^="'>\s]+\/)>/g, '="$1">').replace(rleadingWhitespace, "")], ownerDocument)[0]
} else {
return this.cloneNode(true)
}
});
if (c === true) {
cloneCopyEvent(this, d);
cloneCopyEvent(this.find("*"), d.find("*"))
}
return d
},
html: function(b) {
if (b === x) {
return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(I, "") : null
} else if (typeof b === "string" && !rnocache.test(b) && (y.support.leadingWhitespace || !rleadingWhitespace.test(b)) && !wrapMap[(rtagName.exec(b) || ["", ""])[1].toLowerCase()]) {
b = b.replace(rxhtmlTag, fcloseTag);
try {
for (var i = 0, l = this.length; i < l; i++) {
if (this[i].nodeType === 1) {
y.cleanData(this[i].getElementsByTagName("*"));
this[i].innerHTML = b
}
}
} catch (e) {
this.empty().append(b)
}
} else if (y.isFunction(b)) {
this.each(function(i) {
var a = y(this),
old = a.html();
a.empty().append(function() {
return b.call(this, i, old)
})
})
} else {
this.empty().append(b)
}
return this
},
replaceWith: function(b) {
if (this[0] && this[0].parentNode) {
if (y.isFunction(b)) {
return this.each(function(i) {
var a = y(this),
old = a.html();
a.replaceWith(b.call(this, i, old))
})
}
if (typeof b !== "string") {
b = y(b).detach()
}
return this.each(function() {
var a = this.nextSibling,
parent = this.parentNode;
y(this).remove();
if (a) {
y(a).before(b)
} else {
y(parent).append(b)
}
})
} else {
return this.pushStack(y(y.isFunction(b) ? b() : b), "replaceWith", b)
}
},
detach: function(a) {
return this.remove(a, true)
},
domManip: function(c, d, e) {
var f, first, value = c[0],
scripts = [],
fragment, parent;
if (!y.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test(value)) {
return this.each(function() {
y(this).domManip(c, d, e, true)
})
}
if (y.isFunction(value)) {
return this.each(function(i) {
var a = y(this);
c[0] = value.call(this, i, d ? a.html() : x);
a.domManip(c, d, e)
})
}
if (this[0]) {
parent = value && value.parentNode;
if (y.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length) {
f = {
fragment: parent
}
} else {
f = buildFragment(c, this, scripts)
}
fragment = f.fragment;
if (fragment.childNodes.length === 1) {
first = fragment = fragment.firstChild
} else {
first = fragment.firstChild
}
if (first) {
d = d && y.nodeName(first, "tr");
for (var i = 0, l = this.length; i < l; i++) {
e.call(d ? root(this[i], first) : this[i], i > 0 || f.cacheable || this.length > 1 ? fragment.cloneNode(true) : fragment)
}
}
if (scripts.length) {
y.each(scripts, evalScript)
}
}
return this;
function root(a, b) {
return y.nodeName(a, "table") ? (a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody"))) : a
}
}
});
function cloneCopyEvent(d, e) {
var i = 0;
e.each(function() {
if (this.nodeName !== (d[i] && d[i].nodeName)) {
return
}
var a = y.data(d[i++]),
curData = y.data(this, a),
events = a && a.events;
if (events) {
delete curData.handle;
curData.events = {};
for (var b in events) {
for (var c in events[b]) {
y.event.add(this, b, events[b][c], events[b][c].data)
}
}
}
})
}
function buildFragment(a, b, c) {
var d, cacheable, cacheresults, doc = (b && b[0] ? b[0].ownerDocument || b[0] : document);
if (a.length === 1 && typeof a[0] === "string" && a[0].length < 512 && doc === document && !rnocache.test(a[0]) && (y.support.checkClone || !rchecked.test(a[0]))) {
cacheable = true;
cacheresults = y.fragments[a[0]];
if (cacheresults) {
if (cacheresults !== 1) {
d = cacheresults
}
}
}
if (!d) {
d = doc.createDocumentFragment();
y.clean(a, doc, d, c)
}
if (cacheable) {
y.fragments[a[0]] = cacheresults ? d : 1
}
return {
fragment: d,
cacheable: cacheable
}
}
y.fragments = {};
y.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(d, e) {
y.fn[d] = function(a) {
var b = [],
insert = y(a),
parent = this.length === 1 && this[0].parentNode;
if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
insert[e](this[0]);
return this
} else {
for (var i = 0, l = insert.length; i < l; i++) {
var c = (i > 0 ? this.clone(true) : this).get();
y.fn[e].apply(y(insert[i]), c);
b = b.concat(c)
}
return this.pushStack(b, d, insert.selector)
}
}
});
y.extend({
clean: function(a, b, c, d) {
b = b || document;
if (typeof b.createElement === "undefined") {
b = b.ownerDocument || b[0] && b[0].ownerDocument || document
}
var e = [];
for (var i = 0, elem;
(elem = a[i]) != null; i++) {
if (typeof elem === "number") {
elem += ""
}
if (!elem) {
continue
}
if (typeof elem === "string" && !rhtml.test(elem)) {
elem = b.createTextNode(elem)
} else if (typeof elem === "string") {
elem = elem.replace(rxhtmlTag, fcloseTag);
var f = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(),
wrap = wrapMap[f] || wrapMap._default,
depth = wrap[0],
div = b.createElement("div");
div.innerHTML = wrap[1] + elem + wrap[2];
while (depth--) {
div = div.lastChild
}
if (!y.support.tbody) {
var g = rtbody.test(elem),
tbody = f === "table" && !g ? div.firstChild && div.firstChild.childNodes : wrap[1] === "<table>" && !g ? div.childNodes : [];
for (var j = tbody.length - 1; j >= 0; --j) {
if (y.nodeName(tbody[j], "tbody") && !tbody[j].childNodes.length) {
tbody[j].parentNode.removeChild(tbody[j])
}
}
}
if (!y.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
div.insertBefore(b.createTextNode(rleadingWhitespace.exec(elem)[0]), div.firstChild)
}
elem = div.childNodes
}
if (elem.nodeType) {
e.push(elem)
} else {
e = y.merge(e, elem)
}
}
if (c) {
for (var i = 0; e[i]; i++) {
if (d && y.nodeName(e[i], "script") && (!e[i].type || e[i].type.toLowerCase() === "text/javascript")) {
d.push(e[i].parentNode ? e[i].parentNode.removeChild(e[i]) : e[i])
} else {
if (e[i].nodeType === 1) {
e.splice.apply(e, [i + 1, 0].concat(y.makeArray(e[i].getElementsByTagName("script"))))
}
c.appendChild(e[i])
}
}
}
return e
},
cleanData: function(a) {
var b, id, cache = y.cache,
special = y.event.special,
deleteExpando = y.support.deleteExpando;
for (var i = 0, elem;
(elem = a[i]) != null; i++) {
id = elem[y.expando];
if (id) {
b = cache[id];
if (b.events) {
for (var c in b.events) {
if (special[c]) {
y.event.remove(elem, c)
} else {
C(elem, c, b.handle)
}
}
}
if (deleteExpando) {
delete elem[y.expando]
} else if (elem.removeAttribute) {
elem.removeAttribute(y.expando)
}
delete cache[id]
}
}
}
});
var J = /z-?index|font-?weight|opacity|zoom|line-?height/i,
ralpha = /alpha\([^)]*\)/,
ropacity = /opacity=([^)]*)/,
rfloat = /float/i,
rdashAlpha = /-([a-z])/ig,
rupper = /([A-Z])/g,
rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/,
cssShow = {
position: "absolute",
visibility: "hidden",
display: "block"
},
cssWidth = ["Left", "Right"],
cssHeight = ["Top", "Bottom"],
getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
styleFloat = y.support.cssFloat ? "cssFloat" : "styleFloat",
fcamelCase = function(a, b) {
return b.toUpperCase()
};
y.fn.css = function(d, e) {
return access(this, d, e, true, function(a, b, c) {
if (c === x) {
return y.curCSS(a, b)
}
if (typeof c === "number" && !J.test(b)) {
c += "px"
}
y.style(a, b, c)
})
};
y.extend({
style: function(a, b, c) {
if (!a || a.nodeType === 3 || a.nodeType === 8) {
return x
}
if ((b === "width" || b === "height") && parseFloat(c) < 0) {
c = x
}
var d = a.style || a,
set = c !== x;
if (!y.support.opacity && b === "opacity") {
if (set) {
d.zoom = 1;
var e = parseInt(c, 10) + "" === "NaN" ? "" : "alpha(opacity=" + c * 100 + ")";
var f = d.filter || y.curCSS(a, "filter") || "";
d.filter = ralpha.test(f) ? f.replace(ralpha, e) : e
}
return d.filter && d.filter.indexOf("opacity=") >= 0 ? (parseFloat(ropacity.exec(d.filter)[1]) / 100) + "" : ""
}
if (rfloat.test(b)) {
b = styleFloat
}
b = b.replace(rdashAlpha, fcamelCase);
if (set) {
d[b] = c
}
return d[b]
},
css: function(a, b, c, d) {
if (b === "width" || b === "height") {
var e, props = cssShow,
which = b === "width" ? cssWidth : cssHeight;
function getWH() {
e = b === "width" ? a.offsetWidth : a.offsetHeight;
if (d === "border") {
return
}
y.each(which, function() {
if (!d) {
e -= parseFloat(y.curCSS(a, "padding" + this, true)) || 0
}
if (d === "margin") {
e += parseFloat(y.curCSS(a, "margin" + this, true)) || 0
} else {
e -= parseFloat(y.curCSS(a, "border" + this + "Width", true)) || 0
}
})
}
if (a.offsetWidth !== 0) {
getWH()
} else {
y.swap(a, props, getWH)
}
return Math.max(0, Math.round(e))
}
return y.curCSS(a, b, c)
},
curCSS: function(a, b, c) {
var d, style = a.style,
filter;
if (!y.support.opacity && b === "opacity" && a.currentStyle) {
d = ropacity.test(a.currentStyle.filter || "") ? (parseFloat(RegExp.$1) / 100) + "" : "";
return d === "" ? "1" : d
}
if (rfloat.test(b)) {
b = styleFloat
}
if (!c && style && style[b]) {
d = style[b]
} else if (getComputedStyle) {
if (rfloat.test(b)) {
b = "float"
}
b = b.replace(rupper, "-$1").toLowerCase();
var e = a.ownerDocument.defaultView;
if (!e) {
return null
}
var f = e.getComputedStyle(a, null);
if (f) {
d = f.getPropertyValue(b)
}
if (b === "opacity" && d === "") {
d = "1"
}
} else if (a.currentStyle) {
var g = b.replace(rdashAlpha, fcamelCase);
d = a.currentStyle[b] || a.currentStyle[g];
if (!rnumpx.test(d) && rnum.test(d)) {
var h = style.left,
rsLeft = a.runtimeStyle.left;
a.runtimeStyle.left = a.currentStyle.left;
style.left = g === "fontSize" ? "1em" : (d || 0);
d = style.pixelLeft + "px";
style.left = h;
a.runtimeStyle.left = rsLeft
}
}
return d
},
swap: function(a, b, c) {
var d = {};
for (var e in b) {
d[e] = a.style[e];
a.style[e] = b[e]
}
c.call(a);
for (var e in b) {
a.style[e] = d[e]
}
}
});
if (y.expr && y.expr.filters) {
y.expr.filters.hidden = function(a) {
var b = a.offsetWidth,
height = a.offsetHeight,
skip = a.nodeName.toLowerCase() === "tr";
return b === 0 && height === 0 && !skip ? true : b > 0 && height > 0 && !skip ? false : y.curCSS(a, "display") === "none"
};
y.expr.filters.visible = function(a) {
return !y.expr.filters.hidden(a)
}
}
var K = now(),
rscript = /<script(.|\s)*?\/script>/gi,
rselectTextarea = /select|textarea/i,
rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
jsre = /=\?(&|$)/,
rquery = /\?/,
rts = /(\?|&)_=.*?(&|$)/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
r20 = /%20/g,
_load = y.fn.load;
y.fn.extend({
load: function(c, d, e) {
if (typeof c !== "string") {
return _load.call(this, c)
} else if (!this.length) {
return this
}
var f = c.indexOf(" ");
if (f >= 0) {
var g = c.slice(f, c.length);
c = c.slice(0, f)
}
var h = "GET";
if (d) {
if (y.isFunction(d)) {
e = d;
d = null
} else if (typeof d === "object") {
d = y.param(d, y.ajaxSettings.traditional);
h = "POST"
}
}
var i = this;
y.ajax({
url: c,
type: h,
dataType: "html",
data: d,
complete: function(a, b) {
if (b === "success" || b === "notmodified") {
i.html(g ? y("<div />").append(a.responseText.replace(rscript, "")).find(g) : a.responseText)
}
if (e) {
i.each(e, [a.responseText, b, a])
}
}
});
return this
},
serialize: function() {
return y.param(this.serializeArray())
},
serializeArray: function() {
return this.map(function() {
return this.elements ? y.makeArray(this.elements) : this
}).filter(function() {
return this.name && !this.disabled && (this.checked || rselectTextarea.test(this.nodeName) || rinput.test(this.type))
}).map(function(i, b) {
var c = y(this).val();
return c == null ? null : y.isArray(c) ? y.map(c, function(a, i) {
return {
name: b.name,
value: a
}
}) : {
name: b.name,
value: c
}
}).get()
}
});
y.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(i, o) {
y.fn[o] = function(f) {
return this.bind(o, f)
}
});
y.extend({
get: function(a, b, c, d) {
if (y.isFunction(b)) {
d = d || c;
c = b;
b = null
}
return y.ajax({
type: "GET",
url: a,
data: b,
success: c,
dataType: d
})
},
getScript: function(a, b) {
return y.get(a, null, b, "script")
},
getJSON: function(a, b, c) {
return y.get(a, b, c, "json")
},
post: function(a, b, c, d) {
if (y.isFunction(b)) {
d = d || c;
c = b;
b = {}
}
return y.ajax({
type: "POST",
url: a,
data: b,
success: c,
dataType: d
})
},
ajaxSetup: function(a) {
y.extend(y.ajaxSettings, a)
},
ajaxSettings: {
url: location.href,
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded",
processData: true,
async: true,
xhr: w.XMLHttpRequest && (w.location.protocol !== "file:" || !w.ActiveXObject) ?
function() {
return new w.XMLHttpRequest()
} : function() {
try {
return new w.ActiveXObject("Microsoft.XMLHTTP")
} catch (e) {}
},
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(c) {
var s = y.extend(true, {}, y.ajaxSettings, c);
var d, status, data, callbackContext = c && c.context || s,
type = s.type.toUpperCase();
if (s.data && s.processData && typeof s.data !== "string") {
s.data = y.param(s.data, s.traditional)
}
if (s.dataType === "jsonp") {
if (type === "GET") {
if (!jsre.test(s.url)) {
s.url += (rquery.test(s.url) ? "&" : "?") + (s.jsonp || "callback") + "=?"
}
} else if (!s.data || !jsre.test(s.data)) {
s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"
}
s.dataType = "json"
}
if (s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url))) {
d = s.jsonpCallback || ("jsonp" + K++);
if (s.data) {
s.data = (s.data + "").replace(jsre, "=" + d + "$1")
}
s.url = s.url.replace(jsre, "=" + d + "$1");
s.dataType = "script";
w[d] = w[d] ||
function(a) {
data = a;
success();
complete();
w[d] = x;
try {
delete w[d]
} catch (e) {}
if (i) {
i.removeChild(j)
}
}
}
if (s.dataType === "script" && s.cache === null) {
s.cache = false
}
if (s.cache === false && type === "GET") {
var f = now();
var g = s.url.replace(rts, "$1_=" + f + "$2");
s.url = g + ((g === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + f : "")
}
if (s.data && type === "GET") {
s.url += (rquery.test(s.url) ? "&" : "?") + s.data
}
if (s.global && !y.active++) {
y.event.trigger("ajaxStart")
}
var h = rurl.exec(s.url),
remote = h && (h[1] && h[1] !== location.protocol || h[2] !== location.host);
if (s.dataType === "script" && type === "GET" && remote) {
var i = document.getElementsByTagName("head")[0] || document.documentElement;
var j = document.createElement("script");
j.src = s.url;
if (s.scriptCharset) {
j.charset = s.scriptCharset
}
if (!d) {
var k = false;
j.onload = j.onreadystatechange = function() {
if (!k && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
k = true;
success();
complete();
j.onload = j.onreadystatechange = null;
if (i && j.parentNode) {
i.removeChild(j)
}
}
}
}
i.insertBefore(j, i.firstChild);
return x
}
var l = false;
var m = s.xhr();
if (!m) {
return
}
if (s.username) {
m.open(type, s.url, s.async, s.username, s.password)
} else {
m.open(type, s.url, s.async)
}
try {
if (s.data || c && c.contentType) {
m.setRequestHeader("Content-Type", s.contentType)
}
if (s.ifModified) {
if (y.lastModified[s.url]) {
m.setRequestHeader("If-Modified-Since", y.lastModified[s.url])
}
if (y.etag[s.url]) {
m.setRequestHeader("If-None-Match", y.etag[s.url])
}
}
if (!remote) {
m.setRequestHeader("X-Requested-With", "XMLHttpRequest")
}
m.setRequestHeader("Accept", s.dataType && s.accepts[s.dataType] ? s.accepts[s.dataType] + ", */*" : s.accepts._default)
} catch (e) {}
if (s.beforeSend && s.beforeSend.call(callbackContext, m, s) === false) {
if (s.global && !--y.active) {
y.event.trigger("ajaxStop")
}
m.abort();
return false
}
if (s.global) {
trigger("ajaxSend", [m, s])
}
var n = m.onreadystatechange = function(a) {
if (!m || m.readyState === 0 || a === "abort") {
if (!l) {
complete()
}
l = true;
if (m) {
m.onreadystatechange = y.noop
}
} else if (!l && m && (m.readyState === 4 || a === "timeout")) {
l = true;
m.onreadystatechange = y.noop;
status = a === "timeout" ? "timeout" : !y.httpSuccess(m) ? "error" : s.ifModified && y.httpNotModified(m, s.url) ? "notmodified" : "success";
var b;
if (status === "success") {
try {
data = y.httpData(m, s.dataType, s)
} catch (err) {
status = "parsererror";
b = err
}
}
if (status === "success" || status === "notmodified") {
if (!d) {
success()
}
} else {
y.handleError(s, m, status, b)
}
complete();
if (a === "timeout") {
m.abort()
}
if (s.async) {
m = null
}
}
};
try {
var o = m.abort;
m.abort = function() {
if (m) {
o.call(m)
}
n("abort")
}
} catch (e) {}
if (s.async && s.timeout > 0) {
setTimeout(function() {
if (m && !l) {
n("timeout")
}
}, s.timeout)
}
try {
m.send(type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null)
} catch (e) {
y.handleError(s, m, null, e);
complete()
}
if (!s.async) {
n()
}
function success() {
if (s.success) {
s.success.call(callbackContext, data, status, m)
}
if (s.global) {
trigger("ajaxSuccess", [m, s])
}
}
function complete() {
if (s.complete) {
s.complete.call(callbackContext, m, status)
}
if (s.global) {
trigger("ajaxComplete", [m, s])
}
if (s.global && !--y.active) {
y.event.trigger("ajaxStop")
}
}
function trigger(a, b) {
(s.context ? y(s.context) : y.event).trigger(a, b)
}
return m
},
handleError: function(s, a, b, e) {
if (s.error) {
s.error.call(s.context || s, a, b, e)
}
if (s.global) {
(s.context ? y(s.context) : y.event).trigger("ajaxError", [a, s, e])
}
},
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 (e) {}
return false
},
httpNotModified: function(a, b) {
var c = a.getResponseHeader("Last-Modified"),
etag = a.getResponseHeader("Etag");
if (c) {
y.lastModified[b] = c
}
if (etag) {
y.etag[b] = etag
}
return a.status === 304 || a.status === 0
},
httpData: function(a, b, s) {
var c = a.getResponseHeader("content-type") || "",
xml = b === "xml" || !b && c.indexOf("xml") >= 0,
data = xml ? a.responseXML : a.responseText;
if (xml && data.documentElement.nodeName === "parsererror") {
y.error("parsererror")
}
if (s && s.dataFilter) {
data = s.dataFilter(data, b)
}
if (typeof data === "string") {
if (b === "json" || !b && c.indexOf("json") >= 0) {
data = y.parseJSON(data)
} else if (b === "script" || !b && c.indexOf("javascript") >= 0) {
y.globalEval(data)
}
}
return data
},
param: function(a, c) {
var s = [];
if (c === x) {
c = y.ajaxSettings.traditional
}
if (y.isArray(a) || a.jquery) {
y.each(a, function() {
add(this.name, this.value)
})
} else {
for (var d in a) {
buildParams(d, a[d])
}
}
return s.join("&").replace(r20, "+");
function buildParams(a, b) {
if (y.isArray(b)) {
y.each(b, function(i, v) {
if (c || /\[\]$/.test(a)) {
add(a, v)
} else {
buildParams(a + "[" + (typeof v === "object" || y.isArray(v) ? i : "") + "]", v)
}
})
} else if (!c && b != null && typeof b === "object") {
y.each(b, function(k, v) {
buildParams(a + "[" + k + "]", v)
})
} else {
add(a, b)
}
}
function add(a, b) {
b = y.isFunction(b) ? b() : b;
s[s.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
}
}
});
var L = {},
rfxtypes = /toggle|show|hide/,
rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
timerId, fxAttrs = [
["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
["opacity"]
];
y.fn.extend({
show: function(a, b) {
if (a || a === 0) {
return this.animate(genFx("show", 3), a, b)
} else {
for (var i = 0, l = this.length; i < l; i++) {
var c = y.data(this[i], "olddisplay");
this[i].style.display = c || "";
if (y.css(this[i], "display") === "none") {
var d = this[i].nodeName,
display;
if (L[d]) {
display = L[d]
} else {
var e = y("<" + d + " />").appendTo("body");
display = e.css("display");
if (display === "none") {
display = "block"
}
e.remove();
L[d] = display
}
y.data(this[i], "olddisplay", display)
}
}
for (var j = 0, k = this.length; j < k; j++) {
this[j].style.display = y.data(this[j], "olddisplay") || ""
}
return this
}
},
hide: function(a, b) {
if (a || a === 0) {
return this.animate(genFx("hide", 3), a, b)
} else {
for (var i = 0, l = this.length; i < l; i++) {
var c = y.data(this[i], "olddisplay");
if (!c && c !== "none") {
y.data(this[i], "olddisplay", y.css(this[i], "display"))
}
}
for (var j = 0, k = this.length; j < k; j++) {
this[j].style.display = "none"
}
return this
}
},
_toggle: y.fn.toggle,
toggle: function(b, c) {
var d = typeof b === "boolean";
if (y.isFunction(b) && y.isFunction(c)) {
this._toggle.apply(this, arguments)
} else if (b == null || d) {
this.each(function() {
var a = d ? b : y(this).is(":hidden");
y(this)[a ? "show" : "hide"]()
})
} else {
this.animate(genFx("toggle", 3), b, c)
}
return this
},
fadeTo: function(a, b, c) {
return this.filter(":hidden").css("opacity", 0).show().end().animate({
opacity: b
}, a, c)
},
animate: function(h, i, j, k) {
var l = y.speed(i, j, k);
if (y.isEmptyObject(h)) {
return this.each(l.complete)
}
return this[l.queue === false ? "each" : "queue"](function() {
var f = y.extend({}, l),
p, hidden = this.nodeType === 1 && y(this).is(":hidden"),
self = this;
for (p in h) {
var g = p.replace(rdashAlpha, fcamelCase);
if (p !== g) {
h[g] = h[p];
delete h[p];
p = g
}
if (h[p] === "hide" && hidden || h[p] === "show" && !hidden) {
return f.complete.call(this)
}
if ((p === "height" || p === "width") && this.style) {
f.display = y.css(this, "display");
f.overflow = this.style.overflow
}
if (y.isArray(h[p])) {
(f.specialEasing = f.specialEasing || {})[p] = h[p][1];
h[p] = h[p][0]
}
}
if (f.overflow != null) {
this.style.overflow = "hidden"
}
f.curAnim = y.extend({}, h);
y.each(h, function(a, b) {
var e = new y.fx(self, f, a);
if (rfxtypes.test(b)) {
e[b === "toggle" ? hidden ? "show" : "hide" : b](h)
} else {
var c = rfxnum.exec(b),
start = e.cur(true) || 0;
if (c) {
var d = parseFloat(c[2]),
unit = c[3] || "px";
if (unit !== "px") {
self.style[a] = (d || 1) + unit;
start = ((d || 1) / e.cur(true)) * start;
self.style[a] = start + unit
}
if (c[1]) {
d = ((c[1] === "-=" ? -1 : 1) * d) + start
}
e.custom(start, d, unit)
} else {
e.custom(start, b, "")
}
}
});
return true
})
},
stop: function(a, b) {
var c = y.timers;
if (a) {
this.queue([])
}
this.each(function() {
for (var i = c.length - 1; i >= 0; i--) {
if (c[i].elem === this) {
if (b) {
c[i](true)
}
c.splice(i, 1)
}
}
});
if (!b) {
this.dequeue()
}
return this
}
});
y.each({
slideDown: genFx("show", 1),
slideUp: genFx("hide", 1),
slideToggle: genFx("toggle", 1),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
}
}, function(c, d) {
y.fn[c] = function(a, b) {
return this.animate(d, a, b)
}
});
y.extend({
speed: function(a, b, c) {
var d = a && typeof a === "object" ? a : {
complete: c || !c && b || y.isFunction(a) && a,
duration: a,
easing: c && b || b && !y.isFunction(b) && b
};
d.duration = y.fx.off ? 0 : typeof d.duration === "number" ? d.duration : y.fx.speeds[d.duration] || y.fx.speeds._default;
d.old = d.complete;
d.complete = function() {
if (d.queue !== false) {
y(this).dequeue()
}
if (y.isFunction(d.old)) {
d.old.call(this)
}
};
return d
},
easing: {
linear: function(p, n, a, b) {
return a + b * p
},
swing: function(p, n, a, b) {
return ((-Math.cos(p * Math.PI) / 2) + 0.5) * b + a
}
},
timers: [],
fx: function(a, b, c) {
this.options = b;
this.elem = a;
this.prop = c;
if (!b.orig) {
b.orig = {}
}
}
});
y.fx.prototype = {
update: function() {
if (this.options.step) {
this.options.step.call(this.elem, this.now, this)
}(y.fx.step[this.prop] || y.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]
}
var r = parseFloat(y.css(this.elem, this.prop, a));
return r && r > -10000 ? r : parseFloat(y.curCSS(this.elem, this.prop)) || 0
},
custom: function(b, c, d) {
this.startTime = now();
this.start = b;
this.end = c;
this.unit = d || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var e = this;
function t(a) {
return e.step(a)
}
t.elem = this.elem;
if (t() && y.timers.push(t) && !timerId) {
timerId = setInterval(y.fx.tick, 13)
}
},
show: function() {
this.options.orig[this.prop] = y.style(this.elem, this.prop);
this.options.show = true;
this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
y(this.elem).show()
},
hide: function() {
this.options.orig[this.prop] = y.style(this.elem, this.prop);
this.options.hide = true;
this.custom(this.cur(), 0)
},
step: function(a) {
var t = now(),
done = true;
if (a || t >= this.options.duration + this.startTime) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[this.prop] = 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;
var b = y.data(this.elem, "olddisplay");
this.elem.style.display = b ? b : this.options.display;
if (y.css(this.elem, "display") === "none") {
this.elem.style.display = "block"
}
}
if (this.options.hide) {
y(this.elem).hide()
}
if (this.options.hide || this.options.show) {
for (var p in this.options.curAnim) {
y.style(this.elem, p, this.options.orig[p])
}
}
this.options.complete.call(this.elem)
}
return false
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
var c = this.options.specialEasing && this.options.specialEasing[this.prop];
var d = this.options.easing || (y.easing.swing ? "swing" : "linear");
this.pos = y.easing[c || d](this.state, n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update()
}
return true
}
};
y.extend(y.fx, {
tick: function() {
var a = y.timers;
for (var i = 0; i < a.length; i++) {
if (!a[i]()) {
a.splice(i--, 1)
}
}
if (!a.length) {
y.fx.stop()
}
},
stop: function() {
clearInterval(timerId);
timerId = null
},
speeds: {
slow: 600,
fast: 200,
_default: 400
},
step: {
opacity: function(a) {
y.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 (y.expr && y.expr.filters) {
y.expr.filters.animated = function(b) {
return y.grep(y.timers, function(a) {
return b === a.elem
}).length
}
}
function genFx(a, b) {
var c = {};
y.each(fxAttrs.concat.apply([], fxAttrs.slice(0, b)), function() {
c[this] = a
});
return c
}
if ("getBoundingClientRect" in document.documentElement) {
y.fn.offset = function(a) {
var b = this[0];
if (a) {
return this.each(function(i) {
y.offset.setOffset(this, a, i)
})
}
if (!b || !b.ownerDocument) {
return null
}
if (b === b.ownerDocument.body) {
return y.offset.bodyOffset(b)
}
var c = b.getBoundingClientRect(),
doc = b.ownerDocument,
body = doc.body,
docElem = doc.documentElement,
clientTop = docElem.clientTop || body.clientTop || 0,
clientLeft = docElem.clientLeft || body.clientLeft || 0,
top = c.top + (self.pageYOffset || y.support.boxModel && docElem.scrollTop || body.scrollTop) - clientTop,
left = c.left + (self.pageXOffset || y.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
return {
top: top,
left: left
}
}
} else {
y.fn.offset = function(a) {
var b = this[0];
if (a) {
return this.each(function(i) {
y.offset.setOffset(this, a, i)
})
}
if (!b || !b.ownerDocument) {
return null
}
if (b === b.ownerDocument.body) {
return y.offset.bodyOffset(b)
}
y.offset.initialize();
var c = b.offsetParent,
prevOffsetParent = b,
doc = b.ownerDocument,
computedStyle, docElem = doc.documentElement,
body = doc.body,
defaultView = doc.defaultView,
prevComputedStyle = defaultView ? defaultView.getComputedStyle(b, null) : b.currentStyle,
top = b.offsetTop,
left = b.offsetLeft;
while ((b = b.parentNode) && b !== body && b !== docElem) {
if (y.offset.supportsFixedPosition && prevComputedStyle.position === "fixed") {
break
}
computedStyle = defaultView ? defaultView.getComputedStyle(b, null) : b.currentStyle;
top -= b.scrollTop;
left -= b.scrollLeft;
if (b === c) {
top += b.offsetTop;
left += b.offsetLeft;
if (y.offset.doesNotAddBorder && !(y.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(b.nodeName))) {
top += parseFloat(computedStyle.borderTopWidth) || 0;
left += parseFloat(computedStyle.borderLeftWidth) || 0
}
prevOffsetParent = c, c = b.offsetParent
}
if (y.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible") {
top += parseFloat(computedStyle.borderTopWidth) || 0;
left += parseFloat(computedStyle.borderLeftWidth) || 0
}
prevComputedStyle = computedStyle
}
if (prevComputedStyle.position === "relative" || prevComputedStyle.position === "static") {
top += body.offsetTop;
left += body.offsetLeft
}
if (y.offset.supportsFixedPosition && prevComputedStyle.position === "fixed") {
top += Math.max(docElem.scrollTop, body.scrollTop);
left += Math.max(docElem.scrollLeft, body.scrollLeft)
}
return {
top: top,
left: left
}
}
}
y.offset = {
initialize: function() {
var a = document.body,
container = document.createElement("div"),
innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat(y.curCSS(a, "marginTop", true)) || 0,
html = "<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>";
y.extend(container.style, {
position: "absolute",
top: 0,
left: 0,
margin: 0,
border: 0,
width: "1px",
height: "1px",
visibility: "hidden"
});
container.innerHTML = html;
a.insertBefore(container, a.firstChild);
innerDiv = container.firstChild;
checkDiv = innerDiv.firstChild;
td = innerDiv.nextSibling.firstChild.firstChild;
this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
checkDiv.style.position = checkDiv.style.top = "";
innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
this.doesNotIncludeMarginInBodyOffset = (a.offsetTop !== bodyMarginTop);
a.removeChild(container);
a = container = innerDiv = checkDiv = table = td = null;
y.offset.initialize = y.noop
},
bodyOffset: function(a) {
var b = a.offsetTop,
left = a.offsetLeft;
y.offset.initialize();
if (y.offset.doesNotIncludeMarginInBodyOffset) {
b += parseFloat(y.curCSS(a, "marginTop", true)) || 0;
left += parseFloat(y.curCSS(a, "marginLeft", true)) || 0
}
return {
top: b,
left: left
}
},
setOffset: function(a, b, i) {
if (/static/.test(y.curCSS(a, "position"))) {
a.style.position = "relative"
}
var c = y(a),
curOffset = c.offset(),
curTop = parseInt(y.curCSS(a, "top", true), 10) || 0,
curLeft = parseInt(y.curCSS(a, "left", true), 10) || 0;
if (y.isFunction(b)) {
b = b.call(a, i, curOffset)
}
var d = {
top: (b.top - curOffset.top) + curTop,
left: (b.left - curOffset.left) + curLeft
};
if ("using" in b) {
b.using.call(a, d)
} else {
c.css(d)
}
}
};
y.fn.extend({
position: function() {
if (!this[0]) {
return null
}
var a = this[0],
offsetParent = this.offsetParent(),
offset = this.offset(),
parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? {
top: 0,
left: 0
} : offsetParent.offset();
offset.top -= parseFloat(y.curCSS(a, "marginTop", true)) || 0;
offset.left -= parseFloat(y.curCSS(a, "marginLeft", true)) || 0;
parentOffset.top += parseFloat(y.curCSS(offsetParent[0], "borderTopWidth", true)) || 0;
parentOffset.left += parseFloat(y.curCSS(offsetParent[0], "borderLeftWidth", true)) || 0;
return {
top: offset.top - parentOffset.top,
left: offset.left - parentOffset.left
}
},
offsetParent: function() {
return this.map(function() {
var a = this.offsetParent || document.body;
while (a && (!/^body|html$/i.test(a.nodeName) && y.css(a, "position") === "static")) {
a = a.offsetParent
}
return a
})
}
});
y.each(["Left", "Top"], function(i, c) {
var d = "scroll" + c;
y.fn[d] = function(a) {
var b = this[0],
win;
if (!b) {
return null
}
if (a !== x) {
return this.each(function() {
win = getWindow(this);
if (win) {
win.scrollTo(!i ? a : y(win).scrollLeft(), i ? a : y(win).scrollTop())
} else {
this[d] = a
}
})
} else {
win = getWindow(b);
return win ? ("pageXOffset" in win) ? win[i ? "pageYOffset" : "pageXOffset"] : y.support.boxModel && win.document.documentElement[d] || win.document.body[d] : b[d]
}
}
});
function getWindow(a) {
return ("scrollTo" in a && a.document) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : false
}
y.each(["Height", "Width"], function(i, d) {
var e = d.toLowerCase();
y.fn["inner" + d] = function() {
return this[0] ? y.css(this[0], e, false, "padding") : null
};
y.fn["outer" + d] = function(a) {
return this[0] ? y.css(this[0], e, false, a ? "margin" : "border") : null
};
y.fn[e] = function(b) {
var c = this[0];
if (!c) {
return b == null ? null : this
}
if (y.isFunction(b)) {
return this.each(function(i) {
var a = y(this);
a[e](b.call(this, i, a[e]()))
})
}
return ("scrollTo" in c && c.document) ? c.document.compatMode === "CSS1Compat" && c.document.documentElement["client" + d] || c.document.body["client" + d] : (c.nodeType === 9) ? Math.max(c.documentElement["client" + d], c.body["scroll" + d], c.documentElement["scroll" + d], c.body["offset" + d], c.documentElement["offset" + d]) : b === x ? y.css(c, e) : this.css(e, typeof b === "string" ? b : b + "px")
}
});
w.jQuery = w.$ = y
})(window); |