Skip to content

Instantly share code, notes, and snippets.

@voidfiles
Created June 2, 2012 22:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save voidfiles/2860318 to your computer and use it in GitHub Desktop.
Save voidfiles/2860318 to your computer and use it in GitHub Desktop.
Clipboard.com's Bookmarklet
// Bookmarklet
javascript: (function(a) {
var b = a.document;
try {
a.CLIPBOARD.client.Clipper.instances["_d09a13b8af38e2f71b4f1626c07e1c42"].activate();
return
} catch(e) {}
var c = b.createElement("script"),
d = b.getElementsByTagName("head")[0],
a = a.location.protocol;
d || (d = b.createElement("head"), b.documentElement.insertBefore(d, b.body));
c.type = "text/javascript";
c.async = !0;
c.src = a + "//clipboard.com/js/bookmarklet_boot.js?t=5&random=" + Math.round(99999999 * Math.random()) + "&id=_d09a13b8af38e2f71b4f1626c07e1c42&origin=bookmarklet";
d.appendChild(c)
})(window);
// Postloaded JS
(function(b, f) {
var h = f.getElementsByTagName("head")[0];
h || (h = f.createElement("head"), f.documentElement.insertBefore(h, f.body));
var d = {
"staticBaseUrl": "//d3r3jj4tch5va8.cloudfront.net",
"baseUrl": "clipboard.com",
"defer": false
},
i = d.instanceId || "_",
g = d.origin,
j = d.defer;
try {
b.CLIPBOARD.client.Clipper.instances[g][i].activate();
return
} catch(k) {}
if (! ("function" === typeof b.clipboardClipperInit && !1 === b.clipboardClipperInit())) {
var l,
a = b.CLIPBOARD = b.CLIPBOARD || {};
a.client = a.client || {};
a.client.origins = a.client.origins || {};
a.client.origins[i] = g;
a.config = a.config ||
{};
a.config.staticBaseUrl = d.staticBaseUrl;
a.config.baseUrl = d.baseUrl; (function(a, e) {
var c = f.createElement("script"),
d = !1;
c.type = "text/javascript";
c.async = !0;
c.src = a;
h.appendChild(c);
c.onload = c.onreadystatechange = function() {
var a = !this.readyState || "loaded" === this.readyState || "complete" === this.readyState;
if (!d && a) d = !0,
e(),
c.onload = c.onreadystatechange = null,
c.parentNode.removeChild(c)
}
})(a.config.staticBaseUrl + "/js/1.0.17/" + ("embed" === g ? "clipper_embed.js": "clipper.js"),
function() {
var b = a.client,
e = {
bookmarkletVersion: d.bookmarkletVersion,
instanceId: i,
origin: g
};
b.debug = e.debug = !1;
if (!j) {
if ("embed" === g) e.populateSelectorsThunk = function(a) {
return {
identity: new b.selectors.IdentitySelector(a)
}
},
e.createUiThunk = function(a) {
return new b.ui.EmbedUiController(a)
},
e.allowedMetrics = {
extract: 1,
login: 1,
reviewCancel: 1,
sendFail: 1,
sendSuccess: 1,
sandbox: 1
}; (new b.Clipper(null, e)).activate()
}
})
}
})(window, document);
// Post-Post-Loaded JS
(function(d) {
var a;
a = d.CLIPBOARD = d.CLIPBOARD || {},
d = a;
d.JSON = d.JSON || {};
d.client = d.client || {};
d.client.origins = d.client.origins || {};
d.client.util = {};
d.client.ui = {};
d.client.selectors = {};
d.client.extractors = {};
d.client.popups = {}
})(window);
(function(d, i) {
var g;
d.CLIPBOARD.client.util = {
idSuffix: "_clipboard_314159265",
rewriteClass: "node_clipboard_314159265",
doNotClipAttributeName: "ignore_clipboard_314159265",
doNotClipAllAttributeName: "ignoreAll_clipboard_314159265",
maxArea: Infinity,
clipContainerClass: "clipping_314159265",
addSuffix: function(b) {
return b + this.idSuffix
},
shouldClip: function(b) {
return ! b.attr(this.doNotClipAttributeName) && !b.attr(this.doNotClipAllAttributeName)
},
cullNodeAttributeFlag: "cullNode_clipboard_314159265",
rgbToHex: function() {
function b(b) {
b =
b.toString(16);
return 1 == b.length ? "0" + b: b
}
return function(a, h) {
return "#" + (h && 1 !== h ? b(Math.floor(255 * h)) : "") + b(a[0]) + b(a[1]) + b(a[2])
}
} (),
rectColors: {
blue: {
startColor: [138, 194, 224],
stopColor: [108, 150, 173]
},
green: {
startColor: [156, 209, 142],
stopColor: [57, 130, 53]
},
orange: {
startColor: [246, 230, 18],
stopColor: [237, 144, 23]
},
red: {
startColor: [235, 179, 172],
stopColor: [204, 85, 85]
},
gray: {
startColor: [210, 210, 210],
stopColor: [139, 139, 139]
},
purple: {
startColor: [227, 157, 226],
stopColor: [153, 72, 153]
},
teal: {
startColor: [173,
255, 254],
stopColor: [50, 170, 168]
}
},
applyGradient: function(b, a, h) {
var a = this.rectColors[a] || this.rectColors.blue,
n = d.navigator.userAgent,
h = h || 0.25,
g = "rgba(" + a.startColor.join(",") + ", " + h + ")",
i = "rgba(" + a.stopColor.join(",") + ", " + h + ")",
h = 'progid:DXImageTransform.Microsoft.gradient(startColorstr="' + this.rgbToHex(a.startColor, h) + '", endColorstr="' + this.rgbToHex(a.stopColor, h) + '", GradientType=0)',
g = "linear-gradient(top, " + g + " 0%, " + i + " 100%)";
/Firefox/i.test(n) ? b.cssImportant("background-image", "-moz-" +
g) : /Webkit/i.test(n) ? b.cssImportant("background-image", "-webkit-" + g) : /Opera/i.test(n) ? b.cssImportant("background-image", "-o-" + g) : /MSIE 10/i.test(n) ? b.cssImportant("background-image", "-ms-" + g) : /MSIE [89]/i.test(n) && b.cssImportant("filter", h);
/MSIE 8/i.test(n) ? a = "rgb(" + a.stopColor.join(",") + ")": (a = this.rgbToHsl.apply(null, a.startColor), a[0] *= 360, a[1] = 100 * Math.min(1, Math.max(0, a[1] + 0.1)) + "%", a[2] = 100 * a[2] + "%", a = "hsla(" + a.join(",") + ", 0.5)");
b.cssImportant("border-color", a)
},
rgbToHsl: function(b, a, h) {
var b =
b / 255,
a = a / 255,
h = h / 255,
n = Math.max(b, a, h),
d = Math.min(b, a, h),
g,
i = (n + d) / 2;
if (n == d) g = d = 0;
else {
var v = n - d,
d = 0.5 < i ? v / (2 - n - d) : v / (n + d);
switch (n) {
case b:
g = (a - h) / v + (a < h ? 6: 0);
break;
case a:
g = (h - b) / v + 2;
break;
case h:
g = (b - a) / v + 4
}
g /= 6
}
return [g, d, i]
},
forEach: function(b, a) {
for (var h in b) b.hasOwnProperty(h) && a.call(null, b[h], h)
},
getRangeData: function() {
return d.getSelection ?
function(b) {
var a,
h = {
top: null,
left: null
};
if (0 < d.getSelection().rangeCount) try {
a = d.getSelection().getRangeAt(0);
var n = a.getBoundingClientRect();
h.top =
n.top;
h.left = n.left
} catch(g) {
a = null
}
return {
fragment: a && a.cloneContents() || b.createDocumentFragment(),
text: a ? a.toString() : "",
offset: a ? h: {
top: 0,
left: 0
}
}
}: function(b) {
var a = b.selection.createRange(),
h = b.createElement("div"),
n = {
top: a.boundingTop,
left: a.boundingLeft
};
h.innerHTML = a.htmlText;
for (var b = b.createDocumentFragment(), d = 0, g = h.childNodes.length; d < g; d++) b.appendChild(h.childNodes[d].cloneNode(!0));
return {
fragment: b,
text: a.text,
offset: n
}
}
} (),
trim: function(b, a) {
var h,
d,
g,
b = b + "";
h = a ? (a + "").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^:])/g,
"$1") : " \n\r\t\u000c\u000b\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000";
for (g = 0, d = b.length; g < d; g++) if ( - 1 === h.indexOf(b.charAt(g))) {
b = b.substring(g);
break
}
for (g = b.length - 1; 0 <= g; g--) if ( - 1 === h.indexOf(b.charAt(g))) {
b = b.substring(0, g + 1);
break
}
return - 1 === h.indexOf(b.charAt(0)) ? b: ""
},
safeClone: function(b) {
var a = b.constructor,
b = b[0].cloneNode(!1),
h = [],
n,
g,
i,
u;
g = d.CLIPBOARD.common.blobSanitization.unsafeAttributes;
for (n in g) g.hasOwnProperty(n) && h.push(n);
for (; n = h.pop();) b.removeAttribute(n);
this.removeOurAttributes(a(b));
g = b.attributes;
i = g.length;
for (u = 0; u < i; u++) n = g[u],
/^on/.test(n.name) && h.push(n.name);
for (; n = h.pop();) b.removeAttribute(n);
return a(b)
},
merge: function(b, a) {
var b = b || {},
h;
for (h in a) a.hasOwnProperty(h) && a[h] !== i && (b[h] = a[h]);
return b
},
inherit: function(b) {
for (var a = Array.prototype.slice.call(arguments), b = a.shift(), h = 0; h < a.length; h++) for (var d in a[h]) b.prototype[d] = a[h][d]
},
computeOverlap: function(b, a) {
var h = {
left: Math.max(a.left, b.left),
right: Math.min(a.right, b.right),
top: Math.max(a.top, b.top),
bottom: Math.min(a.bottom, b.bottom)
};
h.width = Math.max(h.right - h.left, 0);
h.height = Math.max(h.bottom - h.top, 0);
h.area = h.width * h.height;
return h
},
dirname: function(b) { - 1 !== b.indexOf("#") && (b = b.replace(/#.*$/, ""));
return /\/$/.test(b) ? b.replace(/\/*$/, "") : b.replace(/\\/g, "/").replace(/\/[^\/]*\/?$/, "")
},
normalizeUri: function(b, a) {
b = this.trim(b);
if ("" === b) b = a.uri;
if ("#" === b.charAt(0)) return a.uri + b;
if (/^(?:file|javascript):/i.test(b)) return "#";
if (/^[A-Za-z][\w+-\.]*:/.test(b)) return b;
if ("/" !== b.charAt(0)) return a.relativeDir + "/" + b;
return "/" === b.charAt(1) ? (b = b.replace(/^\/+/, ""), a.protocol + "//" + b) : a.protocol + "//" + a.domainAndPort + b
},
assureFixedPositioning: function(b) {
var a = b.constructor,
h = {
$element: b,
scrollLeft: 0,
scrollTop: 0,
originalPosition: b.css("position"),
fixed: !1,
scrollTo: function(b, a) {
if (!this.fixed) {
var h = b - this.scrollLeft,
d = a - this.scrollTop;
this.scrollLeft = b;
this.scrollTop = a;
var g = {};
g.top = parseInt(this.$element.css("top")) + d;
d = parseInt(this.$element.css("left")) + h;
if (!isNaN(d)) g.left =
d;
h = parseInt(this.$element.css("right")) - h;
if (!isNaN(h)) g.right = h;
this.$element.cssImportant(g)
}
}
};
b.cssImportant("position", "fixed");
h.fixed = "fixed" === b.css("position");
h.fixed || (b.cssImportant("position", "absolute"), h.scrollTo(a(d).scrollLeft(), a(d).scrollTop()));
g ? g.push(h) : (g = [h], a(d).bind("scroll." + this.eventNamespace.global,
function() {
for (var b = a(d).scrollLeft(), h = a(d).scrollTop(), i = 0; i < g.length; i++) g[i].scrollTo(b, h)
}))
},
retireFixedPositioning: function(b) {
if (g) for (var a = 0; a < g.length; a++) if (g[a].$element ===
b) {
b.cssImportant("position", g[a].originalPosition);
g.splice(a, 1);
break
}
},
disableAllFixies: function() {
g = null
},
eventNamespace: {
global: "CLIPBOARD",
review: "CLIBPOARD_REVIEW"
},
flagAsUnclippable: function(b) {
b.attr(this.doNotClipAllAttributeName, !0)
},
getDimensions: function(b) {
var a = b.trueOffset();
a.width = b.outerWidth();
a.height = b.outerHeight();
a.right = a.left + a.width;
a.bottom = a.top + a.height;
a.area = a.width * a.height;
return a
},
getOuterDimensions: function(b) {
var a = b.trueOffset(),
a = {
left: a.left,
top: a.top
},
h =
parseFloat(b.css("margin-left")),
d = parseFloat(b.css("margin-top"));
0 < h && (a.left -= h);
0 < d && (a.top -= d);
a.width = b.outerWidth(!0);
a.height = b.outerHeight(!0);
a.right = a.left + a.width;
a.bottom = a.top + a.height;
a.area = a.height * a.width;
return a
},
getBoundingDimensions: function(b, a) {
var h = this.getOuterDimensions,
d = h(b);
if (!a || !a.length || b[0] === a[0]) return d;
h = h(a);
d = {
top: Math.min(d.top, h.top),
left: Math.min(d.left, h.left),
bottom: Math.max(d.bottom, h.bottom),
right: Math.max(d.right, h.right)
};
d.width = d.right - d.left;
d.height = d.bottom - d.top;
d.area = d.width * d.height;
return d
},
adjustOffsetForMargins: function(b, a) {
var h = parseFloat(b.css("font-size")),
d = this.convertUnitsOrPercentageToPixels(parseFloat(b.css("margin-left")), h, b.parent().width()),
h = this.convertUnitsOrPercentageToPixels(parseFloat(b.css("margin-top")), h, b.parent().height());
0 < d && (a.left -= d);
0 < h && (a.top -= h)
},
convertUnitsToPixels: function(b, a, h) {
var d;
if (d = /^(?:-?[\d\.]+(px|em|cm|pt|in)?|0%?)$/.exec(b)) {
d[1] || (d[1] = "px");
if (d[1]) switch (b = parseFloat(b),
d[1]) {
case "px":
return b;
case "em":
return b * a;
case "cm":
return b * h / 2.54;
case "in":
return b * h;
case "pt":
return b * h / 72
}
return 0
}
return ! 1
},
convertUnitsOrPercentageToPixels: function(b, a, d, g) {
a = this.convertUnitsToPixels(b, a, d);
return ! 1 !== a ? a: parseFloat(b) / 100 * g
},
removeOurAttributes: function(b) {
b.removeAttr(this.cullNodeAttributeFlag).removeTrueCoordinates()
},
strings: {
error_unknown: "(\u256f\u00b0\u25a1\u00b0\uff09\u256f\ufe35 \u253b\u2501\u253b",
zoom_nowhereToZoom: "Nowhere to zoom :(",
zoom_tooLarge: "Too large to clip :(",
drag_tooLarge: "Too large to clip :(",
send_clipSaveTimedOut: "Error :|",
send_emptyResponseFromPromise: "Error :(",
send_xdmPromiseFail: "Error :(",
send_invalidResponseSavingClip: "Error :\\",
send_promiseRetryCount: "Error :|",
send_saveClipFail: "Error :/",
send_promiseUnavailable: "Error :{",
save_tutorial: "Saved",
save_default: "Saved"
},
cloneableTags: {
embed: 1,
object: 1,
param: 1,
video: 1,
table: 1,
tbody: 1,
thead: 1,
th: 1,
tr: 1,
td: 1
},
semanticBlockTagNames: {
article: 1,
aside: 1,
details: 1,
figcaption: 1,
figure: 1,
footer: 1,
header: 1,
hgroup: 1,
menu: 1,
nav: 1,
section: 1
},
tagsToConvertToDiv: {
body: 1,
center: 1,
iframe: 1,
html: 1,
form: 1
},
isHiddenByAncestry: function() {
return function(b) {
if (b.is("object,param,embed")) return ! 1;
for (var a = this.getDimensions(b), d = b.parents(), b = b.constructor, g = 0, i = d.length; g < i; g++) {
var s = b(d[g]),
u;
if (! (u = "hidden" == s.css("visibility") || 0 === s.css("opacity") || s.attr(this.doNotClipAllAttributeName))) if (u = "hidden" === s.css("overflow")) s = this.getDimensions(s),
u = a.right + 10 < s.left || a.left + 10 > s.right || a.bottom + 10 < s.top || a.top +
10 > s.bottom;
if (u) return ! 0
}
return ! 1
}
} (),
shouldInclude: function(b, a) {
var d = b[0].tagName.toLowerCase();
if (d in {
head: 1,
script: 1,
style: 1,
noscript: 1,
noembed: 1
}) return a.reason = "skipped tag",
!1;
if ("br" === d) return ! 0;
if (!this.shouldClip(b)) return a.reason = "should not clip",
!1;
if ("fixed" === b.css("position")) return a.reason = "fixed position",
!1;
if (b.outerWidth() * b.outerHeight() > this.maxArea) return a.reason = "area too big",
!1;
return this.isHiddenByAncestry(b) ? (a.reason = "hidden by ancestry", !1) : !0
},
disableAutoplayForUrl: function(b,
a) {
var d = b.attr(a);
b.attr(a, d.replace(/(^|&|\?)(autoplay|autostart|isautoplay|config_settings_autoplay)=(?:true|1)($|&)/i, "$1$2=false$3"));
return d !== b.attr(a)
},
copyAttributeIfExists: function(b, a, d, g, K) {
b = b.attr(d);
if (b === i) return ! 1;
a.attr(d, g ? this.normalizeUri(b, K) : b);
return ! 0
},
copyAttributeAndNormalize: function(b, a, d, g) {
return this.copyAttributeIfExists(b, a, d, !0, g)
},
compactCss: function(b) {
function a(a, d) {
var h;
for (h = 0; h < a.length; h++) if (! (a[h] in b)) return;
var g = [];
for (h = 0; h < a.length; h++) g.push(b[a[h]]);
b[d] = g.join(" ");
for (h = 0; h < a.length; h++) delete b[a[h]]
}
function d(a, h) {
var g;
for (g = 0; g < a.length; g++) if (! (a[g] in b)) return;
var i = b[a[0]];
for (g = 1; g < a.length; g++) if (b[a[g]] != i) return;
b[h] = i;
for (g = 0; g < a.length; g++) delete b[a[g]]
}
d(["margin-top", "margin-right", "margin-bottom", "margin-left"], "margin");
a(["margin-top", "margin-right", "margin-bottom", "margin-left"], "margin");
d(["padding-top", "padding-right", "padding-bottom", "padding-left"], "padding");
a(["padding-top", "padding-right", "padding-bottom", "padding-left"],
"padding");
var g = ["top", "right", "bottom", "left"],
i,
s;
for (i = 0; i < g.length; i++) s = g[i],
a(["border-" + s + "-width", "border-" + s + "-style", "border-" + s + "-color"], "border-" + s);
g = ["width", "style", "color"];
for (i = 0; i < g.length; i++) s = g[i],
d(["border-top-" + s, "border-right-" + s, "border-bottom-" + s, "border-left-" + s], "border-" + s);
d(["border-top", "border-right", "border-bottom", "border-left"], "border");
if ("background-position-x" in b || "background-position-y" in b) b["background-position"] = (b["background-position-x"] || "0") + " " +
(b["background-position-y"] || "0"),
delete b["background-position-x"],
delete b["background-position-y"];
g = ["background-color", "background-image", "background-repeat", "background-attachment", "background-position"]; (function() {
if ("background-repeat" in b && -1 !== b["background-repeat"].indexOf(" ")) {
var a = b["background-repeat"].split(" ");
b["background-repeat"] = "repeat" === a[0] ? "repeat" === a[1] ? "repeat": "repeat-x": "repeat" === a[1] ? "repeat-y": "no-repeat"
}
})();
for (i = 0; i < g.length; i++)"initial" == b[g[i]] && delete b[g[i]];
a(["background-color", "background-image", "background-repeat", "background-attachment", "background-position"], "background");
a(["font-style", "font-weight", "font-size", "line-height", "font-family"], "font");
if ("font" in b) s = b.font.split(" "),
b.font = s.slice(0, 3).join(" ") + "/" + s.slice(3).join(" ");
a(["list-style-type", "list-style-position", "list-style-image"], "list-style");
a(["outline-width", "outline-style", "outline-color"], "outline");
g = ["", "-webkit-", "-moz-"];
for (i = 0; i < g.length; i++) d([g[i] + "border-top-right-radius",
g[i] + "border-top-left-radius", g[i] + "border-bottom-right-radius", g[i] + "border-bottom-left-radius"], g[i] + "border-radius");
for (s in b) b.hasOwnProperty(s) && "auto" === b[s] && delete b[s]
},
compactHtml: function(b) {
for (var a = /(<[^<>]*)(style=")([^"]*)(")/gi, d = a.exec(b), g = 0, i = []; d;) {
i.push(b.substring(g, d.index));
i.push(d[1]);
i.push(d[2]);
for (var g = {},
s = /\s*(.+?)\s*:\s*(.+?)\s*(?:;(?!base64,)|$)/g, u = s.exec(d[3]); u;) g[u[1].toLowerCase()] = u[2],
u = s.exec(d[3]);
this.compactCss(g);
for (var v in g) g.hasOwnProperty(v) &&
i.push(v + ":" + g[v] + ";");
i.push(d[4]);
g = a.lastIndex;
d = a.exec(b)
}
i.push(b.substring(g));
return i = i.join("")
},
getElementFromPoint: function() {
return ! d.document.elementFromPoint ?
function() {
return null
}: function(b, a, d, g) {
var i = g.elementFromPoint(b, a);
if (!i) return null;
var s = d(i),
u = s.offset(),
u = {
left: u.left,
top: u.top
};
this.adjustOffsetForMargins(d(i), u);
if ("iframe" === i.nodeName.toLowerCase()) {
b -= u.left - d(g).scrollLeft();
a -= u.top - d(g).scrollTop();
try {
var v = this.getElementFromPoint(b, a, d, s.contents()[0]);
if (v) {
var i =
v,
r = s.trueCoordinates();
u.left += r.left;
u.top += r.top
}
} catch(F) {}
}
this.shouldInclude(s, {}) || (i = null);
i && s.trueCoordinates(u);
return i
}
} (),
rewritePageHtml: function(b, a, d) {
function g(a) {
if (!a.hasClass(s)) {
var r = a[0].childNodes,
F,
E,
u,
y;
if (! (a[0].tagName.toLowerCase() in {
head: 1,
style: 1,
link: 1,
meta: 1,
title: 1,
base: 1,
basefont: 1,
isindex: 1,
textarea: 1,
button: 1,
script: 1
}) && b(r).is(function() {
return 3 === this.nodeType
})) for (F = 0; F < r.length; F++) if (y = r[F], 3 === y.nodeType && (E = y.nodeValue, !(3 >= E.replace(/\s*/, "").length))) {
var J =
r[F + 1];
b(y).remove();
if (d.regexSplit) y = E.split(/([\r\n]{2,})/);
else for (y = []; E;) {
u = /^(.+?)([\r\n]{2,})/.exec(E);
if (!u) {
y.push(E);
break
}
y.push(u[1], u[2]);
E = E.substring(u[0].length)
}
for (E = 0; E < y.length; E++) u = b("<" + i + "/>").addClass(s).text(y[E] + (y[++E] || "")),
J ? u.insertBefore(J) : u.appendTo(a)
}
for (F = 0; F < r.length; F++) 1 === r[F].nodeType && g(b(r[F]))
}
}
if (!b.htmlRewritten) {
var i = "node",
s = this.rewriteClass;
if (b.browser.msie && (!b.support.boxModel || "8.0" === b.browser.version)) i = "span";
var u = a.relativeDir;
b("object").each(function() {
var a,
d,
g;
a = b(this);
d = a.attr("classid");
g = a.attr("type");
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" === d && (a.attr("type") || a.attr("type", "application/x-shockwave-flash"), d = b("param[name=movie]", a), d.length && (d = d.attr("value"), a.attr("data") || a.attr("data_clipboard3141592654", d)));
if (("clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" === g || "application/x-shockwave-flash" === g) && b.support.htmlSerialize) g = b('param[name="wmode"][value="transparent"]', a),
0 === g.length && a.prepend('<param name="wmode" value="transparent">'),
b('param[name="base"]', a).remove(),
a.prepend('<param name="base" value="' + u + '">')
});
b("embed").each(function() {
var a;
b(this).attr("base", u);
a = b(this).attr("wmode");
if (!a || "transparent" !== a) b(this).attr("wmode", "transparent"),
b(this).replaceWith(b(this).clone())
});
b("br").wrap(b("<" + i + "/>").addClass(s));
g(b("body"));
b("iframe").each(function() {
try {
g(b(this).contents().find("body"))
} catch(a) {}
});
b.htmlRewritten = !0
}
},
createSandbox: function(b, a) {
var a = a || "body",
d,
g = {
display: "block",
left: "-10000px",
top: "-10000px",
visibility: "hidden",
border: "none",
position: "absolute",
opacity: 0,
overflow: "hidden",
padding: 0
},
i = !1,
s = b("<style/>").attr("id", this.addSuffix("reset")).attr("type", "text/css");
try {
s.text('.clipping_314159265 { font-family: times, serif; font-size: 16px; font-weight: normal; font-style: normal; color: black; line-height: normal; margin: 0; padding: 0;}.clipping_314159265 td { font-size: 16px;}.clipping_314159265 * { color: black; font: inherit; border: 0;}.clipping_314159265 a { text-decoration: none;}.clipping_314159265 html,.clipping_314159265 address,.clipping_314159265 blockquote,.clipping_314159265 body,.clipping_314159265 dd,.clipping_314159265 div,.clipping_314159265 dl,.clipping_314159265 dt,.clipping_314159265 fieldset,.clipping_314159265 form,.clipping_314159265 frame,.clipping_314159265 frameset,.clipping_314159265 h1,.clipping_314159265 h2,.clipping_314159265 h3,.clipping_314159265 h4,.clipping_314159265 h5,.clipping_314159265 h6,.clipping_314159265 noframes,.clipping_314159265 ol,.clipping_314159265 p,.clipping_314159265 ul,.clipping_314159265 center,.clipping_314159265 dir,.clipping_314159265 hr,.clipping_314159265 menu,.clipping_314159265 pre { display: block;}.clipping_314159265 div { text-align: left;}.clipping_314159265 li { display: list-item; list-style: none; list-style-type: none;}.clipping_314159265 head { display: none;}.clipping_314159265 table { display: table; table-layout: fixed;}.clipping_314159265 tr { display: table-row;}.clipping_314159265 thead { display: table-header-group;}.clipping_314159265 tbody { display: table-row-group;}.clipping_314159265 tfoot { display: table-footer-group;}.clipping_314159265 col { display: table-column;}.clipping_314159265 colgroup { display: table-column-group;}.clipping_314159265 td, .clipping_314159265 th { display: table-cell;}.clipping_314159265 caption { display: table-caption;}.clipping_314159265 th { font-weight: bolder; text-align: center;}.clipping_314159265 caption { text-align: center;}.clipping_314159265 h1 { font-size: 2em; margin: .67em 0;}.clipping_314159265 h2 { font-size: 1.5em; margin: .75em 0;}.clipping_314159265 h3 { font-size: 1.17em; margin: .83em 0;}.clipping_314159265 h4,.clipping_314159265 p,.clipping_314159265 blockquote,.clipping_314159265 ul,.clipping_314159265 fieldset,.clipping_314159265 form,.clipping_314159265 ol,.clipping_314159265 dl,.clipping_314159265 dir,.clipping_314159265 menu { margin: 1.12em 0;}.clipping_314159265 h5 { font-size: .83em; margin: 1.5em 0;}.clipping_314159265 h6 { font-size: .75em; margin: 1.67em 0;}.clipping_314159265 h1,.clipping_314159265 h2,.clipping_314159265 h3,.clipping_314159265 h4,.clipping_314159265 h5,.clipping_314159265 h6,.clipping_314159265 b,.clipping_314159265 strong { font-weight: bolder;}.clipping_314159265 blockquote { margin-left: 40px; margin-right: 40px;}.clipping_314159265 i,.clipping_314159265 cite,.clipping_314159265 em,.clipping_314159265 var,.clipping_314159265 address { font-style: italic; font-weight: normal;}.clipping_314159265 pre,.clipping_314159265 tt,.clipping_314159265 code,.clipping_314159265 kbd,.clipping_314159265 samp { font-family: monospace;}.clipping_314159265 pre { white-space: pre; background-color: transparent; margin: 0; padding: 0;}.clipping_314159265 button,.clipping_314159265 textarea,.clipping_314159265 input,.clipping_314159265 select { display: inline-block; padding: 0; margin: 0;}.clipping_314159265 big { font-size: 1.17em;}.clipping_314159265 small, .clipping_314159265 sub, .clipping_314159265 sup { font-size: .83em;}.clipping_314159265 sub { vertical-align: sub;}.clipping_314159265 sup { vertical-align: super;}.clipping_314159265 table { border-spacing: 2px;}.clipping_314159265 thead, .clipping_314159265 tbody, .clipping_314159265 tfoot { vertical-align: middle;}.clipping_314159265 td, .clipping_314159265 th, .clipping_314159265 tr { vertical-align: inherit;}.clipping_314159265 s, .clipping_314159265 strike, .clipping_314159265 del { text-decoration: line-through;}.clipping_314159265 hr { border: none;}.clipping_314159265 ol,.clipping_314159265 ul,.clipping_314159265 dir,.clipping_314159265 menu,.clipping_314159265 dd { margin-left: 40px;}.clipping_314159265 ol { list-style-type: decimal;}.clipping_314159265 ul, .clipping_314159265 ol { margin: 0; padding: 0;}.clipping_314159265 u, .clipping_314159265 ins { text-decoration: underline;}.clipping_314159265 br:before { content: "A"; white-space: pre-line;}.clipping_314159265 center { text-align: center;}.clipping_314159265 img { border: 0;}')
} catch(u) {
s[0].text =
'.clipping_314159265 { font-family: times, serif; font-size: 16px; font-weight: normal; font-style: normal; color: black; line-height: normal; margin: 0; padding: 0;}.clipping_314159265 td { font-size: 16px;}.clipping_314159265 * { color: black; font: inherit; border: 0;}.clipping_314159265 a { text-decoration: none;}.clipping_314159265 html,.clipping_314159265 address,.clipping_314159265 blockquote,.clipping_314159265 body,.clipping_314159265 dd,.clipping_314159265 div,.clipping_314159265 dl,.clipping_314159265 dt,.clipping_314159265 fieldset,.clipping_314159265 form,.clipping_314159265 frame,.clipping_314159265 frameset,.clipping_314159265 h1,.clipping_314159265 h2,.clipping_314159265 h3,.clipping_314159265 h4,.clipping_314159265 h5,.clipping_314159265 h6,.clipping_314159265 noframes,.clipping_314159265 ol,.clipping_314159265 p,.clipping_314159265 ul,.clipping_314159265 center,.clipping_314159265 dir,.clipping_314159265 hr,.clipping_314159265 menu,.clipping_314159265 pre { display: block;}.clipping_314159265 div { text-align: left;}.clipping_314159265 li { display: list-item; list-style: none; list-style-type: none;}.clipping_314159265 head { display: none;}.clipping_314159265 table { display: table; table-layout: fixed;}.clipping_314159265 tr { display: table-row;}.clipping_314159265 thead { display: table-header-group;}.clipping_314159265 tbody { display: table-row-group;}.clipping_314159265 tfoot { display: table-footer-group;}.clipping_314159265 col { display: table-column;}.clipping_314159265 colgroup { display: table-column-group;}.clipping_314159265 td, .clipping_314159265 th { display: table-cell;}.clipping_314159265 caption { display: table-caption;}.clipping_314159265 th { font-weight: bolder; text-align: center;}.clipping_314159265 caption { text-align: center;}.clipping_314159265 h1 { font-size: 2em; margin: .67em 0;}.clipping_314159265 h2 { font-size: 1.5em; margin: .75em 0;}.clipping_314159265 h3 { font-size: 1.17em; margin: .83em 0;}.clipping_314159265 h4,.clipping_314159265 p,.clipping_314159265 blockquote,.clipping_314159265 ul,.clipping_314159265 fieldset,.clipping_314159265 form,.clipping_314159265 ol,.clipping_314159265 dl,.clipping_314159265 dir,.clipping_314159265 menu { margin: 1.12em 0;}.clipping_314159265 h5 { font-size: .83em; margin: 1.5em 0;}.clipping_314159265 h6 { font-size: .75em; margin: 1.67em 0;}.clipping_314159265 h1,.clipping_314159265 h2,.clipping_314159265 h3,.clipping_314159265 h4,.clipping_314159265 h5,.clipping_314159265 h6,.clipping_314159265 b,.clipping_314159265 strong { font-weight: bolder;}.clipping_314159265 blockquote { margin-left: 40px; margin-right: 40px;}.clipping_314159265 i,.clipping_314159265 cite,.clipping_314159265 em,.clipping_314159265 var,.clipping_314159265 address { font-style: italic; font-weight: normal;}.clipping_314159265 pre,.clipping_314159265 tt,.clipping_314159265 code,.clipping_314159265 kbd,.clipping_314159265 samp { font-family: monospace;}.clipping_314159265 pre { white-space: pre; background-color: transparent; margin: 0; padding: 0;}.clipping_314159265 button,.clipping_314159265 textarea,.clipping_314159265 input,.clipping_314159265 select { display: inline-block; padding: 0; margin: 0;}.clipping_314159265 big { font-size: 1.17em;}.clipping_314159265 small, .clipping_314159265 sub, .clipping_314159265 sup { font-size: .83em;}.clipping_314159265 sub { vertical-align: sub;}.clipping_314159265 sup { vertical-align: super;}.clipping_314159265 table { border-spacing: 2px;}.clipping_314159265 thead, .clipping_314159265 tbody, .clipping_314159265 tfoot { vertical-align: middle;}.clipping_314159265 td, .clipping_314159265 th, .clipping_314159265 tr { vertical-align: inherit;}.clipping_314159265 s, .clipping_314159265 strike, .clipping_314159265 del { text-decoration: line-through;}.clipping_314159265 hr { border: none;}.clipping_314159265 ol,.clipping_314159265 ul,.clipping_314159265 dir,.clipping_314159265 menu,.clipping_314159265 dd { margin-left: 40px;}.clipping_314159265 ol { list-style-type: decimal;}.clipping_314159265 ul, .clipping_314159265 ol { margin: 0; padding: 0;}.clipping_314159265 u, .clipping_314159265 ins { text-decoration: underline;}.clipping_314159265 br:before { content: "A"; white-space: pre-line;}.clipping_314159265 center { text-align: center;}.clipping_314159265 img { border: 0;}'
}
try {
d =
b("<iframe/>").cssImportant(g).attr({
scrolling: "no",
frameborder: 0
}).appendTo(a);
var v = d.contents()[0];
v.open();
v.write("<!doctype html>");
v.close();
d.contents().find("head").append(s).end().find("body").css({
margin: 0
});
i = !0
} catch(r) {
g.display = "block",
d = b("<div/>").cssImportant(g).appendTo(a),
b("#" + this.addSuffix("reset")).length || s.appendTo("head")
}
this.flagAsUnclippable(d);
var F = this;
return {
addSandboxCss: function(a) {
var d = F.addSuffix("clipText"),
a = b("<link/>").attr({
id: d,
rel: "stylesheet",
type: "text/css",
href: a + "/css/1.0.17/clipper_sandbox.css"
});
i ? this.$element.contents().find("head").append(a) : b("#" + d).length || a.appendTo("head")
},
$body: i ? d.contents().find("body") : d,
getDimensions: function() {
return {
width: this.$body.outerWidth(!0),
height: this.$body.outerHeight(!0)
}
},
append: function() {
this.$body.append.apply(this.$body, arguments)
},
html: function(b) {
this.$body.html(b)
},
empty: function() {
this.$body.empty()
},
$element: d,
destroy: function() {
this.$element.remove()
}
}
}
}
})(window);
(function(d) {
function i() {
this.events = {}
}
i.prototype = {
on: function(d, b) {
for (var d = d.split(" "), a = 0, h; a < d.length; a++) h = d[a],
this.events[h] || (this.events[h] = []),
this.events[h].push(b);
return this
},
trigger: function(d, b) {
var a = this.events[d] || [];
if (a.length) {
for (var h = {
name: d
},
i = 0; i < a.length && !(!1 === a[i].call(this, b, h)); i++);
return this
}
},
bubble: function(d) {
var b = this;
return {
to: function(a, h) {
b.on(d,
function(b) {
a.trigger(h || d, b)
});
return b
}
}
},
clear: function(d) {
d ? this.events[d] = [] : this.events = {}
}
};
d.CLIPBOARD.client.EventEmitter =
i
})(window);
(function(d) {
function i() {
this.controls = []
}
i.prototype = {
activate: function() {
this.trigger("activating");
this.doActivate();
for (var d = 0; d < this.controls.length; d++) this.controls[d].activate();
this.trigger("activated")
},
doActivate: function() {},
deactivate: function() {
this.trigger("deactivating");
for (var d = 0; d < this.controls.length; d++) this.controls[d].deactivate();
this.doDeactivate();
this.trigger("deactivated")
},
doDeactivate: function() {},
removeControl: function(d) {
if (d) for (var b = 0; b < this.controls.length; b++) if (this.controls[b] === d) {
this.controls.splice(b,
1);
break
}
},
setLoginState: function() {},
getResources: function() {}
};
d.CLIPBOARD.client.ActivatableControl = i
})(window);
(function(d) {
var i;
function g(b) {
var a = b.getElementsByClassName;
if (d.Prototype && d.Prototype.Version) {
var g = d.Prototype.Version.replace(/_.*$/g, "").split("."),
Q = parseInt(g[0]),
g = parseInt(g[1]);
if (1 >= Q && 5 >= g) return b.getElementsByClassName = function(b) {
return $$("." + b)
},
Array.prototype.shift = function() {
for (var b = this[0], a = 0; a < this.length - 1; a++) this[a] = this[a + 1];
this.length = Math.max(0, this.length - 1);
return b
},
{
getElementsByClassName: a,
stupidFuckingPrototype: !0
}
}
return {
stupidFuckingPrototype: !1
}
}
function b(b,
a, d) {
if (this.shouldLogMetric(b)) a = a || {},
a.origin = this.origin,
this.dao.logMetric((d || "bookmarklet") + "_" + b, a, this.user)
}
function a(b, a) {
b = b || $;
a && b === $ ? this.setActiveSelectorByContext() : this.setActiveSelector(b);
this.ui.enableClipping(this.activeSelector.type);
this.activeSelector.activate()
}
function h() {
this.trigger("clippingCanceled");
this.activeSelector && (this.ui.disableClipping(this.activeSelector.type), this.activeSelector.deactivate())
}
function n(b) {
var a = M.util.strings,
d = M.DataAccess.sendFailureStatus;
switch (b) {
case d.crossDomainPostFailed:
return a.send_xdmPromiseFail;
case d.emptyResponse:
return a.send_emptyResponseFromPromise;
case d.retryCount:
return a.send_promiseRetryCount;
case d.serverSideSave:
return a.send_saveClipFail;
case d.promiseUnavailable:
return a.send_promiseUnavailable;
case d.timeout:
return a.send_clipSaveTimedOut;
case d.malformedResponse:
case d.invalidResponse:
case d.expiredRequest:
case d.expiredSession:
case d.unauthorized:
case d.badRequest:
case d.emptyResult:
return a.send_invalidResponseSavingClip;
default:
return a.error_unknown
}
}
function K(b) {
var a = M.util.strings,
d = M.Selector.failureStatus;
switch (b) {
case d.nowhereToZoom:
return a.zoom_nowhereToZoom;
case d.maxSizeExceededViaZoom:
return a.zoom_tooLarge;
case d.maxSizeExceededViaDrag:
return a.drag_tooLarge;
default:
return a.error_unknown
}
}
function s() {
var d = this;
this.ui.on("preferencesUpdated",
function(a) {
d.dao.updatePreferences(a.preferences);
u.call(d, a.preferences);
b.call(d, "updatePreferences", a.preferences)
}).on("autocompleteTriggered",
function(a) {
b.call(d,
"autocompleteTrigger", {
source: a.source,
type: a.type
})
}).on("embedButtonClicked",
function(b) {
d.selectors.identity && (d.setActiveSelector("identity"), d.activeSelector.setSelection(b.startElement, b.endElement, b.clipData), d.activeSelector.select())
}).on("selectorSwitched",
function(g) {
b.call(d, "selectorSwitch", {
selectorType: g.type
});
h.call(d);
a.call(d, g.type)
}).on("navigated",
function(a) {
b.call(d, "navigate", {
source: a.source
});
switch (a.source) {
case "close":
d.deactivate()
}
}).on("navigated",
function(b) {
"initiate" ===
b.source && ("disabled" === b.status ? h.call(d) : a.call(d, b.type))
}).on("reviewConfirmed",
function(a) {
var g = a.reviewData.annotation || "";
b.call(d, "reviewSubmit", {
method: a.method,
published: a.reviewData.published,
annotated: !!g,
annotationLength: g.length,
postToFacebook: a.reviewData.postToFacebook,
tweet: a.reviewData.tweet
})
}).on("clipConfirmed",
function(b) {
d.ui.showLoadingMessage();
d.dao.sendClip(b.clip);
d.activeSelector.deactivate();
d.ui.disableClipping(d.activeSelector.type)
}).on("reviewOpening",
function() {
d.activeSelector.disableGlobalEvents()
}).on("reviewClosed",
function() {
d.activeSelector.enableGlobalEvents()
}).on("reviewCanceled",
function(a) {
b.call(d, "reviewCancel", {
method: a.method
})
}).on("userDataRequested",
function() {
d.dao.fetchUserData()
})
}
function u(b) {
M.util.merge(this.preferences, b);
this.ui.setPreferences(this.preferences);
var a = this;
M.util.forEach(this.selectors,
function(b) {
b.setPreferences(a.preferences)
})
}
function v(b) {
for (var a = 0; a < this.controls.length; a++) this.controls[a].setLoginState(b)
}
function r(g) {
var h = !1,
i = 0;
return function(Q) {
if (Q.error) b.call(g,
"fetchUserDataFail", {
error: Q.error
});
else if (i++, o.checkedLoginStatus || b.call(g, "launch", {
status: Q.loggedIn ? "loggedIn": "loggedOut",
version: g.bookmarkletVersion
}), o.checkedLoginStatus = !0, Q.thirdPartyCookiesEnabled) {
if (Q.config) d.CLIPBOARD.config = Q.config;
v.call(g, Q.loggedIn);
Q.loggedIn ? (h && 0 < i && b.call(g, "login"), g.user.guid = Q.userGuid, g.user.sessionId = Q.sessionId, g.dao.fetchAutocompleteData(), u.call(g, Q.preferences), a.call(g, g.preferences.defaultSelectorType || $, !0)) : h = !0
} else J.call(g),
b.call(g, "info",
{
data: "3rdPartyCookiesDisabled"
})
}
}
function F() {
var a = this;
this.dao.on("autocompleteDataFailed",
function(d) {
b.call(a, "autocompleteFail", {
error: d.error
})
}).on("autocompleteDataReceived",
function(a) {
d.CLIPBOARD.autocomplete.setData(a.dict)
}).on("sendFailed",
function(d) {
b.call(a, "sendFail", {
reason: d.reason
});
"expiredSession" === d.reason ? (h.call(a), a.dao.fetchUserData()) : a.ui.showErrorNotification(n(d.reason))
}).on("sendSucceeded",
function(d) {
b.call(a, "sendSuccess", {
saveDuration: d.duration,
attempts: d.retryAttempts
});
a.ui.showNotification(M.util.strings.save_default)
}).on("userDataReceived", r(this))
}
function E(a) {
var d = this;
a.on("canceled",
function(a) {
d.ui.hideNotification();
b.call(d, "cancelClipMode", {
source: a.source
});
h.call(d)
}).on("scrolled",
function(a) {
b.call(d, "scrollDuringExtract", {
source: a.source
})
}).on("selectionEnded",
function(a) {
switch (a.selectionType) {
case "bookmark":
d.activeExtractor = d.extractors.bookmark;
break;
case "text":
d.activeExtractor = d.extractors.text;
break;
case "rectangle":
d.activeExtractor =
d.extractors.rectangle;
break;
case "identity":
d.activeExtractor = d.extractors.identity;
break;
default:
b.call(this, "info", {
data: "invalidSelectionType"
});
return
}
d.activeExtractor.extract(a.selectionData, a.extractionContext)
}).on("selectionFailed",
function(a) {
b.call(d, "selectionFail", {
reason: a.reason
});
d.ui.showErrorNotification(K(a.reason))
}).on("bookmarkPage",
function() {
d.ui.showNotification("Bookmark page", -1)
}).on("notBookmarkPage",
function() {
d.ui.hideNotification()
})
}
function O(a) {
var g = this;
a.on("autoplayDisabled",
function(a) {
b.call(g, "autoplayDisable", {
source: a.source
})
}).on("sandboxBuilt",
function(a) {
"iframe" !== a.nodeName && b.call(g, "sandbox", {
type: a.nodeName,
host: d.location.hostname
})
}).on("extracted",
function(d) {
var Q = g.createClip(M.util.merge(d.clipData, {
width: d.dimensions.width,
height: d.dimensions.height,
html: d.html,
type: a.type,
text: d.text,
top: d.top,
left: d.left,
blobSchemaVersion: "0.2"
}));
b.call(g, "extract", {
elapsedTime: d.elapsedTime,
type: d.extractionType,
rectangleColor: g.preferences.rectangleColor,
reviewClip: g.preferences.reviewClip,
publishByDefault: g.preferences.publishByDefault,
connectedToTimeline: g.preferences.connectedToTimeline,
connectedToFbStream: g.preferences.connectedToFbStream,
connectedToTwitter: g.preferences.connectedToTwitter,
compatMode: g.document.compatMode
});
g.ui.handleExtraction({
clip: Q,
rawHtml: d.html
});
"identity" === g.activeSelector.type && g.activeSelector.deactivate()
})
}
function y() {
s.call(this);
F.call(this);
for (var a in this.selectors) this.selectors.hasOwnProperty(a) && E.call(this, this.selectors[a]);
for (a in this.extractors) this.extractors.hasOwnProperty(a) &&
O.call(this, this.extractors[a]);
this.on("activated",
function() {
o.cookiesDisabled && J.call(this)
})
}
function J() {
o.cookiesDisabled = !0;
this.deactivate();
this.ui.show3rdPartyCookiesErrorMessage()
}
function T(a) {
if (L.indexOf) return L.indexOf(a);
for (var d = 0; d < L.length; d++) if (L[d] === a) return d;
return - 1
}
function S(a) {
var a = a("<div/>").css({
position: "absolute",
top: 0,
left: 0,
width: 1,
height: 1,
"margin-top": 0,
"margin-bottom": 0,
"margin-left": 0,
"margin-right": 0,
"background-color": "transparent"
}).appendTo("body"),
d =
a.offset();
a.remove();
return d
}
function t(a) {
var a = a("<div>").css({
width: 0,
height: 0,
display: "none",
"background-color": "rgba(64, 128, 256, 0.25)"
}).appendTo("body"),
d = a.css("background-color");
a.remove();
return /^rgba/.test(d)
}
function z(a) {
var a = a("<div/>").css({
width: "1in",
visibility: "hidden",
position: "absolute",
left: "-10000px",
"padding-top": 0,
"padding-bottom": 0,
"padding-left": 0,
"padding-right": 0
}).appendTo("body"),
d = a.width();
a.remove();
return d
}
function p(a) {
a = a("head base:first").attr("href");
if (!a) a = d.location.href,
a = a.replace(/#.*$/, "");
var b = document.createElement("a");
b.href = a;
a = {
uri: a,
protocol: b.protocol,
host: b.hostname,
port: b.port,
query: b.search,
domainAndPort: /tps?:\/\/([^\/]+)/.exec(b.href)[1],
path: b.pathname.replace(/^([^\/])/, "/$1"),
relative: (b.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ""])[1]
};
a.relativeDir = a.protocol + "//" + a.domainAndPort + M.util.dirname(a.relative);
return a
}
function N() {
var a = H[this.documentId];
if (a.$) return this.$ = a.$,
this.bodyOffset = a.bodyOffset,
this.baseData = a.baseData,
this.xdm = a.xdm,
!1; (function() { (function(a, d) {
function b(c) {
var e = K[c] = {},
f,
x,
c = c.split(/\s+/);
for (f = 0, x = c.length; f < x; f++) e[c[f]] = !0;
return e
}
function g(c, e, k) {
if (k === d && 1 === c.nodeType) if (k = "data-" + e.replace(O, "-$1").toLowerCase(), k = c.getAttribute(k), "string" === typeof k) {
try {
k = "true" === k ? !0: "false" === k ? !1: "null" === k ? null: f.isNumeric(k) ? parseFloat(k) : y.test(k) ? f.parseJSON(k) : k
} catch(x) {}
f.data(c, e, k)
} else k = d;
return k
}
function q(c) {
for (var e in c) if (! ("data" === e && f.isEmptyObject(c[e])) && "toJSON" !==
e) return ! 1;
return ! 0
}
function h(c, e, k) {
var x = e + "defer",
d = e + "queue",
a = e + "mark",
b = f._data(c, x);
b && ("queue" === k || !f._data(c, d)) && ("mark" === k || !f._data(c, a)) && setTimeout(function() { ! f._data(c, d) && !f._data(c, a) && (f.removeData(c, x, !0), b.fire())
},
0)
}
function i() {
return ! 1
}
function p() {
return ! 0
}
function o(c, e, k) {
e = e || 0;
if (f.isFunction(e)) return f.grep(c,
function(c, f) {
return !! e.call(c, f, c) === k
});
if (e.nodeType) return f.grep(c,
function(c) {
return c === e === k
});
if ("string" === typeof e) {
var x = f.grep(c,
function(c) {
return 1 ===
c.nodeType
});
if (Aa.test(e)) return f.filter(e, x, !k);
e = f.filter(e, x)
}
return f.grep(c,
function(c) {
return 0 <= f.inArray(c, e) === k
})
}
function r(c) {
var e = Ia.split("|"),
c = c.createDocumentFragment();
if (c.createElement) for (; e.length;) c.createElement(e.pop());
return c
}
function w(c, e) {
if (1 === e.nodeType && f.hasData(c)) {
var k,
x,
d;
x = f._data(c);
var a = f._data(e, x),
b = x.events;
if (b) for (k in delete a.handle, a.events = {},
b) for (x = 0, d = b[k].length; x < d; x++) f.event.add(e, k + (b[k][x].namespace ? ".": "") + b[k][x].namespace, b[k][x],
b[k][x].data);
if (a.data) a.data = f.extend({},
a.data)
}
}
function t(c, e) {
var k;
if (1 === e.nodeType) {
e.clearAttributes && e.clearAttributes();
e.mergeAttributes && e.mergeAttributes(c);
k = e.nodeName.toLowerCase();
if ("object" === k) e.outerHTML = c.outerHTML;
else if ("input" === k && ("checkbox" === c.type || "radio" === c.type)) {
if (c.checked) e.defaultChecked = e.checked = c.checked;
if (e.value !== c.value) e.value = c.value
} else if ("option" === k) e.selected = c.defaultSelected;
else if ("input" === k || "textarea" === k) e.defaultValue = c.defaultValue;
e.removeAttribute(f.expando)
}
}
function n(c) {
return "undefined" !== typeof c.getElementsByTagName ? c.getElementsByTagName("*") : "undefined" !== typeof c.querySelectorAll ? c.querySelectorAll("*") : []
}
function H(c) {
if ("checkbox" === c.type || "radio" === c.type) c.defaultChecked = c.checked
}
function s(c) {
var e = (c.nodeName || "").toLowerCase();
"input" === e ? H(c) : "script" !== e && "undefined" !== typeof c.getElementsByTagName && f.grep(c.getElementsByTagName("input"), H)
}
function z(c, e) {
e.src ? f.ajax({
url: e.src,
async: !1,
dataType: "script"
}) :
f.globalEval((e.text || e.textContent || e.innerHTML || "").replace(gb, "/*$0*/"));
e.parentNode && e.parentNode.removeChild(e)
}
function F(c, e, k) {
var x = "width" === e ? c.offsetWidth: c.offsetHeight,
d = "width" === e ? hb: ib,
a = 0,
b = d.length;
if (0 < x) {
if ("border" !== k) for (; a < b; a++) k || (x -= parseFloat(f.css(c, "padding" + d[a])) || 0),
x = "margin" === k ? x + (parseFloat(f.css(c, k + d[a])) || 0) : x - (parseFloat(f.css(c, "border" + d[a] + "Width")) || 0);
return x + "px"
}
x = la(c, e, e);
if (0 > x || null == x) x = c.style[e] || 0;
x = parseFloat(x) || 0;
if (k) for (; a < b; a++) x += parseFloat(f.css(c,
"padding" + d[a])) || 0,
"padding" !== k && (x += parseFloat(f.css(c, "border" + d[a] + "Width")) || 0),
"margin" === k && (x += parseFloat(f.css(c, k + d[a])) || 0);
return x + "px"
}
function C(c) {
return function(e, k) {
var B;
"string" !== typeof e && (k = e, e = "*");
if (f.isFunction(k)) for (var x = e.toLowerCase().split(Ja), d = 0, a = x.length, b, j; d < a; d++) b = x[d],
(j = /^\+/.test(b)) && (b = b.substr(1) || "*"),
B = c[b] = c[b] || [],
b = B,
b[j ? "unshift": "push"](k)
}
}
function G(c, e, f, x, a, b) {
a = a || e.dataTypes[0];
b = b || {};
b[a] = !0;
for (var a = c[a], j = 0, g = a ? a.length: 0, l = c === Ca,
m; j < g && (l || !m); j++) m = a[j](e, f, x),
"string" === typeof m && (!l || b[m] ? m = d: (e.dataTypes.unshift(m), m = G(c, e, f, x, m, b)));
if ((l || !m) && !b["*"]) m = G(c, e, f, x, "*", b);
return m
}
function N(c, e) {
var k,
x,
a = f.ajaxSettings.flatOptions || {};
for (k in e) e[k] !== d && ((a[k] ? c: x || (x = {}))[k] = e[k]);
x && f.extend(!0, c, x)
}
function L(c, e, k, x) {
if (f.isArray(e)) f.each(e,
function(e, a) {
k || jb.test(c) ? x(c, a) : L(c + "[" + ("object" === typeof a || f.isArray(a) ? e: "") + "]", a, k, x)
});
else if (!k && null != e && "object" === typeof e) for (var a in e) L(c + "[" + a + "]", e[a],
k, x);
else x(c, e)
}
function v() {
try {
return new a.XMLHttpRequest
} catch(c) {}
}
function u() {
setTimeout(P, 0);
return sa = f.now()
}
function P() {
sa = d
}
function m(c, e) {
var k = {};
f.each(Ka.concat.apply([], Ka.slice(0, e)),
function() {
k[this] = c
});
return k
}
function U(c) {
if (!Da[c]) {
var e = A.body,
k = f("<" + c + ">").appendTo(e),
a = k.css("display");
k.remove();
if ("none" === a || "" === a) {
if (!fa) fa = A.createElement("iframe"),
fa.frameBorder = fa.width = fa.height = 0;
e.appendChild(fa);
if (!ma || !fa.createElement) ma = (fa.contentWindow || fa.contentDocument).document,
ma.write(("CSS1Compat" === A.compatMode ? "<!doctype html>": "") + "<html><body>"),
ma.close();
k = ma.createElement(c);
ma.body.appendChild(k);
a = f.css(k, "display");
e.removeChild(fa)
}
Da[c] = a
}
return Da[c]
}
function W(c) {
return f.isWindow(c) ? c: 9 === c.nodeType ? c.defaultView || c.parentWindow: !1
}
var A = a.document,
E = a.navigator,
M = a.location,
f = function() {
function c() {
if (!e.isReady) {
try {
A.documentElement.doScroll("left")
} catch(f) {
setTimeout(c, 1);
return
}
e.ready()
}
}
var e = function(c, f) {
return new e.fn.init(c, f, b)
},
f = a.jQuery,
x = a.$,
b,
j = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
g = /\S/,
l = /^\s+/,
m = /\s+$/,
D = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
q = /^[\],:{}\s]*$/,
P = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
h = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
B = /(?:^|:|,)(?:\s*\[)+/g,
i = /(webkit)[ \/]([\w.]+)/,
p = /(opera)(?:.*version)?[ \/]([\w.]+)/,
U = /(msie) ([\w.]+)/,
w = /(mozilla)(?:.*? rv:([\w.]+))?/,
C = /-([a-z]|[0-9])/ig,
o = /^-ms-/,
V = function(c, e) {
return (e + "").toUpperCase()
},
X = E.userAgent,
ha,
na,
kb = Object.prototype.toString,
W = Object.prototype.hasOwnProperty,
r = Array.prototype.push,
t = Array.prototype.slice,
G = String.prototype.trim,
n = Array.prototype.indexOf,
H = {};
e.fn = e.prototype = {
constructor: e,
init: function(c, f, k) {
var a;
if (!c) return this;
if (c.nodeType) return this.context = this[0] = c,
this.length = 1,
this;
if ("body" === c && !f && A.body) return this.context = A,
this[0] = A.body,
this.selector = c,
this.length = 1,
this;
if ("string" === typeof c) {
if ((a = "<" === c.charAt(0) && ">" === c.charAt(c.length - 1) && 3 <= c.length ? [null, c, null] : j.exec(c)) && (a[1] || !f)) {
if (a[1]) return k =
(f = f instanceof e ? f[0] : f) ? f.ownerDocument || f: A,
(c = D.exec(c)) ? e.isPlainObject(f) ? (c = [A.createElement(c[1])], e.fn.attr.call(c, f, !0)) : c = [k.createElement(c[1])] : (c = e.buildFragment([a[1]], [k]), c = (c.cacheable ? e.clone(c.fragment) : c.fragment).childNodes),
e.merge(this, c);
if ((f = A.getElementById(a[2])) && f.parentNode) {
if (f.id !== a[2]) return k.find(c);
this.length = 1;
this[0] = f
}
this.context = A;
this.selector = c;
return this
}
return ! f || f.jquery ? (f || k).find(c) : this.constructor(f).find(c)
}
if (e.isFunction(c)) return k.ready(c);
if (c.selector !== d) this.selector = c.selector,
this.context = c.context;
return e.makeArray(c, this)
},
selector: "",
jquery: "1.7.1",
length: 0,
size: function() {
return this.length
},
toArray: function() {
return t.call(this, 0)
},
get: function(c) {
return null == c ? this.toArray() : 0 > c ? this[this.length + c] : this[c]
},
pushStack: function(c, f, k) {
var a = this.constructor();
e.isArray(c) ? r.apply(a, c) : e.merge(a, c);
a.prevObject = this;
a.context = this.context;
if ("find" === f) a.selector = this.selector + (this.selector ? " ": "") + k;
else if (f) a.selector =
this.selector + "." + f + "(" + k + ")";
return a
},
each: function(c, f) {
return e.each(this, c, f)
},
ready: function(c) {
e.bindReady();
ha.add(c);
return this
},
eq: function(c) {
c = +c;
return - 1 === c ? this.slice(c) : this.slice(c, c + 1)
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq( - 1)
},
slice: function() {
return this.pushStack(t.apply(this, arguments), "slice", t.call(arguments).join(","))
},
map: function(c) {
return this.pushStack(e.map(this,
function(e, f) {
return c.call(e, f, e)
}))
},
end: function() {
return this.prevObject ||
this.constructor(null)
},
push: r,
sort: [].sort,
splice: [].splice
};
e.fn.init.prototype = e.fn;
e.extend = e.fn.extend = function() {
var c,
f,
k,
a,
x,
b = arguments[0] || {},
R = 1,
j = arguments.length,
ha = !1;
"boolean" === typeof b && (ha = b, b = arguments[1] || {},
R = 2);
"object" !== typeof b && !e.isFunction(b) && (b = {});
j === R && (b = this, --R);
for (; R < j; R++) if (null != (c = arguments[R])) for (f in c) W.call(c, f) && (k = b[f], a = c[f], b !== a && (ha && a && (e.isPlainObject(a) || (x = e.isArray(a))) ? (x ? (x = !1, k = k && e.isArray(k) ? k: []) : k = k && e.isPlainObject(k) ? k: {},
b[f] = e.extend(ha,
k, a)) : a !== d && (b[f] = a)));
return b
};
e.extend({
noConflict: function(c) {
if (a.$ === e) a.$ = x;
if (c && a.jQuery === e) a.jQuery = f;
return e
},
isReady: !1,
readyWait: 1,
holdReady: function(c) {
c ? e.readyWait++:e.ready(!0)
},
ready: function(c) {
if (!0 === c && !--e.readyWait || !0 !== c && !e.isReady) {
if (!A.body) return setTimeout(e.ready, 1);
e.isReady = !0; ! 0 !== c && 0 < --e.readyWait || (ha.fireWith(A, [e]), e.fn.trigger && e(A).trigger("ready").off("ready"))
}
},
bindReady: function() {
if (!ha) {
ha = e.Callbacks("once memory");
if ("complete" === A.readyState) return setTimeout(e.ready,
1);
if (A.addEventListener) A.addEventListener("DOMContentLoaded", na, !1),
a.addEventListener("load", e.ready, !1);
else if (A.attachEvent) {
A.attachEvent("onreadystatechange", na);
a.attachEvent("onload", e.ready);
var f = !1;
try {
f = null == a.frameElement
} catch(k) {}
A.documentElement.doScroll && f && c()
}
}
},
isFunction: function(c) {
return "function" === e.type(c)
},
isArray: Array.isArray ||
function(c) {
return "array" === e.type(c)
},
isWindow: function(c) {
return c && "object" === typeof c && "setInterval" in c
},
isNumeric: function(c) {
return ! isNaN(parseFloat(c)) &&
isFinite(c)
},
type: function(c) {
return null == c ? "" + c: H[kb.call(c)] || "object"
},
isPlainObject: function(c) {
if (!c || "object" !== e.type(c) || c.nodeType || e.isWindow(c)) return ! 1;
try {
if (c.constructor && !W.call(c, "constructor") && !W.call(c.constructor.prototype, "isPrototypeOf")) return ! 1
} catch(f) {
return ! 1
}
for (var k in c);
return k === d || W.call(c, k)
},
isEmptyObject: function(c) {
for (var e in c) return ! 1;
return ! 0
},
error: function(c) {
throw Error(c);
},
parseJSON: function(c) {
if ("string" !== typeof c || !c) return null;
c = e.trim(c);
if (a.JSON &&
a.JSON.parse) return a.JSON.parse(c);
if (q.test(c.replace(P, "@").replace(h, "]").replace(B, ""))) return (new Function("return " + c))();
e.error("Invalid JSON: " + c)
},
parseXML: function(c) {
var f,
k;
try {
a.DOMParser ? (k = new DOMParser, f = k.parseFromString(c, "text/xml")) : (f = new ActiveXObject("Microsoft.XMLDOM"), f.async = "false", f.loadXML(c))
} catch(x) {
f = d
} (!f || !f.documentElement || f.getElementsByTagName("parsererror").length) && e.error("Invalid XML: " + c);
return f
},
noop: function() {},
globalEval: function(c) {
c && g.test(c) &&
(a.execScript ||
function(c) {
a.eval.call(a, c)
})(c)
},
camelCase: function(c) {
return c.replace(o, "ms-").replace(C, V)
},
nodeName: function(c, e) {
return c.nodeName && c.nodeName.toUpperCase() === e.toUpperCase()
},
each: function(c, f, k) {
var a,
x = 0,
b = c.length,
R = b === d || e.isFunction(c);
if (k) if (R) for (a in c) {
if (W.call(c, a) && !1 === f.apply(c[a], k)) break
} else for (; x < b && !(!1 === f.apply(c[x++], k)););
else if (R) for (a in c) {
if (W.call(c, a) && !1 === f.call(c[a], a, c[a])) break
} else for (; x < b && !(!1 === f.call(c[x], x, c[x++])););
return c
},
trim: G ?
function(c) {
return null == c ? "": G.call(c)
}: function(c) {
return null == c ? "": c.toString().replace(l, "").replace(m, "")
},
makeArray: function(c, f) {
var k = f || [];
if (null != c) {
var a = e.type(c);
null == c.length || "string" === a || "function" === a || "regexp" === a || e.isWindow(c) ? r.call(k, c) : e.merge(k, c)
}
return k
},
inArray: function(c, e, f) {
var k;
if (e) {
if (n) return n.call(e, c, f);
k = e.length;
for (f = f ? 0 > f ? Math.max(0, k + f) : f: 0; f < k; f++) if (f in e && e[f] === c) return f
}
return - 1
},
merge: function(c, e) {
var f = c.length,
k = 0;
if ("number" === typeof e.length) for (var a =
e.length; k < a; k++) c[f++] = e[k];
else for (; e[k] !== d;) c[f++] = e[k++];
c.length = f;
return c
},
grep: function(c, e, f) {
for (var k = [], a, f = !!f, x = 0, d = c.length; x < d; x++) a = !!e(c[x], x),
f !== a && k.push(c[x]);
return k
},
map: function(c, f, k) {
var a,
x,
b = [],
R = 0,
j = c.length;
if (c instanceof e || j !== d && "number" === typeof j && (0 < j && c[0] && c[j - 1] || 0 === j || e.isArray(c))) for (; R < j; R++) a = f(c[R], R, k),
null != a && (b[b.length] = a);
else for (x in c) a = f(c[x], x, k),
null != a && (b[b.length] = a);
return b.concat.apply([], b)
},
guid: 1,
proxy: function(c, f) {
if ("string" ===
typeof f) var k = c[f],
f = c,
c = k;
if (!e.isFunction(c)) return d;
var a = t.call(arguments, 2),
k = function() {
return c.apply(f, a.concat(t.call(arguments)))
};
k.guid = c.guid = c.guid || k.guid || e.guid++;
return k
},
access: function(c, f, k, a, x, b) {
var R = c.length;
if ("object" === typeof f) {
for (var j in f) e.access(c, j, f[j], a, x, k);
return c
}
if (k !== d) {
a = !b && a && e.isFunction(k);
for (j = 0; j < R; j++) x(c[j], f, a ? k.call(c[j], j, x(c[j], f)) : k, b);
return c
}
return R ? x(c[0], f) : d
},
now: function() {
return (new Date).getTime()
},
uaMatch: function(c) {
c = c.toLowerCase();
c = i.exec(c) || p.exec(c) || U.exec(c) || 0 > c.indexOf("compatible") && w.exec(c) || [];
return {
browser: c[1] || "",
version: c[2] || "0"
}
},
sub: function() {
function c(e, f) {
return new c.fn.init(e, f)
}
e.extend(!0, c, this);
c.superclass = this;
c.fn = c.prototype = this();
c.fn.constructor = c;
c.sub = this.sub;
c.fn.init = function(k, a) {
a && a instanceof e && !(a instanceof c) && (a = c(a));
return e.fn.init.call(this, k, a, f)
};
c.fn.init.prototype = c.fn;
var f = c(A);
return c
},
browser: {}
});
e.each("Boolean Number String Function Array Date RegExp Object".split(" "),
function(c, e) {
H["[object " + e + "]"] = e.toLowerCase()
});
X = e.uaMatch(X);
if (X.browser) e.browser[X.browser] = !0,
e.browser.version = X.version;
if (e.browser.webkit) e.browser.safari = !0;
g.test("\u00a0") && (l = /^[\s\xA0]+/, m = /[\s\xA0]+$/);
b = e(A);
A.addEventListener ? na = function() {
A.removeEventListener("DOMContentLoaded", na, !1);
e.ready()
}: A.attachEvent && (na = function() {
"complete" === A.readyState && (A.detachEvent("onreadystatechange", na), e.ready())
});
return e
} (),
K = {};
f.Callbacks = function(c) {
var c = c ? K[c] || b(c) : {},
e = [],
k =
[],
a,
R,
za,
g,
l,
m = function(k) {
var a,
x,
d,
b;
for (a = 0, x = k.length; a < x; a++) d = k[a],
b = f.type(d),
"array" === b ? m(d) : "function" === b && (!c.unique || !q.has(d)) && e.push(d)
},
D = function(f, d) {
d = d || [];
a = !c.memory || [f, d];
R = !0;
l = za || 0;
za = 0;
for (g = e.length; e && l < g; l++) if (!1 === e[l].apply(f, d) && c.stopOnFalse) {
a = !0;
break
}
R = !1;
e && (c.once ? !0 === a ? q.disable() : e = [] : k && k.length && (a = k.shift(), q.fireWith(a[0], a[1])))
},
q = {
add: function() {
if (e) {
var c = e.length;
m(arguments);
R ? g = e.length: a && !0 !== a && (za = c, D(a[0], a[1]))
}
return this
},
remove: function() {
if (e) for (var f =
arguments, k = 0, a = f.length; k < a; k++) for (var x = 0; x < e.length && !(f[k] === e[x] && (R && x <= g && (g--, x <= l && l--), e.splice(x--, 1), c.unique)); x++);
return this
},
has: function(c) {
if (e) for (var f = 0, k = e.length; f < k; f++) if (c === e[f]) return ! 0;
return ! 1
},
empty: function() {
e = [];
return this
},
disable: function() {
e = k = a = d;
return this
},
disabled: function() {
return ! e
},
lock: function() {
k = d; (!a || !0 === a) && q.disable();
return this
},
locked: function() {
return ! k
},
fireWith: function(e, f) {
k && (R ? c.once || k.push([e, f]) : (!c.once || !a) && D(e, f));
return this
},
fire: function() {
q.fireWith(this, arguments);
return this
},
fired: function() {
return !! a
}
};
return q
};
var $ = [].slice;
f.extend({
Deferred: function(c) {
var e = f.Callbacks("once memory"),
k = f.Callbacks("once memory"),
a = f.Callbacks("memory"),
d = "pending",
b = {
resolve: e,
reject: k,
notify: a
},
j = {
done: e.add,
fail: k.add,
progress: a.add,
state: function() {
return d
},
isResolved: e.fired,
isRejected: k.fired,
then: function(c, e, f) {
g.done(c).fail(e).progress(f);
return this
},
always: function() {
g.done.apply(g, arguments).fail.apply(g, arguments);
return this
},
pipe: function(c, e, k) {
return f.Deferred(function(a) {
f.each({
done: [c, "resolve"],
fail: [e, "reject"],
progress: [k, "notify"]
},
function(c, e) {
var k = e[0],
x = e[1],
d;
if (f.isFunction(k)) g[c](function() {
if ((d = k.apply(this, arguments)) && f.isFunction(d.promise)) d.promise().then(a.resolve, a.reject, a.notify);
else a[x + "With"](this === g ? a: this, [d])
});
else g[c](a[x])
})
}).promise()
},
promise: function(c) {
if (null == c) c = j;
else for (var e in j) c[e] = j[e];
return c
}
},
g = j.promise({}),
l;
for (l in b) g[l] = b[l].fire,
g[l + "With"] =
b[l].fireWith;
g.done(function() {
d = "resolved"
},
k.disable, a.lock).fail(function() {
d = "rejected"
},
e.disable, a.lock);
c && c.call(g, g);
return g
},
when: function(c) {
function e(c) {
return function(e) {
a[c] = 1 < arguments.length ? $.call(arguments, 0) : e; --g || l.resolveWith(l, a)
}
}
function k(c) {
return function(e) {
j[c] = 1 < arguments.length ? $.call(arguments, 0) : e;
l.notifyWith(m, j)
}
}
var a = $.call(arguments, 0),
d = 0,
b = a.length,
j = Array(b),
g = b,
l = 1 >= b && c && f.isFunction(c.promise) ? c: f.Deferred(),
m = l.promise();
if (1 < b) {
for (; d < b; d++) a[d] &&
a[d].promise && f.isFunction(a[d].promise) ? a[d].promise().then(e(d), l.reject, k(d)) : --g;
g || l.resolveWith(l, a)
} else l !== c && l.resolveWith(l, b ? [c] : []);
return m
}
});
f.support = function() {
var c,
e,
k,
d,
b,
j,
g,
l,
m = A.createElement("div");
m.setAttribute("className", "t");
m.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
e = m.getElementsByTagName("*");
k = m.getElementsByTagName("a")[0];
if (!e || !e.length || !k) return {};
d = A.createElement("select");
b = d.appendChild(A.createElement("option"));
e = m.getElementsByTagName("input")[0];
c = {
leadingWhitespace: 3 === m.firstChild.nodeType,
tbody: !m.getElementsByTagName("tbody").length,
htmlSerialize: !!m.getElementsByTagName("link").length,
style: /top/.test(k.getAttribute("style")),
hrefNormalized: "/a" === k.getAttribute("href"),
opacity: /^0.55/.test(k.style.opacity),
cssFloat: !!k.style.cssFloat,
checkOn: "on" === e.value,
optSelected: b.selected,
getSetAttribute: "t" !== m.className,
enctype: !!A.createElement("form").enctype,
html5Clone: "<:nav></:nav>" !== A.createElement("nav").cloneNode(!0).outerHTML,
submitBubbles: !0,
changeBubbles: !0,
focusinBubbles: !1,
deleteExpando: !0,
noCloneEvent: !0,
inlineBlockNeedsLayout: !1,
shrinkWrapBlocks: !1,
reliableMarginRight: !0
};
e.checked = !0;
c.noCloneChecked = e.cloneNode(!0).checked;
d.disabled = !0;
c.optDisabled = !b.disabled;
try {
delete m.test
} catch(D) {
c.deleteExpando = !1
} ! m.addEventListener && m.attachEvent && m.fireEvent && (m.attachEvent("onclick",
function() {
c.noCloneEvent = !1
}), m.cloneNode(!0).fireEvent("onclick"));
e = A.createElement("input");
e.value = "t";
e.setAttribute("type", "radio");
c.radioValue = "t" === e.value;
e.setAttribute("checked", "checked");
m.appendChild(e);
k = A.createDocumentFragment();
k.appendChild(m.lastChild);
c.checkClone = k.cloneNode(!0).cloneNode(!0).lastChild.checked;
c.appendChecked = e.checked;
k.removeChild(e);
k.appendChild(m);
m.innerHTML = "";
if (a.getComputedStyle) e = A.createElement("div"),
e.style.width = "0",
e.style.marginRight = "0",
m.style.width = "2px",
m.appendChild(e),
c.reliableMarginRight = 0 === (parseInt((a.getComputedStyle(e, null) || {
marginRight: 0
}).marginRight, 10) || 0);
if (m.attachEvent) for (g in {
submit: 1,
change: 1,
focusin: 1
}) e = "on" + g,
l = e in m,
l || (m.setAttribute(e, "return;"), l = "function" === typeof m[e]),
c[g + "Bubbles"] = l;
k.removeChild(m);
k = d = b = e = m = e = null;
f(function() {
var e,
k,
a,
d,
x = A.getElementsByTagName("body")[0];
if (x) {
e = A.createElement("div");
e.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
x.insertBefore(e, x.firstChild);
m = A.createElement("div");
e.appendChild(m);
m.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
j = m.getElementsByTagName("td");
l = 0 === j[0].offsetHeight;
j[0].style.display = "";
j[1].style.display = "none";
c.reliableHiddenOffsets = l && 0 === j[0].offsetHeight;
m.innerHTML = "";
m.style.width = m.style.paddingLeft = "1px";
f.boxModel = c.boxModel = 2 === m.offsetWidth;
if ("undefined" !== typeof m.style.zoom) m.style.display = "inline",
m.style.zoom = 1,
c.inlineBlockNeedsLayout = 2 === m.offsetWidth,
m.style.display = "",
m.innerHTML = "<div style='width:4px;'></div>",
c.shrinkWrapBlocks = 2 !== m.offsetWidth;
m.style.cssText = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;";
m.innerHTML = "<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
k = m.firstChild;
a = k.firstChild;
d = {
doesNotAddBorder: 5 !== a.offsetTop,
doesAddBorderForTableAndCells: 5 === k.nextSibling.firstChild.firstChild.offsetTop
};
a.style.position = "fixed";
a.style.top = "20px";
d.fixedPosition =
20 === a.offsetTop || 15 === a.offsetTop;
a.style.position = a.style.top = "";
k.style.overflow = "hidden";
k.style.position = "relative";
d.subtractsBorderForOverflowNotVisible = -5 === a.offsetTop;
d.doesNotIncludeMarginInBodyOffset = 1 !== x.offsetTop;
x.removeChild(e);
m = null;
f.extend(c, d)
}
});
return c
} ();
var y = /^(?:\{.*\}|\[.*\])$/,
O = /([A-Z])/g;
f.extend({
cache: {},
uuid: 0,
expando: "jQuery" + (f.fn.jquery + Math.random()).replace(/\D/g, ""),
noData: {
embed: !0,
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
applet: !0
},
hasData: function(c) {
c =
c.nodeType ? f.cache[c[f.expando]] : c[f.expando];
return !! c && !q(c)
},
data: function(c, e, k, a) {
if (f.acceptData(c)) {
var b;
b = f.expando;
var j = "string" === typeof e,
m = c.nodeType,
g = m ? f.cache: c,
l = m ? c[b] : c[b] && b,
D = "events" === e;
if (l && g[l] && (D || a || g[l].data) || !(j && k === d)) {
l || (m ? c[b] = l = ++f.uuid: l = b);
if (!g[l] && (g[l] = {},
!m)) g[l].toJSON = f.noop;
if ("object" === typeof e || "function" === typeof e) a ? g[l] = f.extend(g[l], e) : g[l].data = f.extend(g[l].data, e);
b = c = g[l];
if (!a) {
if (!c.data) c.data = {};
c = c.data
}
k !== d && (c[f.camelCase(e)] = k);
if (D &&
!c[e]) return b.events;
j ? (k = c[e], null == k && (k = c[f.camelCase(e)])) : k = c;
return k
}
}
},
removeData: function(c, e, k) {
if (f.acceptData(c)) {
var a,
d,
b,
j = f.expando,
m = c.nodeType,
g = m ? f.cache: c,
l = m ? c[j] : j;
if (g[l]) {
if (e && (a = k ? g[l] : g[l].data)) {
f.isArray(e) || (e in a ? e = [e] : (e = f.camelCase(e), e = e in a ? [e] : e.split(" ")));
for (d = 0, b = e.length; d < b; d++) delete a[e[d]];
if (! (k ? q: f.isEmptyObject)(a)) return
}
if (!k && (delete g[l].data, !q(g[l]))) return;
f.support.deleteExpando || !g.setInterval ? delete g[l] : g[l] = null;
m && (f.support.deleteExpando ?
delete c[j] : c.removeAttribute ? c.removeAttribute(j) : c[j] = null)
}
}
},
_data: function(c, e, k) {
return f.data(c, e, k, !0)
},
acceptData: function(c) {
if (c.nodeName) {
var e = f.noData[c.nodeName.toLowerCase()];
if (e) return ! (!0 === e || c.getAttribute("classid") !== e)
}
return ! 0
}
});
f.fn.extend({
data: function(c, e) {
var k,
a,
b,
j = null;
if ("undefined" === typeof c) {
if (this.length && (j = f.data(this[0]), 1 === this[0].nodeType && !f._data(this[0], "parsedAttrs"))) {
a = this[0].attributes;
for (var l = 0, m = a.length; l < m; l++) b = a[l].name,
0 === b.indexOf("data-") &&
(b = f.camelCase(b.substring(5)), g(this[0], b, j[b]));
f._data(this[0], "parsedAttrs", !0)
}
return j
}
if ("object" === typeof c) return this.each(function() {
f.data(this, c)
});
k = c.split(".");
k[1] = k[1] ? "." + k[1] : "";
return e === d ? (j = this.triggerHandler("getData" + k[1] + "!", [k[0]]), j === d && this.length && (j = f.data(this[0], c), j = g(this[0], c, j)), j === d && k[1] ? this.data(k[0]) : j) : this.each(function() {
var a = f(this),
d = [k[0], e];
a.triggerHandler("setData" + k[1] + "!", d);
f.data(this, c, e);
a.triggerHandler("changeData" + k[1] + "!", d)
})
},
removeData: function(c) {
return this.each(function() {
f.removeData(this,
c)
})
}
});
f.extend({
_mark: function(c, e) {
c && (e = (e || "fx") + "mark", f._data(c, e, (f._data(c, e) || 0) + 1))
},
_unmark: function(c, e, k) { ! 0 !== c && (k = e, e = c, c = !1);
if (e) {
var k = k || "fx",
a = k + "mark"; (c = c ? 0: (f._data(e, a) || 1) - 1) ? f._data(e, a, c) : (f.removeData(e, a, !0), h(e, k, "mark"))
}
},
queue: function(c, e, k) {
var a;
if (c) return e = (e || "fx") + "queue",
a = f._data(c, e),
k && (!a || f.isArray(k) ? a = f._data(c, e, f.makeArray(k)) : a.push(k)),
a || []
},
dequeue: function(c, e) {
var e = e || "fx",
k = f.queue(c, e),
a = k.shift(),
d = {};
"inprogress" === a && (a = k.shift());
a &&
("fx" === e && k.unshift("inprogress"), f._data(c, e + ".run", d), a.call(c,
function() {
f.dequeue(c, e)
},
d));
k.length || (f.removeData(c, e + "queue " + e + ".run", !0), h(c, e, "queue"))
}
});
f.fn.extend({
queue: function(c, e) {
"string" !== typeof c && (e = c, c = "fx");
return e === d ? f.queue(this[0], c) : this.each(function() {
var a = f.queue(this, c, e);
"fx" === c && "inprogress" !== a[0] && f.dequeue(this, c)
})
},
dequeue: function(c) {
return this.each(function() {
f.dequeue(this, c)
})
},
delay: function(c, e) {
c = f.fx ? f.fx.speeds[c] || c: c;
return this.queue(e || "fx",
function(e, f) {
var a = setTimeout(e, c);
f.stop = function() {
clearTimeout(a)
}
})
},
clearQueue: function(c) {
return this.queue(c || "fx", [])
},
promise: function(c) {
function e() {--l || a.resolveWith(b, [b])
}
"string" !== typeof c && (c = d);
for (var c = c || "fx", a = f.Deferred(), b = this, j = b.length, l = 1, g = c + "defer", m = c + "queue", c = c + "mark", D; j--;) if (D = f.data(b[j], g, d, !0) || (f.data(b[j], m, d, !0) || f.data(b[j], c, d, !0)) && f.data(b[j], g, f.Callbacks("once memory"), !0)) l++,
D.add(e);
e();
return a.promise()
}
});
var ca = /[\n\t\r]/g,
aa = /\s+/,
J = /\r/g,
Z = /^(?:button|input)$/i,
T = /^(?:button|input|object|select|textarea)$/i,
S = /^a(?:rea)?$/i,
ba = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
oa = f.support.getSetAttribute,
l,
V,
va;
f.fn.extend({
attr: function(c, e) {
return f.access(this, c, e, !0, f.attr)
},
removeAttr: function(c) {
return this.each(function() {
f.removeAttr(this, c)
})
},
prop: function(c, e) {
return f.access(this, c, e, !0, f.prop)
},
removeProp: function(c) {
c = f.propFix[c] || c;
return this.each(function() {
try {
this[c] =
d,
delete this[c]
} catch(e) {}
})
},
addClass: function(c) {
var e,
a,
d,
b,
j,
l,
g;
if (f.isFunction(c)) return this.each(function(e) {
f(this).addClass(c.call(this, e, this.className))
});
if (c && "string" === typeof c) {
e = c.split(aa);
for (a = 0, d = this.length; a < d; a++) if (b = this[a], 1 === b.nodeType) if (!b.className && 1 === e.length) b.className = c;
else {
j = " " + b.className + " ";
for (l = 0, g = e.length; l < g; l++)~j.indexOf(" " + e[l] + " ") || (j += e[l] + " ");
b.className = f.trim(j)
}
}
return this
},
removeClass: function(c) {
var e,
a,
b,
j,
l,
g,
m;
if (f.isFunction(c)) return this.each(function(e) {
f(this).removeClass(c.call(this,
e, this.className))
});
if (c && "string" === typeof c || c === d) {
e = (c || "").split(aa);
for (a = 0, b = this.length; a < b; a++) if (j = this[a], 1 === j.nodeType && j.className) if (c) {
l = (" " + j.className + " ").replace(ca, " ");
for (g = 0, m = e.length; g < m; g++) l = l.replace(" " + e[g] + " ", " ");
j.className = f.trim(l)
} else j.className = ""
}
return this
},
toggleClass: function(c, e) {
var a = typeof c,
d = "boolean" === typeof e;
return f.isFunction(c) ? this.each(function(a) {
f(this).toggleClass(c.call(this, a, this.className, e), e)
}) : this.each(function() {
if ("string" ===
a) for (var b, j = 0, l = f(this), g = e, m = c.split(aa); b = m[j++];) g = d ? g: !l.hasClass(b),
l[g ? "addClass": "removeClass"](b);
else if ("undefined" === a || "boolean" === a) this.className && f._data(this, "__className__", this.className),
this.className = this.className || !1 === c ? "": f._data(this, "__className__") || ""
})
},
hasClass: function(c) {
for (var c = " " + c + " ", e = 0, f = this.length; e < f; e++) if (1 === this[e].nodeType && -1 < (" " + this[e].className + " ").replace(ca, " ").indexOf(c)) return ! 0;
return ! 1
},
val: function(c) {
var e,
a,
b,
j = this[0];
if (arguments.length) return b =
f.isFunction(c),
this.each(function(a) {
var k = f(this);
if (1 === this.nodeType && (a = b ? c.call(this, a, k.val()) : c, null == a ? a = "": "number" === typeof a ? a += "": f.isArray(a) && (a = f.map(a,
function(c) {
return null == c ? "": c + ""
})), e = f.valHooks[this.nodeName.toLowerCase()] || f.valHooks[this.type], !e || !("set" in e) || e.set(this, a, "value") === d)) this.value = a
});
if (j) {
if ((e = f.valHooks[j.nodeName.toLowerCase()] || f.valHooks[j.type]) && "get" in e && (a = e.get(j, "value")) !== d) return a;
a = j.value;
return "string" === typeof a ? a.replace(J, "") : null ==
a ? "": a
}
}
});
f.extend({
valHooks: {
option: {
get: function(c) {
var e = c.attributes.value;
return ! e || e.specified ? c.value: c.text
}
},
select: {
get: function(c) {
var e,
a,
d = c.selectedIndex,
b = [],
j = c.options,
l = "select-one" === c.type;
if (0 > d) return null;
c = l ? d: 0;
for (a = l ? d + 1: j.length; c < a; c++) if (e = j[c], e.selected && (f.support.optDisabled ? !e.disabled: null === e.getAttribute("disabled")) && (!e.parentNode.disabled || !f.nodeName(e.parentNode, "optgroup"))) {
e = f(e).val();
if (l) return e;
b.push(e)
}
return l && !b.length && j.length ? f(j[d]).val() :
b
},
set: function(c, e) {
var a = f.makeArray(e);
f(c).find("option").each(function() {
this.selected = 0 <= f.inArray(f(this).val(), a)
});
if (!a.length) c.selectedIndex = -1;
return a
}
}
},
attrFn: {
val: !0,
css: !0,
html: !0,
text: !0,
data: !0,
width: !0,
height: !0,
offset: !0
},
attr: function(c, e, a, b) {
var j,
g,
m = c.nodeType;
if (c && !(3 === m || 8 === m || 2 === m)) {
if (b && e in f.attrFn) return f(c)[e](a);
if ("undefined" === typeof c.getAttribute) return f.prop(c, e, a);
if (b = 1 !== m || !f.isXMLDoc(c)) e = e.toLowerCase(),
g = f.attrHooks[e] || (ba.test(e) ? V: l);
if (a !==
d) if (null === a) f.removeAttr(c, e);
else {
if (g && "set" in g && b && (j = g.set(c, a, e)) !== d) return j;
c.setAttribute(e, "" + a);
return a
} else {
if (g && "get" in g && b && null !== (j = g.get(c, e))) return j;
j = c.getAttribute(e);
return null === j ? d: j
}
}
},
removeAttr: function(c, e) {
var a,
d,
b,
j,
l = 0;
if (e && 1 === c.nodeType) {
d = e.toLowerCase().split(aa);
for (j = d.length; l < j; l++) if (b = d[l]) a = f.propFix[b] || b,
f.attr(c, b, ""),
c.removeAttribute(oa ? b: a),
ba.test(b) && a in c && (c[a] = !1)
}
},
attrHooks: {
type: {
set: function(c, e) {
if (Z.test(c.nodeName) && c.parentNode) f.error("type property can't be changed");
else if (!f.support.radioValue && "radio" === e && f.nodeName(c, "input")) {
var a = c.value;
c.setAttribute("type", e);
if (a) c.value = a;
return e
}
}
},
value: {
get: function(c, e) {
return l && f.nodeName(c, "button") ? l.get(c, e) : e in c ? c.value: null
},
set: function(c, e, a) {
if (l && f.nodeName(c, "button")) return l.set(c, e, a);
c.value = e
}
}
},
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
prop: function(c, e, a) {
var b,
j,
l = c.nodeType;
if (c && !(3 === l || 8 === l || 2 === l)) {
if (1 !== l || !f.isXMLDoc(c)) e = f.propFix[e] || e,
j = f.propHooks[e];
return a !== d ? j && "set" in j && (b = j.set(c, a, e)) !== d ? b: c[e] = a: j && "get" in j && null !== (b = j.get(c, e)) ? b: c[e]
}
},
propHooks: {
tabIndex: {
get: function(c) {
var e = c.getAttributeNode("tabindex");
return e && e.specified ? parseInt(e.value, 10) : T.test(c.nodeName) || S.test(c.nodeName) && c.href ? 0: d
}
}
}
});
f.attrHooks.tabindex = f.propHooks.tabIndex;
V = {
get: function(c, e) {
var a,
b = f.prop(c, e);
return ! 0 === b || "boolean" !== typeof b && (a = c.getAttributeNode(e)) && !1 !== a.nodeValue ? e.toLowerCase() : d
},
set: function(c, e, a) { ! 1 === e ? f.removeAttr(c, a) : (e = f.propFix[a] || a, e in c && (c[e] = !0), c.setAttribute(a, a.toLowerCase()));
return a
}
};
if (!oa) va = {
name: !0,
id: !0
},
l = f.valHooks.button = {
get: function(c, e) {
var f;
return (f = c.getAttributeNode(e)) && (va[e] ? "" !== f.nodeValue: f.specified) ? f.nodeValue: d
},
set: function(c, e, f) {
var a = c.getAttributeNode(f);
a || (a = A.createAttribute(f), c.setAttributeNode(a));
return a.nodeValue = e + ""
}
},
f.attrHooks.tabindex.set = l.set,
f.each(["width", "height"],
function(c, e) {
f.attrHooks[e] = f.extend(f.attrHooks[e], {
set: function(c, f) {
if ("" === f) return c.setAttribute(e, "auto"),
f
}
})
}),
f.attrHooks.contenteditable = {
get: l.get,
set: function(c, e, f) {
"" === e && (e = "false");
l.set(c, e, f)
}
};
f.support.hrefNormalized || f.each(["href", "src", "width", "height"],
function(c, e) {
f.attrHooks[e] = f.extend(f.attrHooks[e], {
get: function(c) {
c = c.getAttribute(e, 2);
return null === c ? d: c
}
})
});
if (!f.support.style) f.attrHooks.style =
{
get: function(c) {
return c.style.cssText.toLowerCase() || d
},
set: function(c, e) {
return c.style.cssText = "" + e
}
};
if (!f.support.optSelected) f.propHooks.selected = f.extend(f.propHooks.selected, {
get: function() {
return null
}
});
if (!f.support.enctype) f.propFix.enctype = "encoding";
f.support.checkOn || f.each(["radio", "checkbox"],
function() {
f.valHooks[this] = {
get: function(c) {
return null === c.getAttribute("value") ? "on": c.value
}
}
});
f.each(["radio", "checkbox"],
function() {
f.valHooks[this] = f.extend(f.valHooks[this], {
set: function(c,
e) {
if (f.isArray(e)) return c.checked = 0 <= f.inArray(f(c).val(), e)
}
})
});
var qa = /^(?:textarea|input|select)$/i,
Ma = /^([^\.]*)?(?:\.(.+))?$/,
lb = /\bhover(\.\S+)?\b/,
mb = /^key/,
nb = /^(?:mouse|contextmenu)|click/,
Na = /^(?:focusinfocus|focusoutblur)$/,
ob = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
pb = function(c) {
if (c = ob.exec(c)) c[1] = (c[1] || "").toLowerCase(),
c[3] = c[3] && RegExp("(?:^|\\s)" + c[3] + "(?:\\s|$)");
return c
},
Oa = function(c) {
return f.event.special.hover ? c: c.replace(lb, "mouseenter$1 mouseleave$1")
};
f.event = {
add: function(c,
e, a, b, j) {
var l,
g,
m,
D,
q,
P,
h,
B,
i;
if (! (3 === c.nodeType || 8 === c.nodeType || !e || !a || !(l = f._data(c)))) {
if (a.handler) h = a,
a = h.handler;
if (!a.guid) a.guid = f.guid++;
m = l.events;
if (!m) l.events = m = {};
g = l.handle;
if (!g) l.handle = g = function(c) {
return "undefined" !== typeof f && (!c || f.event.triggered !== c.type) ? f.event.dispatch.apply(g.elem, arguments) : d
},
g.elem = c;
e = f.trim(Oa(e)).split(" ");
for (l = 0; l < e.length; l++) {
D = Ma.exec(e[l]) || [];
q = D[1];
P = (D[2] || "").split(".").sort();
i = f.event.special[q] || {};
q = (j ? i.delegateType: i.bindType) ||
q;
i = f.event.special[q] || {};
D = f.extend({
type: q,
origType: D[1],
data: b,
handler: a,
guid: a.guid,
selector: j,
quick: pb(j),
namespace: P.join(".")
},
h);
B = m[q];
if (!B && (B = m[q] = [], B.delegateCount = 0, !i.setup || !1 === i.setup.call(c, b, P, g))) c.addEventListener ? c.addEventListener(q, g, !1) : c.attachEvent && c.attachEvent("on" + q, g);
if (i.add && (i.add.call(c, D), !D.handler.guid)) D.handler.guid = a.guid;
j ? B.splice(B.delegateCount++, 0, D) : B.push(D);
f.event.global[q] = !0
}
c = null
}
},
global: {},
remove: function(c, e, a, d, b) {
var j = f.hasData(c) &&
f._data(c),
l,
g,
m,
D,
q,
P,
h,
B,
i,
Q;
if (j && (h = j.events)) {
e = f.trim(Oa(e || "")).split(" ");
for (l = 0; l < e.length; l++) if (g = Ma.exec(e[l]) || [], m = D = g[1], g = g[2], m) {
B = f.event.special[m] || {};
m = (d ? B.delegateType: B.bindType) || m;
i = h[m] || [];
q = i.length;
g = g ? RegExp("(^|\\.)" + g.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
for (P = 0; P < i.length; P++) if (Q = i[P], (b || D === Q.origType) && (!a || a.guid === Q.guid) && (!g || g.test(Q.namespace)) && (!d || d === Q.selector || "**" === d && Q.selector)) i.splice(P--, 1),
Q.selector && i.delegateCount--,
B.remove && B.remove.call(c, Q);
0 === i.length && q !== i.length && ((!B.teardown || !1 === B.teardown.call(c, g)) && f.removeEvent(c, m, j.handle), delete h[m])
} else for (m in h) h.hasOwnProperty(m) && f.event.remove(c, m + e[l], a, d, !0);
if (f.isEmptyObject(h)) {
if (e = j.handle) e.elem = null;
f.removeData(c, ["events", "handle"], !0)
}
}
},
customEvent: {
getData: !0,
setData: !0,
changeData: !0
},
trigger: function(c, e, k, b) {
if (!k || !(3 === k.nodeType || 8 === k.nodeType)) {
var j = c.type || c,
l = [],
g,
m,
D,
q,
P;
if (!Na.test(j + f.event.triggered) && (0 <= j.indexOf("!") &&
(j = j.slice(0, -1), g = !0), 0 <= j.indexOf(".") && (l = j.split("."), j = l.shift(), l.sort()), k && !f.event.customEvent[j] || f.event.global[j])) if (c = "object" === typeof c ? c[f.expando] ? c: new f.Event(j, c) : new f.Event(j), c.type = j, c.isTrigger = !0, c.exclusive = g, c.namespace = l.join("."), c.namespace_re = c.namespace ? RegExp("(^|\\.)" + l.join("\\.(?:.*\\.)?") + "(\\.|$)") : null, g = 0 > j.indexOf(":") ? "on" + j: "", k) {
c.result = d;
if (!c.target) c.target = k;
e = null != e ? f.makeArray(e) : [];
e.unshift(c);
D = f.event.special[j] || {};
if (! (D.trigger && !1 === D.trigger.apply(k,
e))) {
P = [[k, D.bindType || j]];
if (!b && !D.noBubble && !f.isWindow(k)) {
q = D.delegateType || j;
l = Na.test(q + j) ? k: k.parentNode;
for (m = null; l; l = l.parentNode) P.push([l, q]),
m = l;
m && m === k.ownerDocument && P.push([m.defaultView || m.parentWindow || a, q])
}
for (m = 0; m < P.length && !c.isPropagationStopped(); m++) l = P[m][0],
c.type = P[m][1],
(q = (f._data(l, "events") || {})[c.type] && f._data(l, "handle")) && q.apply(l, e),
(q = g && l[g]) && f.acceptData(l) && !1 === q.apply(l, e) && c.preventDefault();
c.type = j;
if (!b && !c.isDefaultPrevented() && (!D._default || !1 ===
D._default.apply(k.ownerDocument, e)) && !("click" === j && f.nodeName(k, "a")) && f.acceptData(k)) if (g && k[j] && ("focus" !== j && "blur" !== j || 0 !== c.target.offsetWidth) && !f.isWindow(k))(m = k[g]) && (k[g] = null),
f.event.triggered = j,
k[j](),
f.event.triggered = d,
m && (k[g] = m);
return c.result
}
} else for (m in k = f.cache, k) k[m].events && k[m].events[j] && f.event.trigger(c, e, k[m].handle.elem, !0)
}
},
dispatch: function(c) {
var c = f.event.fix(c || a.event),
e = (f._data(this, "events") || {})[c.type] || [],
k = e.delegateCount,
b = [].slice.call(arguments,
0),
j = !c.exclusive && !c.namespace,
l = [],
g,
m,
D,
q,
P,
h,
B;
b[0] = c;
c.delegateTarget = this;
if (k && !c.target.disabled && !(c.button && "click" === c.type)) {
D = f(this);
D.context = this.ownerDocument || this;
for (m = c.target; m != this; m = m.parentNode || this) {
P = {};
h = [];
D[0] = m;
for (g = 0; g < k; g++) {
q = e[g];
B = q.selector;
if (P[B] === d) {
var i = P,
p = B,
U;
if (q.quick) {
U = q.quick;
var A = m.attributes || {};
U = (!U[1] || m.nodeName.toLowerCase() === U[1]) && (!U[2] || (A.id || {}).value === U[2]) && (!U[3] || U[3].test((A["class"] || {}).value))
} else U = D.is(B);
i[p] = U
}
P[B] &&
h.push(q)
}
h.length && l.push({
elem: m,
matches: h
})
}
}
e.length > k && l.push({
elem: this,
matches: e.slice(k)
});
for (g = 0; g < l.length && !c.isPropagationStopped(); g++) {
k = l[g];
c.currentTarget = k.elem;
for (e = 0; e < k.matches.length && !c.isImmediatePropagationStopped(); e++) if (q = k.matches[e], j || !c.namespace && !q.namespace || c.namespace_re && c.namespace_re.test(q.namespace)) if (c.data = q.data, c.handleObj = q, q = ((f.event.special[q.origType] || {}).handle || q.handler).apply(k.elem, b), q !== d) c.result = q,
!1 === q && (c.preventDefault(), c.stopPropagation())
}
return c.result
},
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function(c, e) {
if (null == c.which) c.which = null != e.charCode ? e.charCode: e.keyCode;
return c
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(c, e) {
var f,
a,
b =
e.button,
j = e.fromElement;
if (null == c.pageX && null != e.clientX) f = c.target.ownerDocument || A,
a = f.documentElement,
f = f.body,
c.pageX = e.clientX + (a && a.scrollLeft || f && f.scrollLeft || 0) - (a && a.clientLeft || f && f.clientLeft || 0),
c.pageY = e.clientY + (a && a.scrollTop || f && f.scrollTop || 0) - (a && a.clientTop || f && f.clientTop || 0);
if (!c.relatedTarget && j) c.relatedTarget = j === c.target ? e.toElement: j;
if (!c.which && b !== d) c.which = b & 1 ? 1: b & 2 ? 3: b & 4 ? 2: 0;
return c
}
},
fix: function(c) {
if (c[f.expando]) return c;
var e,
a,
b = c,
j = f.event.fixHooks[c.type] ||
{},
l = j.props ? this.props.concat(j.props) : this.props,
c = f.Event(b);
for (e = l.length; e;) a = l[--e],
c[a] = b[a];
if (!c.target) c.target = b.srcElement || A;
if (3 === c.target.nodeType) c.target = c.target.parentNode;
if (c.metaKey === d) c.metaKey = c.ctrlKey;
return j.filter ? j.filter(c, b) : c
},
special: {
ready: {
setup: f.bindReady
},
load: {
noBubble: !0
},
focus: {
delegateType: "focusin"
},
blur: {
delegateType: "focusout"
},
beforeunload: {
setup: function(c, e, a) {
if (f.isWindow(this)) this.onbeforeunload = a
},
teardown: function(c, e) {
if (this.onbeforeunload ===
e) this.onbeforeunload = null
}
}
},
simulate: function(c, e, a, d) {
c = f.extend(new f.Event, a, {
type: c,
isSimulated: !0,
originalEvent: {}
});
d ? f.event.trigger(c, null, e) : f.event.dispatch.call(e, c);
c.isDefaultPrevented() && a.preventDefault()
}
};
f.event.handle = f.event.dispatch;
f.removeEvent = A.removeEventListener ?
function(c, e, f) {
c.removeEventListener && c.removeEventListener(e, f, !1)
}: function(c, e, f) {
c.detachEvent && c.detachEvent("on" + e, f)
};
f.Event = function(c, e) {
if (! (this instanceof f.Event)) return new f.Event(c, e);
c && c.type ?
(this.originalEvent = c, this.type = c.type, this.isDefaultPrevented = c.defaultPrevented || !1 === c.returnValue || c.getPreventDefault && c.getPreventDefault() ? p: i) : this.type = c;
e && f.extend(this, e);
this.timeStamp = c && c.timeStamp || f.now();
this[f.expando] = !0
};
f.Event.prototype = {
preventDefault: function() {
this.isDefaultPrevented = p;
var c = this.originalEvent;
if (c) c.preventDefault ? c.preventDefault() : c.returnValue = !1
},
stopPropagation: function() {
this.isPropagationStopped = p;
var c = this.originalEvent;
if (c) c.stopPropagation &&
c.stopPropagation(),
c.cancelBubble = !0
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = p;
this.stopPropagation()
},
isDefaultPrevented: i,
isPropagationStopped: i,
isImmediatePropagationStopped: i
};
f.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
},
function(c, e) {
f.event.special[c] = {
delegateType: e,
bindType: e,
handle: function(c) {
var a = c.relatedTarget,
d = c.handleObj,
b;
if (!a || a !== this && !f.contains(this, a)) c.type = d.origType,
b = d.handler.apply(this, arguments),
c.type = e;
return b
}
}
});
if (!f.support.submitBubbles) f.event.special.submit =
{
setup: function() {
if (f.nodeName(this, "form")) return ! 1;
f.event.add(this, "click._submit keypress._submit",
function(c) {
c = c.target;
if ((c = f.nodeName(c, "input") || f.nodeName(c, "button") ? c.form: d) && !c._submit_attached) f.event.add(c, "submit._submit",
function(c) {
this.parentNode && !c.isTrigger && f.event.simulate("submit", this.parentNode, c, !0)
}),
c._submit_attached = !0
})
},
teardown: function() {
if (f.nodeName(this, "form")) return ! 1;
f.event.remove(this, "._submit")
}
};
if (!f.support.changeBubbles) f.event.special.change = {
setup: function() {
if (qa.test(this.nodeName)) {
if ("checkbox" ===
this.type || "radio" === this.type) f.event.add(this, "propertychange._change",
function(c) {
if ("checked" === c.originalEvent.propertyName) this._just_changed = !0
}),
f.event.add(this, "click._change",
function(c) {
if (this._just_changed && !c.isTrigger) this._just_changed = !1,
f.event.simulate("change", this, c, !0)
});
return ! 1
}
f.event.add(this, "beforeactivate._change",
function(c) {
c = c.target;
if (qa.test(c.nodeName) && !c._change_attached) f.event.add(c, "change._change",
function(c) {
this.parentNode && !c.isSimulated && !c.isTrigger &&
f.event.simulate("change", this.parentNode, c, !0)
}),
c._change_attached = !0
})
},
handle: function(c) {
var e = c.target;
if (this !== e || c.isSimulated || c.isTrigger || "radio" !== e.type && "checkbox" !== e.type) return c.handleObj.handler.apply(this, arguments)
},
teardown: function() {
f.event.remove(this, "._change");
return qa.test(this.nodeName)
}
};
f.support.focusinBubbles || f.each({
focus: "focusin",
blur: "focusout"
},
function(c, e) {
var a = 0,
d = function(c) {
f.event.simulate(e, c.target, f.event.fix(c), !0)
};
f.event.special[e] = {
setup: function() {
0 ===
a++&&A.addEventListener(c, d, !0)
},
teardown: function() {
0 === --a && A.removeEventListener(c, d, !0)
}
}
});
f.fn.extend({
on: function(c, e, a, b, j) {
var l,
g;
if ("object" === typeof c) {
"string" !== typeof e && (a = e, e = d);
for (g in c) this.on(g, e, a, c[g], j);
return this
}
null == a && null == b ? (b = e, a = e = d) : null == b && ("string" === typeof e ? (b = a, a = d) : (b = a, a = e, e = d));
if (!1 === b) b = i;
else if (!b) return this;
if (1 === j) l = b,
b = function(c) {
f().off(c);
return l.apply(this, arguments)
},
b.guid = l.guid || (l.guid = f.guid++);
return this.each(function() {
f.event.add(this,
c, b, a, e)
})
},
one: function(c, e, f, a) {
return this.on.call(this, c, e, f, a, 1)
},
off: function(c, e, a) {
if (c && c.preventDefault && c.handleObj) {
var b = c.handleObj;
f(c.delegateTarget).off(b.namespace ? b.type + "." + b.namespace: b.type, b.selector, b.handler);
return this
}
if ("object" === typeof c) {
for (b in c) this.off(b, e, c[b]);
return this
}
if (!1 === e || "function" === typeof e) a = e,
e = d; ! 1 === a && (a = i);
return this.each(function() {
f.event.remove(this, c, a, e)
})
},
bind: function(c, e, f) {
return this.on(c, null, e, f)
},
unbind: function(c, e) {
return this.off(c,
null, e)
},
live: function(c, e, a) {
f(this.context).on(c, this.selector, e, a);
return this
},
die: function(c, e) {
f(this.context).off(c, this.selector || "**", e);
return this
},
delegate: function(c, e, f, a) {
return this.on(e, c, f, a)
},
undelegate: function(c, e, f) {
return 1 == arguments.length ? this.off(c, "**") : this.off(e, c, f)
},
trigger: function(c, e) {
return this.each(function() {
f.event.trigger(c, e, this)
})
},
triggerHandler: function(c, e) {
if (this[0]) return f.event.trigger(c, e, this[0], !0)
},
toggle: function(c) {
var e = arguments,
a = c.guid ||
f.guid++,
b = 0,
d = function(a) {
var d = (f._data(this, "lastToggle" + c.guid) || 0) % b;
f._data(this, "lastToggle" + c.guid, d + 1);
a.preventDefault();
return e[d].apply(this, arguments) || !1
};
for (d.guid = a; b < e.length;) e[b++].guid = a;
return this.click(d)
},
hover: function(c, e) {
return this.mouseenter(c).mouseleave(e || c)
}
});
f.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 contextmenu".split(" "),
function(c, e) {
f.fn[e] = function(c, f) {
null == f && (f = c, c = null);
return 0 < arguments.length ? this.on(e, null, c, f) : this.trigger(e)
};
f.attrFn && (f.attrFn[e] = !0);
if (mb.test(e)) f.event.fixHooks[e] = f.event.keyHooks;
if (nb.test(e)) f.event.fixHooks[e] = f.event.mouseHooks
}); (function() {
function c(c, e, f, a, d, k) {
for (var d = 0, j = a.length; d < j; d++) {
var l = a[d];
if (l) {
for (var g = !1, l = l[c]; l;) {
if (l[b] === f) {
g = a[l.sizset];
break
}
if (1 === l.nodeType && !k) l[b] = f,
l.sizset = d;
if (l.nodeName.toLowerCase() === e) {
g = l;
break
}
l = l[c]
}
a[d] = g
}
}
}
function e(c,
e, f, a, d, k) {
for (var d = 0, j = a.length; d < j; d++) {
var l = a[d];
if (l) {
for (var g = !1, l = l[c]; l;) {
if (l[b] === f) {
g = a[l.sizset];
break
}
if (1 === l.nodeType) {
if (!k) l[b] = f,
l.sizset = d;
if ("string" !== typeof e) {
if (l === e) {
g = !0;
break
}
} else if (0 < h.filter(e, [l]).length) {
g = l;
break
}
}
l = l[c]
}
a[d] = g
}
}
}
var a = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
b = "sizcache" + (Math.random() + "").replace(".", ""),
j = 0,
l = Object.prototype.toString,
g = !1,
m = !0,
q = /\\/g,
D = /\r\n/g,
P = /\W/; [0, 0].sort(function() {
m = !1;
return 0
});
var h = function(c, e, f, b) {
var f = f || [],
d = e = e || A;
if (1 !== e.nodeType && 9 !== e.nodeType) return [];
if (!c || "string" !== typeof c) return f;
var j,
g,
m,
x,
q,
D = !0,
P = h.isXML(e),
B = [],
R = c;
do
if (a.exec(""), j = a.exec(R)) if (R = j[3], B.push(j[1]), j[2]) {
x = j[3];
break
}
while (j);
if (1 < B.length && p.exec(c)) if (2 === B.length && i.relative[B[0]]) g = W(B[0] + B[1], e, b);
else for (g = i.relative[B[0]] ? [e] : h(B.shift(), e); B.length;) c = B.shift(),
i.relative[c] && (c += B.shift()),
g = W(c, g, b);
else if (!b && 1 <
B.length && 9 === e.nodeType && !P && i.match.ID.test(B[0]) && !i.match.ID.test(B[B.length - 1]) && (j = h.find(B.shift(), e, P), e = j.expr ? h.filter(j.expr, j.set)[0] : j.set[0]), e) {
j = b ? {
expr: B.pop(),
set: C(b)
}: h.find(B.pop(), 1 === B.length && ("~" === B[0] || "+" === B[0]) && e.parentNode ? e.parentNode: e, P);
g = j.expr ? h.filter(j.expr, j.set) : j.set;
for (0 < B.length ? m = C(g) : D = !1; B.length;) j = q = B.pop(),
i.relative[q] ? j = B.pop() : q = "",
null == j && (j = e),
i.relative[q](m, j, P)
} else m = [];
m || (m = g);
m || h.error(q || c);
if ("[object Array]" === l.call(m)) if (D) if (e &&
1 === e.nodeType) for (c = 0; null != m[c]; c++) m[c] && (!0 === m[c] || 1 === m[c].nodeType && h.contains(e, m[c])) && f.push(g[c]);
else for (c = 0; null != m[c]; c++) m[c] && 1 === m[c].nodeType && f.push(g[c]);
else f.push.apply(f, m);
else C(m, f);
x && (h(x, d, f, b), h.uniqueSort(f));
return f
};
h.uniqueSort = function(c) {
if (V && (g = m, c.sort(V), g)) for (var e = 1; e < c.length; e++) c[e] === c[e - 1] && c.splice(e--, 1);
return c
};
h.matches = function(c, e) {
return h(c, null, null, e)
};
h.matchesSelector = function(c, e) {
return 0 < h(e, null, null, [c]).length
};
h.find = function(c,
e, f) {
var a,
b,
d,
k,
j,
l;
if (!c) return [];
for (b = 0, d = i.order.length; b < d; b++) if (j = i.order[b], k = i.leftMatch[j].exec(c)) if (l = k[1], k.splice(1, 1), "\\" !== l.substr(l.length - 1) && (k[1] = (k[1] || "").replace(q, ""), a = i.find[j](k, e, f), null != a)) {
c = c.replace(i.match[j], "");
break
}
a || (a = "undefined" !== typeof e.getElementsByTagName ? e.getElementsByTagName("*") : []);
return {
set: a,
expr: c
}
};
h.filter = function(c, e, f, a) {
for (var b, k, j, l, g, m, x, q, D = c, B = [], P = e, R = e && e[0] && h.isXML(e[0]); c && e.length;) {
for (j in i.filter) if (null != (b = i.leftMatch[j].exec(c)) &&
b[2]) if (m = i.filter[j], g = b[1], k = !1, b.splice(1, 1), "\\" !== g.substr(g.length - 1)) {
P === B && (B = []);
if (i.preFilter[j]) if (b = i.preFilter[j](b, P, f, B, a, R)) {
if (!0 === b) continue
} else k = l = !0;
if (b) for (x = 0; null != (g = P[x]); x++) g && (l = m(g, b, x, P), q = a ^ l, f && null != l ? q ? k = !0: P[x] = !1: q && (B.push(g), k = !0));
if (l !== d) {
f || (P = B);
c = c.replace(i.match[j], "");
if (!k) return [];
break
}
}
if (c === D) if (null == k) h.error(c);
else break;
D = c
}
return P
};
h.error = function(c) {
throw Error("Syntax error, unrecognized expression: " + c);
};
var B = h.getText = function(c) {
var e,
f;
e = c.nodeType;
var a = "";
if (e) if (1 === e || 9 === e) {
if ("string" === typeof c.textContent) return c.textContent;
if ("string" === typeof c.innerText) return c.innerText.replace(D, "");
for (c = c.firstChild; c; c = c.nextSibling) a += B(c)
} else {
if (3 === e || 4 === e) return c.nodeValue
} else for (e = 0; f = c[e]; e++) 8 !== f.nodeType && (a += B(f));
return a
},
i = h.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function(c) {
return c.getAttribute("href")
},
type: function(c) {
return c.getAttribute("type")
}
},
relative: {
"+": function(c, e) {
var f =
"string" === typeof e,
a = f && !P.test(e),
f = f && !a;
a && (e = e.toLowerCase());
for (var a = 0, b = c.length, d; a < b; a++) if (d = c[a]) {
for (; (d = d.previousSibling) && 1 !== d.nodeType;);
c[a] = f || d && d.nodeName.toLowerCase() === e ? d || !1: d === e
}
f && h.filter(e, c, !0)
},
">": function(c, e) {
var f,
a = "string" === typeof e,
b = 0,
d = c.length;
if (a && !P.test(e)) for (e = e.toLowerCase(); b < d; b++) {
if (f = c[b]) f = f.parentNode,
c[b] = f.nodeName.toLowerCase() === e ? f: !1
} else {
for (; b < d; b++)(f = c[b]) && (c[b] = a ? f.parentNode: f.parentNode === e);
a && h.filter(e, c, !0)
}
},
"": function(f,
a, b) {
var d,
k = j++,
l = e;
"string" === typeof a && !P.test(a) && (d = a = a.toLowerCase(), l = c);
l("parentNode", a, k, f, d, b)
},
"~": function(f, a, b) {
var d,
k = j++,
l = e;
"string" === typeof a && !P.test(a) && (d = a = a.toLowerCase(), l = c);
l("previousSibling", a, k, f, d, b)
}
},
find: {
ID: function(c, e, f) {
if ("undefined" !== typeof e.getElementById && !f) return (c = e.getElementById(c[1])) && c.parentNode ? [c] : []
},
NAME: function(c, e) {
if ("undefined" !== typeof e.getElementsByName) {
for (var f = [], a = e.getElementsByName(c[1]), b = 0, d = a.length; b < d; b++) a[b].getAttribute("name") ===
c[1] && f.push(a[b]);
return 0 === f.length ? null: f
}
},
TAG: function(c, e) {
if ("undefined" !== typeof e.getElementsByTagName) return e.getElementsByTagName(c[1])
}
},
preFilter: {
CLASS: function(c, e, f, a, b, d) {
c = " " + c[1].replace(q, "") + " ";
if (d) return c;
for (var d = 0, k; null != (k = e[d]); d++) k && (b ^ (k.className && 0 <= (" " + k.className + " ").replace(/[\t\n\r]/g, " ").indexOf(c)) ? f || a.push(k) : f && (e[d] = !1));
return ! 1
},
ID: function(c) {
return c[1].replace(q, "")
},
TAG: function(c) {
return c[1].replace(q, "").toLowerCase()
},
CHILD: function(c) {
if ("nth" ===
c[1]) {
c[2] || h.error(c[0]);
c[2] = c[2].replace(/^\+|\s*/g, "");
var e = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even" === c[2] && "2n" || "odd" === c[2] && "2n+1" || !/\D/.test(c[2]) && "0n+" + c[2] || c[2]);
c[2] = e[1] + (e[2] || 1) - 0;
c[3] = e[3] - 0
} else c[2] && h.error(c[0]);
c[0] = j++;
return c
},
ATTR: function(c, e, f, a, b, d) {
e = c[1] = c[1].replace(q, ""); ! d && i.attrMap[e] && (c[1] = i.attrMap[e]);
c[4] = (c[4] || c[5] || "").replace(q, "");
"~=" === c[2] && (c[4] = " " + c[4] + " ");
return c
},
PSEUDO: function(c, e, f, b, d) {
if ("not" === c[1]) if (1 < (a.exec(c[3]) || "").length ||
/^\w/.test(c[3])) c[3] = h(c[3], null, null, e);
else return c = h.filter(c[3], e, f, 1 ^ d),
f || b.push.apply(b, c),
!1;
else if (i.match.POS.test(c[0]) || i.match.CHILD.test(c[0])) return ! 0;
return c
},
POS: function(c) {
c.unshift(!0);
return c
}
},
filters: {
enabled: function(c) {
return ! 1 === c.disabled && "hidden" !== c.type
},
disabled: function(c) {
return ! 0 === c.disabled
},
checked: function(c) {
return ! 0 === c.checked
},
selected: function(c) {
return ! 0 === c.selected
},
parent: function(c) {
return !! c.firstChild
},
empty: function(c) {
return ! c.firstChild
},
has: function(c, e, f) {
return !! h(f[3], c).length
},
header: function(c) {
return /h\d/i.test(c.nodeName)
},
text: function(c) {
var e = c.getAttribute("type"),
f = c.type;
return "input" === c.nodeName.toLowerCase() && "text" === f && (e === f || null === e)
},
radio: function(c) {
return "input" === c.nodeName.toLowerCase() && "radio" === c.type
},
checkbox: function(c) {
return "input" === c.nodeName.toLowerCase() && "checkbox" === c.type
},
file: function(c) {
return "input" === c.nodeName.toLowerCase() && "file" === c.type
},
password: function(c) {
return "input" === c.nodeName.toLowerCase() &&
"password" === c.type
},
submit: function(c) {
var e = c.nodeName.toLowerCase();
return ("input" === e || "button" === e) && "submit" === c.type
},
image: function(c) {
return "input" === c.nodeName.toLowerCase() && "image" === c.type
},
reset: function(c) {
var e = c.nodeName.toLowerCase();
return ("input" === e || "button" === e) && "reset" === c.type
},
button: function(c) {
var e = c.nodeName.toLowerCase();
return "input" === e && "button" === c.type || "button" === e
},
input: function(c) {
return /input|select|textarea|button/i.test(c.nodeName)
},
focus: function(c) {
return c ===
c.ownerDocument.activeElement
}
},
setFilters: {
first: function(c, e) {
return 0 === e
},
last: function(c, e, f, a) {
return e === a.length - 1
},
even: function(c, e) {
return 0 === e % 2
},
odd: function(c, e) {
return 1 === e % 2
},
lt: function(c, e, f) {
return e < f[3] - 0
},
gt: function(c, e, f) {
return e > f[3] - 0
},
nth: function(c, e, f) {
return f[3] - 0 === e
},
eq: function(c, e, f) {
return f[3] - 0 === e
}
},
filter: {
PSEUDO: function(c, e, f, a) {
var b = e[1],
d = i.filters[b];
if (d) return d(c, f, e, a);
if ("contains" === b) return 0 <= (c.textContent || c.innerText || B([c]) || "").indexOf(e[3]);
if ("not" === b) {
e = e[3];
f = 0;
for (a = e.length; f < a; f++) if (e[f] === c) return ! 1;
return ! 0
}
h.error(b)
},
CHILD: function(c, e) {
var f,
a,
d,
k,
j,
l;
f = e[1];
l = c;
switch (f) {
case "only":
case "first":
for (; l = l.previousSibling;) if (1 === l.nodeType) return ! 1;
if ("first" === f) return ! 0;
l = c;
case "last":
for (; l = l.nextSibling;) if (1 === l.nodeType) return ! 1;
return ! 0;
case "nth":
f = e[2];
a = e[3];
if (1 === f && 0 === a) return ! 0;
d = e[0];
if ((k = c.parentNode) && (k[b] !== d || !c.nodeIndex)) {
j = 0;
for (l = k.firstChild; l; l = l.nextSibling) if (1 === l.nodeType) l.nodeIndex = ++j;
k[b] = d
}
l = c.nodeIndex - a;
return 0 === f ? 0 === l: 0 === l % f && 0 <= l / f
}
},
ID: function(c, e) {
return 1 === c.nodeType && c.getAttribute("id") === e
},
TAG: function(c, e) {
return "*" === e && 1 === c.nodeType || !!c.nodeName && c.nodeName.toLowerCase() === e
},
CLASS: function(c, e) {
return - 1 < (" " + (c.className || c.getAttribute("class")) + " ").indexOf(e)
},
ATTR: function(c, e) {
var f = e[1],
f = h.attr ? h.attr(c, f) : i.attrHandle[f] ? i.attrHandle[f](c) : null != c[f] ? c[f] : c.getAttribute(f),
a = f + "",
b = e[2],
d = e[4];
return null == f ? "!=" === b: !b && h.attr ? null != f: "=" === b ?
a === d: "*=" === b ? 0 <= a.indexOf(d) : "~=" === b ? 0 <= (" " + a + " ").indexOf(d) : !d ? a && !1 !== f: "!=" === b ? a !== d: "^=" === b ? 0 === a.indexOf(d) : "$=" === b ? a.substr(a.length - d.length) === d: "|=" === b ? a === d || a.substr(0, d.length + 1) === d + "-": !1
},
POS: function(c, e, f, a) {
var b = i.setFilters[e[2]];
if (b) return b(c, f, e, a)
}
}
},
p = i.match.POS,
U = function(c, e) {
return "\\" + (e - 0 + 1)
},
w;
for (w in i.match) i.match[w] = RegExp(i.match[w].source + /(?![^\[]*\])(?![^\(]*\))/.source),
i.leftMatch[w] = RegExp(/(^(?:.|\r|\n)*?)/.source + i.match[w].source.replace(/\\(\d+)/g,
U));
var C = function(c, e) {
c = Array.prototype.slice.call(c, 0);
return e ? (e.push.apply(e, c), e) : c
};
try {
Array.prototype.slice.call(A.documentElement.childNodes, 0)
} catch(o) {
C = function(c, e) {
var f = 0,
a = e || [];
if ("[object Array]" === l.call(c)) Array.prototype.push.apply(a, c);
else if ("number" === typeof c.length) for (var b = c.length; f < b; f++) a.push(c[f]);
else for (; c[f]; f++) a.push(c[f]);
return a
}
}
var V,
X;
A.documentElement.compareDocumentPosition ? V = function(c, e) {
return c === e ? (g = !0, 0) : !c.compareDocumentPosition || !e.compareDocumentPosition ?
c.compareDocumentPosition ? -1: 1: c.compareDocumentPosition(e) & 4 ? -1: 1
}: (V = function(c, e) {
if (c === e) return g = !0,
0;
if (c.sourceIndex && e.sourceIndex) return c.sourceIndex - e.sourceIndex;
var f,
a,
b = [],
d = [];
f = c.parentNode;
a = e.parentNode;
var k = f;
if (f === a) return X(c, e);
if (f) {
if (!a) return 1
} else return - 1;
for (; k;) b.unshift(k),
k = k.parentNode;
for (k = a; k;) d.unshift(k),
k = k.parentNode;
f = b.length;
a = d.length;
for (k = 0; k < f && k < a; k++) if (b[k] !== d[k]) return X(b[k], d[k]);
return k === f ? X(c, d[k], -1) : X(b[k], e, 1)
},
X = function(c, e, f) {
if (c ===
e) return f;
for (c = c.nextSibling; c;) {
if (c === e) return - 1;
c = c.nextSibling
}
return 1
}); (function() {
var c = A.createElement("div"),
e = "script" + (new Date).getTime(),
f = A.documentElement;
c.innerHTML = "<a name='" + e + "'/>";
f.insertBefore(c, f.firstChild);
if (A.getElementById(e)) i.find.ID = function(c, e, f) {
if ("undefined" !== typeof e.getElementById && !f) return (e = e.getElementById(c[1])) ? e.id === c[1] || "undefined" !== typeof e.getAttributeNode && e.getAttributeNode("id").nodeValue === c[1] ? [e] : d: []
},
i.filter.ID = function(c, e) {
var f =
"undefined" !== typeof c.getAttributeNode && c.getAttributeNode("id");
return 1 === c.nodeType && f && f.nodeValue === e
};
f.removeChild(c);
f = c = null
})(); (function() {
var c = A.createElement("div");
c.appendChild(A.createComment(""));
if (0 < c.getElementsByTagName("*").length) i.find.TAG = function(c, e) {
var f = e.getElementsByTagName(c[1]);
if ("*" === c[1]) {
for (var a = [], b = 0; f[b]; b++) 1 === f[b].nodeType && a.push(f[b]);
f = a
}
return f
};
c.innerHTML = "<a href='#'></a>";
if (c.firstChild && "undefined" !== typeof c.firstChild.getAttribute && "#" !==
c.firstChild.getAttribute("href")) i.attrHandle.href = function(c) {
return c.getAttribute("href", 2)
};
c = null
})();
A.querySelectorAll &&
function() {
var c = h,
e = A.createElement("div");
e.innerHTML = "<p class='TEST'></p>";
if (! (e.querySelectorAll && 0 === e.querySelectorAll(".TEST").length)) {
h = function(e, f, a, b) {
f = f || A;
if (!b && !h.isXML(f)) {
var d = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);
if (d && (1 === f.nodeType || 9 === f.nodeType)) {
if (d[1]) return C(f.getElementsByTagName(e), a);
if (d[2] && i.find.CLASS && f.getElementsByClassName) return C(f.getElementsByClassName(d[2]),
a)
}
if (9 === f.nodeType) {
if ("body" === e && f.body) return C([f.body], a);
if (d && d[3]) {
var k = f.getElementById(d[3]);
if (k && k.parentNode) {
if (k.id === d[3]) return C([k], a)
} else return C([], a)
}
try {
return C(f.querySelectorAll(e), a)
} catch(j) {}
} else if (1 === f.nodeType && "object" !== f.nodeName.toLowerCase()) {
var d = f,
l = (k = f.getAttribute("id")) || "__sizzle__",
g = f.parentNode,
m = /^\s*[+~]/.test(e);
k ? l = l.replace(/'/g, "\\$&") : f.setAttribute("id", l);
if (m && g) f = f.parentNode;
try {
if (!m || g) return C(f.querySelectorAll("[id='" + l + "'] " +
e), a)
} catch(x) {} finally {
k || d.removeAttribute("id")
}
}
}
return c(e, f, a, b)
};
for (var f in c) h[f] = c[f];
e = null
}
} (); (function() {
var c = A.documentElement,
e = c.matchesSelector || c.mozMatchesSelector || c.webkitMatchesSelector || c.msMatchesSelector;
if (e) {
var f = !e.call(A.createElement("div"), "div"),
a = !1;
try {
e.call(A.documentElement, "[test!='']:sizzle")
} catch(b) {
a = !0
}
h.matchesSelector = function(c, b) {
b = b.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if (!h.isXML(c)) try {
if (a || !i.match.PSEUDO.test(b) && !/!=/.test(b)) {
var d = e.call(c,
b);
if (d || !f || c.document && 11 !== c.document.nodeType) return d
}
} catch(k) {}
return 0 < h(b, null, null, [c]).length
}
}
})(); (function() {
var c = A.createElement("div");
c.innerHTML = "<div class='test e'></div><div class='test'></div>";
if (c.getElementsByClassName && 0 !== c.getElementsByClassName("e").length && (c.lastChild.className = "e", 1 !== c.getElementsByClassName("e").length)) i.order.splice(1, 0, "CLASS"),
i.find.CLASS = function(c, e, f) {
if ("undefined" !== typeof e.getElementsByClassName && !f) return e.getElementsByClassName(c[1])
},
c = null
})();
h.contains = A.documentElement.contains ?
function(c, e) {
return c !== e && (c.contains ? c.contains(e) : !0)
}: A.documentElement.compareDocumentPosition ?
function(c, e) {
return !! (c.compareDocumentPosition(e) & 16)
}: function() {
return ! 1
};
h.isXML = function(c) {
return (c = (c ? c.ownerDocument || c: 0).documentElement) ? "HTML" !== c.nodeName: !1
};
var W = function(c, e, f) {
for (var a, b = [], d = "", e = e.nodeType ? [e] : e; a = i.match.PSEUDO.exec(c);) d += a[0],
c = c.replace(i.match.PSEUDO, "");
c = i.relative[c] ? c + "*": c;
a = 0;
for (var k = e.length; a < k; a++) h(c,
e[a], b, f);
return h.filter(d, b)
};
h.attr = f.attr;
h.selectors.attrMap = {};
f.find = h;
f.expr = h.selectors;
f.expr[":"] = f.expr.filters;
f.unique = h.uniqueSort;
f.text = h.getText;
f.isXMLDoc = h.isXML;
f.contains = h.contains
})();
var qb = /Until$/,
rb = /^(?:parents|prevUntil|prevAll)/,
Ea = /,/,
Aa = /^.[^:#\[\.,]*$/,
sb = Array.prototype.slice,
wa = f.expr.match.POS,
tb = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
f.fn.extend({
find: function(c) {
var e = this,
a,
b;
if ("string" !== typeof c) return f(c).filter(function() {
for (a = 0, b = e.length; a < b; a++) if (f.contains(e[a],
this)) return ! 0
});
var d = this.pushStack("", "find", c),
j,
l,
g;
for (a = 0, b = this.length; a < b; a++) if (j = d.length, f.find(c, this[a], d), 0 < a) for (l = j; l < d.length; l++) for (g = 0; g < j; g++) if (d[g] === d[l]) {
d.splice(l--, 1);
break
}
return d
},
has: function(c) {
var e = f(c);
return this.filter(function() {
for (var c = 0, a = e.length; c < a; c++) if (f.contains(this, e[c])) return ! 0
})
},
not: function(c) {
return this.pushStack(o(this, c, !1), "not", c)
},
filter: function(c) {
return this.pushStack(o(this, c, !0), "filter", c)
},
is: function(c) {
return !! c && ("string" ===
typeof c ? wa.test(c) ? 0 <= f(c, this.context).index(this[0]) : 0 < f.filter(c, this).length: 0 < this.filter(c).length)
},
closest: function(c, e) {
var a = [],
b,
d,
j = this[0];
if (f.isArray(c)) {
for (d = 1; j && j.ownerDocument && j !== e;) {
for (b = 0; b < c.length; b++) f(j).is(c[b]) && a.push({
selector: c[b],
elem: j,
level: d
});
j = j.parentNode;
d++
}
return a
}
var l = wa.test(c) || "string" !== typeof c ? f(c, e || this.context) : 0;
for (b = 0, d = this.length; b < d; b++) for (j = this[b]; j;) if (l ? -1 < l.index(j) : f.find.matchesSelector(j, c)) {
a.push(j);
break
} else if (j = j.parentNode,
!j || !j.ownerDocument || j === e || 11 === j.nodeType) break;
a = 1 < a.length ? f.unique(a) : a;
return this.pushStack(a, "closest", c)
},
index: function(c) {
return ! c ? this[0] && this[0].parentNode ? this.prevAll().length: -1: "string" === typeof c ? f.inArray(this[0], f(c)) : f.inArray(c.jquery ? c[0] : c, this)
},
add: function(c, e) {
var a = "string" === typeof c ? f(c, e) : f.makeArray(c && c.nodeType ? [c] : c),
b = f.merge(this.get(), a);
return this.pushStack(!a[0] || !a[0].parentNode || 11 === a[0].parentNode.nodeType || !b[0] || !b[0].parentNode || 11 === b[0].parentNode.nodeType ?
b: f.unique(b))
},
andSelf: function() {
return this.add(this.prevObject)
}
});
f.each({
parent: function(c) {
return (c = c.parentNode) && 11 !== c.nodeType ? c: null
},
parents: function(c) {
return f.dir(c, "parentNode")
},
parentsUntil: function(c, e, a) {
return f.dir(c, "parentNode", a)
},
next: function(c) {
return f.nth(c, 2, "nextSibling")
},
prev: function(c) {
return f.nth(c, 2, "previousSibling")
},
nextAll: function(c) {
return f.dir(c, "nextSibling")
},
prevAll: function(c) {
return f.dir(c, "previousSibling")
},
nextUntil: function(c, e, a) {
return f.dir(c,
"nextSibling", a)
},
prevUntil: function(c, e, a) {
return f.dir(c, "previousSibling", a)
},
siblings: function(c) {
return f.sibling(c.parentNode.firstChild, c)
},
children: function(c) {
return f.sibling(c.firstChild)
},
contents: function(c) {
return f.nodeName(c, "iframe") ? c.contentDocument || c.contentWindow.document: f.makeArray(c.childNodes)
}
},
function(c, e) {
f.fn[c] = function(a, b) {
var d = f.map(this, e, a);
qb.test(c) || (b = a);
b && "string" === typeof b && (d = f.filter(b, d));
d = 1 < this.length && !tb[c] ? f.unique(d) : d;
if ((1 < this.length || Ea.test(b)) &&
rb.test(c)) d = d.reverse();
return this.pushStack(d, c, sb.call(arguments).join(","))
}
});
f.extend({
filter: function(c, e, a) {
a && (c = ":not(" + c + ")");
return 1 === e.length ? f.find.matchesSelector(e[0], c) ? [e[0]] : [] : f.find.matches(c, e)
},
dir: function(c, e, a) {
for (var b = [], c = c[e]; c && 9 !== c.nodeType && (a === d || 1 !== c.nodeType || !f(c).is(a));) 1 === c.nodeType && b.push(c),
c = c[e];
return b
},
nth: function(c, e, f) {
for (var e = e || 1, a = 0; c && !(1 === c.nodeType && ++a === e); c = c[f]);
return c
},
sibling: function(c, e) {
for (var f = []; c; c = c.nextSibling) 1 ===
c.nodeType && c !== e && f.push(c);
return f
}
});
var Ia = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
ub = / jQuery\d+="(?:\d+|null)"/g,
Fa = /^\s+/,
Pa = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
Qa = /<([\w:]+)/,
vb = /<tbody/i,
wb = /<|&#?\w+;/,
xb = /<(?:script|style)/i,
yb = /<(?:script|object|embed|option|style)/i,
Ra = RegExp("<(?:" + Ia + ")", "i"),
Sa = /checked\s*(?:[^=]|=\s*.checked.)/i,
zb = /\/(java|ecma)script/i,
gb = /^\s*<!(?:\[CDATA\[|\-\-)/,
da = {
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, "", ""]
},
Ta = r(A);
da.optgroup = da.option;
da.tbody = da.tfoot = da.colgroup = da.caption = da.thead;
da.th = da.td;
if (!f.support.htmlSerialize) da._default = [1, "div<div>",
"</div>"];
f.fn.extend({
text: function(c) {
return f.isFunction(c) ? this.each(function(e) {
var a = f(this);
a.text(c.call(this, e, a.text()))
}) : "object" !== typeof c && c !== d ? this.empty().append((this[0] && this[0].ownerDocument || A).createTextNode(c)) : f.text(this)
},
wrapAll: function(c) {
if (f.isFunction(c)) return this.each(function(e) {
f(this).wrapAll(c.call(this, e))
});
if (this[0]) {
var e = f(c, this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode && e.insertBefore(this[0]);
e.map(function() {
for (var c = this; c.firstChild &&
1 === c.firstChild.nodeType;) c = c.firstChild;
return c
}).append(this)
}
return this
},
wrapInner: function(c) {
return f.isFunction(c) ? this.each(function(e) {
f(this).wrapInner(c.call(this, e))
}) : this.each(function() {
var e = f(this),
a = e.contents();
a.length ? a.wrapAll(c) : e.append(c)
})
},
wrap: function(c) {
var e = f.isFunction(c);
return this.each(function(a) {
f(this).wrapAll(e ? c.call(this, a) : c)
})
},
unwrap: function() {
return this.parent().each(function() {
f.nodeName(this, "body") || f(this).replaceWith(this.childNodes)
}).end()
},
append: function() {
return this.domManip(arguments, !0,
function(c) {
1 === this.nodeType && this.appendChild(c)
})
},
prepend: function() {
return this.domManip(arguments, !0,
function(c) {
1 === this.nodeType && this.insertBefore(c, this.firstChild)
})
},
before: function() {
if (this[0] && this[0].parentNode) return this.domManip(arguments, !1,
function(c) {
this.parentNode.insertBefore(c, this)
});
if (arguments.length) {
var c = f.clean(arguments);
c.push.apply(c, this.toArray());
return this.pushStack(c, "before", arguments)
}
},
after: function() {
if (this[0] &&
this[0].parentNode) return this.domManip(arguments, !1,
function(c) {
this.parentNode.insertBefore(c, this.nextSibling)
});
if (arguments.length) {
var c = this.pushStack(this, "after", arguments);
c.push.apply(c, f.clean(arguments));
return c
}
},
remove: function(c, e) {
for (var a = 0, b; null != (b = this[a]); a++) if (!c || f.filter(c, [b]).length) ! e && 1 === b.nodeType && (f.cleanData(b.getElementsByTagName("*")), f.cleanData([b])),
b.parentNode && b.parentNode.removeChild(b);
return this
},
empty: function() {
for (var c = 0, e; null != (e = this[c]); c++) for (1 ===
e.nodeType && f.cleanData(e.getElementsByTagName("*")); e.firstChild;) e.removeChild(e.firstChild);
return this
},
clone: function(c, e) {
c = null == c ? !1: c;
e = null == e ? c: e;
return this.map(function() {
return f.clone(this, c, e)
})
},
html: function(c) {
if (c === d) return this[0] && 1 === this[0].nodeType ? this[0].innerHTML.replace(ub, "") : null;
if ("string" === typeof c && !xb.test(c) && (f.support.leadingWhitespace || !Fa.test(c)) && !da[(Qa.exec(c) || ["", ""])[1].toLowerCase()]) {
c = c.replace(Pa, "<$1></$2>");
try {
for (var e = 0, a = this.length; e < a; e++) if (1 ===
this[e].nodeType) f.cleanData(this[e].getElementsByTagName("*")),
this[e].innerHTML = c
} catch(b) {
this.empty().append(c)
}
} else f.isFunction(c) ? this.each(function(e) {
var a = f(this);
a.html(c.call(this, e, a.html()))
}) : this.empty().append(c);
return this
},
replaceWith: function(c) {
if (this[0] && this[0].parentNode) {
if (f.isFunction(c)) return this.each(function(e) {
var a = f(this),
b = a.html();
a.replaceWith(c.call(this, e, b))
});
"string" !== typeof c && (c = f(c).detach());
return this.each(function() {
var e = this.nextSibling,
a = this.parentNode;
f(this).remove();
e ? f(e).before(c) : f(a).append(c)
})
}
return this.length ? this.pushStack(f(f.isFunction(c) ? c() : c), "replaceWith", c) : this
},
detach: function(c) {
return this.remove(c, !0)
},
domManip: function(c, e, a) {
var b,
j,
l,
g = c[0],
m = [];
if (!f.support.checkClone && 3 === arguments.length && "string" === typeof g && Sa.test(g)) return this.each(function() {
f(this).domManip(c, e, a, !0)
});
if (f.isFunction(g)) return this.each(function(b) {
var j = f(this);
c[0] = g.call(this, b, e ? j.html() : d);
j.domManip(c, e, a)
});
if (this[0]) {
b = g && g.parentNode;
b = f.support.parentNode && b && 11 === b.nodeType && b.childNodes.length === this.length ? {
fragment: b
}: f.buildFragment(c, this, m);
l = b.fragment;
if (j = 1 === l.childNodes.length ? l = l.firstChild: l.firstChild) {
e = e && f.nodeName(j, "tr");
j = 0;
for (var q = this.length, h = q - 1; j < q; j++) a.call(e ? f.nodeName(this[j], "table") ? this[j].getElementsByTagName("tbody")[0] || this[j].appendChild(this[j].ownerDocument.createElement("tbody")) : this[j] : this[j], b.cacheable || 1 < q && j < h ? f.clone(l, !0, !0) : l)
}
m.length && f.each(m, z)
}
return this
}
});
f.buildFragment =
function(c, e, a) {
var b,
d,
j,
l,
g = c[0];
e && e[0] && (l = e[0].ownerDocument || e[0]);
l.createDocumentFragment || (l = A);
if (1 === c.length && "string" === typeof g && 512 > g.length && l === A && "<" === g.charAt(0) && !yb.test(g) && (f.support.checkClone || !Sa.test(g)) && (f.support.html5Clone || !Ra.test(g))) d = !0,
(j = f.fragments[g]) && 1 !== j && (b = j);
b || (b = l.createDocumentFragment(), f.clean(c, l, b, a));
d && (f.fragments[g] = j ? b: 1);
return {
fragment: b,
cacheable: d
}
};
f.fragments = {};
f.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
},
function(c, e) {
f.fn[c] = function(a) {
var b = [],
a = f(a),
d = 1 === this.length && this[0].parentNode;
if (d && 11 === d.nodeType && 1 === d.childNodes.length && 1 === a.length) return a[e](this[0]),
this;
for (var d = 0, j = a.length; d < j; d++) {
var l = (0 < d ? this.clone(!0) : this).get();
f(a[d])[e](l);
b = b.concat(l)
}
return this.pushStack(b, c, a.selector)
}
});
f.extend({
clone: function(c, e, a) {
var b,
d,
j;
f.support.html5Clone || !Ra.test("<" + c.nodeName) ? b = c.cloneNode(!0) : (b = A.createElement("div"), Ta.appendChild(b), b.innerHTML =
c.outerHTML, b = b.firstChild);
var l = b;
if ((!f.support.noCloneEvent || !f.support.noCloneChecked) && (1 === c.nodeType || 11 === c.nodeType) && !f.isXMLDoc(c)) {
t(c, l);
b = n(c);
d = n(l);
for (j = 0; b[j]; ++j) d[j] && t(b[j], d[j])
}
if (e && (w(c, l), a)) {
b = n(c);
d = n(l);
for (j = 0; b[j]; ++j) w(b[j], d[j])
}
return l
},
clean: function(c, e, a, b) {
e = e || A;
"undefined" === typeof e.createElement && (e = e.ownerDocument || e[0] && e[0].ownerDocument || A);
for (var d = [], j, l = 0, g; null != (g = c[l]); l++) if ("number" === typeof g && (g += ""), g) {
if ("string" === typeof g) if (wb.test(g)) {
g =
g.replace(Pa, "<$1></$2>");
j = (Qa.exec(g) || ["", ""])[1].toLowerCase();
var m = da[j] || da._default,
q = m[0],
h = e.createElement("div");
e === A ? Ta.appendChild(h) : r(e).appendChild(h);
for (h.innerHTML = m[1] + g + m[2]; q--;) h = h.lastChild;
if (!f.support.tbody) {
q = vb.test(g);
m = "table" === j && !q ? h.firstChild && h.firstChild.childNodes: "<table>" === m[1] && !q ? h.childNodes: [];
for (j = m.length - 1; 0 <= j; --j) f.nodeName(m[j], "tbody") && !m[j].childNodes.length && m[j].parentNode.removeChild(m[j])
} ! f.support.leadingWhitespace && Fa.test(g) && h.insertBefore(e.createTextNode(Fa.exec(g)[0]),
h.firstChild);
g = h.childNodes
} else g = e.createTextNode(g);
var D;
if (!f.support.appendChecked) if (g[0] && "number" === typeof(D = g.length)) for (j = 0; j < D; j++) s(g[j]);
else s(g);
g.nodeType ? d.push(g) : d = f.merge(d, g)
}
if (a) {
c = function(c) {
return ! c.type || zb.test(c.type)
};
for (l = 0; d[l]; l++) b && f.nodeName(d[l], "script") && (!d[l].type || "text/javascript" === d[l].type.toLowerCase()) ? b.push(d[l].parentNode ? d[l].parentNode.removeChild(d[l]) : d[l]) : (1 === d[l].nodeType && (e = f.grep(d[l].getElementsByTagName("script"), c), d.splice.apply(d,
[l + 1, 0].concat(e))), a.appendChild(d[l]))
}
return d
},
cleanData: function(c) {
for (var e, a, b = f.cache, d = f.event.special, j = f.support.deleteExpando, l = 0, g; null != (g = c[l]); l++) if (!g.nodeName || !f.noData[g.nodeName.toLowerCase()]) if (a = g[f.expando]) {
if ((e = b[a]) && e.events) {
for (var m in e.events) e.events.hasOwnProperty(m) && (d[m] ? f.event.remove(g, m) : f.removeEvent(g, m, e.handle));
if (e.handle) e.handle.elem = null
}
j ? delete g[f.expando] : g.removeAttribute && g.removeAttribute(f.expando);
delete b[a]
}
}
});
var Ga = /alpha\([^)]*\)/i,
Ab = /opacity=([^)]*)/,
Bb = /([A-Z]|^ms)/g,
Ua = /^-?\d+(?:px)?$/i,
Cb = /^-?\d/,
Db = /^([\-+])=([\-+.\de]+)/,
Eb = {
position: "absolute",
visibility: "hidden",
display: "block"
},
hb = ["Left", "Right"],
ib = ["Top", "Bottom"],
la,
Va,
Wa;
f.fn.css = function(c, e, a) {
if (2 === arguments.length && e === d) return this;
"object" === typeof c && 2 === arguments.length && (a = !!e);
return f.access(this, c, e, !0,
function(c, e, b) {
return b !== d ? f.style(c, e, b, {
notImportant: !a
}) : f.css(c, e)
})
};
f.extend({
cssHooks: {
opacity: {
get: function(c, e) {
if (e) {
var a = la(c, "opacity",
"opacity");
return "" === a ? "1": a
}
return c.style.opacity
}
}
},
cssNumber: {
fillOpacity: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": f.support.cssFloat ? "cssFloat": "styleFloat"
},
style: function(c, e, a, b) {
if (c && !(3 === c.nodeType || 8 === c.nodeType || !c.style)) {
var j = e,
l,
g,
m = f.camelCase(e),
q = c.style,
h = f.cssHooks[m],
e = f.cssProps[m] || m;
if (a !== d) {
g = typeof a;
if ("string" === g && (l = Db.exec(a))) a = +(l[1] + 1) * +l[2] + parseFloat(f.css(c, e)),
g = "number";
if (! (null == a || "number" ===
g && isNaN(a))) if ("number" === g && !f.cssNumber[m] && (a += "px"), "number" === g && "opacity" === m && (a += ""), !h || !("set" in h) || (a = h.set(c, a)) !== d) try {
if (b && b.notImportant) q[e] = a;
else if (q.setProperty) q.setProperty(j, a, "important");
else {
"display" === j && !a && (a = U(c.nodeName));
var D = RegExp("((?:^|;)\\s*" + j + ")\\s*:\\s*.+?(?:\\s*!important)?(?:;|$)", "gi");
q.cssText = D.test(q.cssText) ? q.cssText.replace(D, "$1: " + a + " !important;") : q.cssText + (";" + j + ": " + a + " !important;")
}
} catch(B) {}
} else return h && "get" in h && (l = h.get(c, !1,
b)) !== d ? l: q[e]
}
},
css: function(c, e, a) {
var b,
j,
e = f.camelCase(e);
j = f.cssHooks[e];
e = f.cssProps[e] || e;
"cssFloat" === e && (e = "float");
if (j && "get" in j && (b = j.get(c, !0, a)) !== d) return b;
if (la) return la(c, e)
},
swap: function(c, e, a) {
var f = {},
b;
for (b in e) f[b] = c.style[b],
c.style[b] = e[b];
a.call(c);
for (b in e) c.style[b] = f[b]
}
});
f.curCSS = f.css;
f.each(["height", "width"],
function(c, e) {
f.cssHooks[e] = {
get: function(c, a, b) {
var d;
if (a) {
if (0 !== c.offsetWidth) return F(c, e, b);
f.swap(c, Eb,
function() {
d = F(c, e, b)
});
return d
}
},
set: function(c,
e) {
if (Ua.test(e)) {
if (e = parseFloat(e), 0 <= e) return e + "px"
} else return e
}
}
});
if (!f.support.opacity) f.cssHooks.opacity = {
get: function(c, e) {
return Ab.test((e && c.currentStyle ? c.currentStyle.filter: c.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "": e ? "1": ""
},
set: function(c, e) {
var a = c.style,
b = c.currentStyle,
d = f.isNumeric(e) ? "alpha(opacity=" + 100 * e + ")": "",
j = b && b.filter || a.filter || "";
a.zoom = 1;
if (1 <= e && "" === f.trim(j.replace(Ga, "")) && (a.removeAttribute("filter"), b && !b.filter)) return;
f.style(c, "filter", Ga.test(j) ?
j.replace(Ga, d) : j + " " + d)
}
};
f(function() {
if (!f.support.reliableMarginRight) f.cssHooks.marginRight = {
get: function(c, e) {
var a;
f.swap(c, {
display: "inline-block"
},
function() {
a = e ? la(c, "margin-right", "marginRight") : c.style.marginRight
});
return a
}
}
});
A.defaultView && A.defaultView.getComputedStyle && (Va = function(c, e) {
if ("string" === typeof e) {
var a,
b,
d,
e = e.replace(Bb, "-$1").toLowerCase();
if ((b = c.ownerDocument.defaultView) && (d = b.getComputedStyle(c, null))) a = d.getPropertyValue(e),
"" === a && !f.contains(c.ownerDocument.documentElement,
c) && (a = f.style(c, e));
return a
}
});
A.documentElement.currentStyle && (Wa = function(c, e) {
var a,
f,
b = c.currentStyle && c.currentStyle[e],
d = c.style;
if (null === b && d && (a = d[e])) b = a;
if (!Ua.test(b) && Cb.test(b)) {
a = d.left;
if (f = c.runtimeStyle && c.runtimeStyle.left) c.runtimeStyle.left = c.currentStyle.left;
d.left = "fontSize" === e ? "1em": b || 0;
b = d.pixelLeft + "px";
d.left = a;
if (f) c.runtimeStyle.left = f
}
return "" === b ? "auto": b
});
la = Va || Wa;
if (f.expr && f.expr.filters) f.expr.filters.hidden = function(c) {
var e = c.offsetHeight;
return 0 === c.offsetWidth &&
0 === e || !f.support.reliableHiddenOffsets && "none" === (c.style && c.style.display || f.css(c, "display"))
},
f.expr.filters.visible = function(c) {
return ! f.expr.filters.hidden(c)
};
var Fb = /%20/g,
jb = /\[\]$/,
Xa = /\r?\n/g,
Gb = /#.*$/,
Hb = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
Ib = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
Jb = /^(?:GET|HEAD)$/,
Kb = /^\/\//,
Ya = /\?/,
Lb = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
Mb = /^(?:select|textarea)/i,
Ja = /\s+/,
Nb =
/([?&])_=[^&]*/,
Za = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
$a = f.fn.load,
Ca = {},
ab = {},
ia,
ja,
bb = ["*/"] + ["*"];
try {
ia = M.href
} catch(Tb) {
ia = A.createElement("a"),
ia.href = "",
ia = ia.href
}
ja = Za.exec(ia.toLowerCase()) || [];
f.fn.extend({
load: function(c, e, a) {
if ("string" !== typeof c && $a) return $a.apply(this, arguments);
if (!this.length) return this;
var b = c.indexOf(" ");
if (0 <= b) var j = c.slice(b, c.length),
c = c.slice(0, b);
b = "GET";
e && (f.isFunction(e) ? (a = e, e = d) : "object" === typeof e && (e = f.param(e, f.ajaxSettings.traditional),
b = "POST"));
var l = this;
f.ajax({
url: c,
type: b,
dataType: "html",
data: e,
complete: function(c, e, b) {
b = c.responseText;
c.isResolved() && (c.done(function(c) {
b = c
}), l.html(j ? f("<div>").append(b.replace(Lb, "")).find(j) : b));
a && l.each(a, [b, e, c])
}
});
return this
},
serialize: function() {
return f.param(this.serializeArray())
},
serializeArray: function() {
return this.map(function() {
return this.elements ? f.makeArray(this.elements) : this
}).filter(function() {
return this.name && !this.disabled && (this.checked || Mb.test(this.nodeName) ||
Ib.test(this.type))
}).map(function(c, e) {
var a = f(this).val();
return null == a ? null: f.isArray(a) ? f.map(a,
function(c) {
return {
name: e.name,
value: c.replace(Xa, "\r\n")
}
}) : {
name: e.name,
value: a.replace(Xa, "\r\n")
}
}).get()
}
});
f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(c, e) {
f.fn[e] = function(c) {
return this.on(e, c)
}
});
f.each(["get", "post"],
function(c, e) {
f[e] = function(c, a, b, j) {
f.isFunction(a) && (j = j || b, b = a, a = d);
return f.ajax({
type: e,
url: c,
data: a,
success: b,
dataType: j
})
}
});
f.extend({
getScript: function(c, e) {
return f.get(c, d, e, "script")
},
getJSON: function(c, e, a) {
return f.get(c, e, a, "json")
},
ajaxSetup: function(c, e) {
e ? N(c, f.ajaxSettings) : (e = c, c = f.ajaxSettings);
N(c, e);
return c
},
ajaxSettings: {
url: ia,
isLocal: /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ja[1]),
global: !0,
type: "GET",
contentType: "application/x-www-form-urlencoded",
processData: !0,
async: !0,
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
"*": bb
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText"
},
converters: {
"* text": a.String,
"text html": !0,
"text json": f.parseJSON,
"text xml": f.parseXML
},
flatOptions: {
context: !0,
url: !0
}
},
ajaxPrefilter: C(Ca),
ajaxTransport: C(ab),
ajax: function(c, e) {
function a(c, e, k, D) {
if (2 !== w) {
w = 2;
U && clearTimeout(U);
p = d;
P = D || "";
o.readyState = 0 < c ? 4: 0;
var B,
i,
C,
D = e;
if (k) {
var V = b,
X = o,
W = V.contents,
r = V.dataTypes,
t = V.responseFields,
G,
n,
H,
s;
for (n in t) n in k && (X[t[n]] = k[n]);
for (;
"*" ===
r[0];) r.shift(),
G === d && (G = V.mimeType || X.getResponseHeader("content-type"));
if (G) for (n in W) if (W[n] && W[n].test(G)) {
r.unshift(n);
break
}
if (r[0] in k) H = r[0];
else {
for (n in k) {
if (!r[0] || V.converters[n + " " + r[0]]) {
H = n;
break
}
s || (s = n)
}
H = H || s
}
H ? (H !== r[0] && r.unshift(H), k = k[H]) : k = void 0
} else k = d;
if (200 <= c && 300 > c || 304 === c) {
if (b.ifModified) {
if (G = o.getResponseHeader("Last-Modified")) f.lastModified[h] = G;
if (G = o.getResponseHeader("Etag")) f.etag[h] = G
}
if (304 === c) D = "notmodified",
B = !0;
else try {
G = b;
G.dataFilter && (k = G.dataFilter(k,
G.dataType));
var F = G.dataTypes;
n = {};
var z,
N,
va = F.length,
L,
I = F[0],
v,
u,
Y,
ea,
E;
for (z = 1; z < va; z++) {
if (1 === z) for (N in G.converters)"string" === typeof N && (n[N.toLowerCase()] = G.converters[N]);
v = I;
I = F[z];
if ("*" === I) I = v;
else if ("*" !== v && v !== I) {
u = v + " " + I;
Y = n[u] || n["* " + I];
if (!Y) for (ea in E = d, n) if (L = ea.split(" "), L[0] === v || "*" === L[0]) if (E = n[L[1] + " " + I]) {
ea = n[ea]; ! 0 === ea ? Y = E: !0 === E && (Y = ea);
break
} ! Y && !E && f.error("No conversion from " + u.replace(" ", " to ")); ! 0 !== Y && (k = Y ? Y(k) : E(ea(k)))
}
}
i = k;
D = "success";
B = !0
} catch(qa) {
D =
"parsererror",
C = qa
}
} else if (C = D, !D || c) D = "error",
0 > c && (c = 0);
o.status = c;
o.statusText = "" + (e || D);
B ? g.resolveWith(j, [i, D, o]) : g.rejectWith(j, [o, D, C]);
o.statusCode(q);
q = d;
A && l.trigger("ajax" + (B ? "Success": "Error"), [o, b, B ? i: C]);
m.fireWith(j, [o, D]);
A && (l.trigger("ajaxComplete", [o, b]), --f.active || f.event.trigger("ajaxStop"))
}
}
"object" === typeof c && (e = c, c = d);
var e = e || {},
b = f.ajaxSetup({},
e),
j = b.context || b,
l = j !== b && (j.nodeType || j instanceof f) ? f(j) : f.event,
g = f.Deferred(),
m = f.Callbacks("once memory"),
q = b.statusCode ||
{},
h,
D = {},
B = {},
P,
i,
p,
U,
C,
w = 0,
A,
V,
o = {
readyState: 0,
setRequestHeader: function(c, e) {
if (!w) {
var a = c.toLowerCase(),
c = B[a] = B[a] || c;
D[c] = e
}
return this
},
getAllResponseHeaders: function() {
return 2 === w ? P: null
},
getResponseHeader: function(c) {
var e;
if (2 === w) {
if (!i) for (i = {}; e = Hb.exec(P);) i[e[1].toLowerCase()] = e[2];
e = i[c.toLowerCase()]
}
return e === d ? null: e
},
overrideMimeType: function(c) {
if (!w) b.mimeType = c;
return this
},
abort: function(c) {
c = c || "abort";
p && p.abort(c);
a(0, c);
return this
}
};
g.promise(o);
o.success = o.done;
o.error =
o.fail;
o.complete = m.add;
o.statusCode = function(c) {
if (c) {
var e;
if (2 > w) for (e in c) q[e] = [q[e], c[e]];
else e = c[o.status],
o.then(e, e)
}
return this
};
b.url = ((c || b.url) + "").replace(Gb, "").replace(Kb, ja[1] + "//");
b.dataTypes = f.trim(b.dataType || "*").toLowerCase().split(Ja);
if (null == b.crossDomain) C = Za.exec(b.url.toLowerCase()),
b.crossDomain = !(!C || !(C[1] != ja[1] || C[2] != ja[2] || (C[3] || ("http:" === C[1] ? 80: 443)) != (ja[3] || ("http:" === ja[1] ? 80: 443))));
if (b.data && b.processData && "string" !== typeof b.data) b.data = f.param(b.data,
b.traditional);
G(Ca, b, e, o);
if (2 === w) return ! 1;
A = b.global;
b.type = b.type.toUpperCase();
b.hasContent = !Jb.test(b.type);
A && 0 === f.active++&&f.event.trigger("ajaxStart");
if (!b.hasContent && (b.data && (b.url += (Ya.test(b.url) ? "&": "?") + b.data, delete b.data), h = b.url, !1 === b.cache)) {
C = f.now();
var X = b.url.replace(Nb, "$1_=" + C);
b.url = X + (X === b.url ? (Ya.test(b.url) ? "&": "?") + "_=" + C: "")
} (b.data && b.hasContent && !1 !== b.contentType || e.contentType) && o.setRequestHeader("Content-Type", b.contentType);
b.ifModified && (h = h || b.url, f.lastModified[h] &&
o.setRequestHeader("If-Modified-Since", f.lastModified[h]), f.etag[h] && o.setRequestHeader("If-None-Match", f.etag[h]));
o.setRequestHeader("Accept", b.dataTypes[0] && b.accepts[b.dataTypes[0]] ? b.accepts[b.dataTypes[0]] + ("*" !== b.dataTypes[0] ? ", " + bb + "; q=0.01": "") : b.accepts["*"]);
for (V in b.headers) o.setRequestHeader(V, b.headers[V]);
if (b.beforeSend && (!1 === b.beforeSend.call(j, o, b) || 2 === w)) return o.abort(),
!1;
for (V in {
success: 1,
error: 1,
complete: 1
}) o[V](b[V]);
if (p = G(ab, b, e, o)) {
o.readyState = 1;
A && l.trigger("ajaxSend",
[o, b]);
b.async && 0 < b.timeout && (U = setTimeout(function() {
o.abort("timeout")
},
b.timeout));
try {
w = 1,
p.send(D, a)
} catch(W) {
if (2 > w) a( - 1, W);
else throw W;
}
} else a( - 1, "No Transport");
return o
},
param: function(c, e) {
var a = [],
b = function(c, e) {
e = f.isFunction(e) ? e() : e;
a[a.length] = encodeURIComponent(c) + "=" + encodeURIComponent(e)
};
if (e === d) e = f.ajaxSettings.traditional;
if (f.isArray(c) || c.jquery && !f.isPlainObject(c)) f.each(c,
function() {
b(this.name, this.value)
});
else for (var j in c) L(j, c[j], e, b);
return a.join("&").replace(Fb,
"+")
}
});
f.extend({
active: 0,
lastModified: {},
etag: {}
});
var Ob = f.now(),
xa = /(\=)\?(&|$)|\?\?/i;
f.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
return f.expando + "_" + Ob++
}
});
f.ajaxPrefilter("json jsonp",
function(c, e, b) {
e = "application/x-www-form-urlencoded" === c.contentType && "string" === typeof c.data;
if ("jsonp" === c.dataTypes[0] || !1 !== c.jsonp && (xa.test(c.url) || e && xa.test(c.data))) {
var d,
j = c.jsonpCallback = f.isFunction(c.jsonpCallback) ? c.jsonpCallback() : c.jsonpCallback,
l = a[j],
g = c.url,
m = c.data,
q = "$1" + j +
"$2"; ! 1 !== c.jsonp && (g = g.replace(xa, q), c.url === g && (e && (m = m.replace(xa, q)), c.data === m && (g += (/\?/.test(g) ? "&": "?") + c.jsonp + "=" + j)));
c.url = g;
c.data = m;
a[j] = function(c) {
d = [c]
};
b.always(function() {
a[j] = l;
if (d && f.isFunction(l)) a[j](d[0])
});
c.converters["script json"] = function() {
d || f.error(j + " was not called");
return d[0]
};
c.dataTypes[0] = "json";
return "script"
}
});
f.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /javascript|ecmascript/
},
converters: {
"text script": function(c) {
f.globalEval(c);
return c
}
}
});
f.ajaxPrefilter("script",
function(c) {
if (c.cache === d) c.cache = !1;
if (c.crossDomain) c.type = "GET",
c.global = !1
});
f.ajaxTransport("script",
function(c) {
if (c.crossDomain) {
var e,
a = A.head || A.getElementsByTagName("head")[0] || A.documentElement;
return {
send: function(f, b) {
e = A.createElement("script");
e.async = "async";
if (c.scriptCharset) e.charset = c.scriptCharset;
e.src = c.url;
e.onload = e.onreadystatechange = function(c, f) {
if (f || !e.readyState || /loaded|complete/.test(e.readyState)) e.onload =
e.onreadystatechange = null,
a && e.parentNode && a.removeChild(e),
e = d,
f || b(200, "success")
};
a.insertBefore(e, a.firstChild)
},
abort: function() {
if (e) e.onload(0, 1)
}
}
}
});
var Ha = a.ActiveXObject ?
function() {
for (var c in pa) pa[c](0, 1)
}: !1,
Pb = 0,
pa;
f.ajaxSettings.xhr = a.ActiveXObject ?
function() {
var c;
if (! (c = !this.isLocal && v())) a: {
try {
c = new a.ActiveXObject("Microsoft.XMLHTTP");
break a
} catch(e) {}
c = void 0
}
return c
}: v; (function(c) {
f.extend(f.support, {
ajax: !!c,
cors: !!c && "withCredentials" in c
})
})(f.ajaxSettings.xhr());
f.support.ajax &&
f.ajaxTransport(function(c) {
if (!c.crossDomain || f.support.cors) {
var e;
return {
send: function(b, j) {
var l = c.xhr(),
g,
m;
c.username ? l.open(c.type, c.url, c.async, c.username, c.password) : l.open(c.type, c.url, c.async);
if (c.xhrFields) for (m in c.xhrFields) l[m] = c.xhrFields[m];
c.mimeType && l.overrideMimeType && l.overrideMimeType(c.mimeType); ! c.crossDomain && !b["X-Requested-With"] && (b["X-Requested-With"] = "XMLHttpRequest");
try {
for (m in b) l.setRequestHeader(m, b[m])
} catch(q) {}
l.send(c.hasContent && c.data || null);
e = function(a,
b) {
var m,
k,
q,
h,
D;
try {
if (e && (b || 4 === l.readyState)) {
e = d;
if (g) l.onreadystatechange = f.noop,
Ha && delete pa[g];
if (b) 4 !== l.readyState && l.abort();
else {
m = l.status;
q = l.getAllResponseHeaders();
h = {};
if ((D = l.responseXML) && D.documentElement) h.xml = D;
h.text = l.responseText;
try {
k = l.statusText
} catch(B) {
k = ""
} ! m && c.isLocal && !c.crossDomain ? m = h.text ? 200: 404: 1223 === m && (m = 204)
}
}
} catch(i) {
b || j( - 1, i)
}
h && j(m, k, h, q)
}; ! c.async || 4 === l.readyState ? e() : (g = ++Pb, Ha && (pa || (pa = {},
f(a).unload(Ha)), pa[g] = e), l.onreadystatechange = e)
},
abort: function() {
e &&
e(0, 1)
}
}
}
});
var Da = {},
fa,
ma,
Qb = /^(?:toggle|show|hide)$/,
Rb = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
ya,
Ka = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]],
sa;
f.fn.extend({
show: function(c, e, a) {
if (c || 0 === c) return this.animate(m("show", 3), c, e, a);
for (var a = 0, b = this.length; a < b; a++) c = this[a],
c.style && (e = f.css(c, "display"), !f._data(c, "olddisplay") && "none" === e && (f.style(c, "display", ""), e = ""), "" === e && "none" === f.css(c,
"display") && f._data(c, "olddisplay", U(c.nodeName)));
for (a = 0; a < b; a++) if (c = this[a], c.style && (e = f.css(c, "display"), "" === e || "none" === e)) f.style(c, "display", f._data(c, "olddisplay") || "");
return this
},
hide: function(c, e, a) {
if (c || 0 === c) return this.animate(m("hide", 3), c, e, a);
for (var a = 0, b = this.length; a < b; a++) c = this[a],
c.style && (e = f.css(c, "display"), "none" !== e && !f._data(c, "olddisplay") && f._data(c, "olddisplay", e));
for (a = 0; a < b; a++) this[a].style && f.style(this[a], "display", "none");
return this
},
_toggle: f.fn.toggle,
toggle: function(c, e, a) {
var b = "boolean" === typeof c;
f.isFunction(c) && f.isFunction(e) ? this._toggle.apply(this, arguments) : null == c || b ? this.each(function() {
var e = b ? c: f(this).is(":hidden");
f(this)[e ? "show": "hide"]()
}) : this.animate(m("toggle", 3), c, e, a);
return this
},
fadeTo: function(c, e, a, f) {
return this.filter(":hidden").css("opacity", 0).show().end().animate({
opacity: e
},
c, a, f)
},
animate: function(c, e, a, b) {
function d() {
var x; ! 1 === j.queue && f._mark(this);
var e = f.extend({},
j),
a = 1 === this.nodeType,
b = a && f(this).is(":hidden"),
l,
g,
m,
k,
q;
e.animatedProperties = {};
for (m in c) {
l = f.camelCase(m);
m !== l && (c[l] = c[m], delete c[m]);
g = c[l];
f.isArray(g) ? (e.animatedProperties[l] = g[1], x = c[l] = g[0], g = x) : e.animatedProperties[l] = e.specialEasing && e.specialEasing[l] || e.easing || "swing";
if ("hide" === g && b || "show" === g && !b) return e.complete.call(this);
if (a && ("height" === l || "width" === l)) e.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY],
"inline" === f.css(this, "display") && "none" === f.css(this, "float") && (!f.support.inlineBlockNeedsLayout ||
"inline" === U(this.nodeName) ? f.style(this, "display", "inline-block") : f.style(this, "zoom", 1))
}
null != e.overflow && f.style(this, "overflow", "hidden");
for (m in c) if (a = new f.fx(this, e, m), g = c[m], Qb.test(g)) if (l = f._data(this, "toggle" + m) || ("toggle" === g ? b ? "show": "hide": 0)) f._data(this, "toggle" + m, "show" === l ? "hide": "show"),
a[l]();
else a[g]();
else l = Rb.exec(g),
k = a.cur(),
l ? (g = parseFloat(l[2]), q = l[3] || (f.cssNumber[m] ? "": "px"), "px" !== q && (f.style(this, m, (g || 1) + q), k *= (g || 1) / a.cur(), f.style(this, m, k + q)), l[1] && (g = ("-=" ===
l[1] ? -1: 1) * g + k), a.custom(k, g, q)) : a.custom(k, g, "");
return ! 0
}
var j = f.speed(e, a, b);
if (f.isEmptyObject(c)) return this.each(j.complete, [!1]);
c = f.extend({},
c);
return ! 1 === j.queue ? this.each(d) : this.queue(j.queue, d)
},
stop: function(c, e, a) {
"string" !== typeof c && (a = e, e = c, c = d);
e && !1 !== c && this.queue(c || "fx", []);
return this.each(function() {
var e,
b = !1,
d = f.timers,
j = f._data(this);
a || f._unmark(!0, this);
if (null == c) for (e in j) {
if (j[e] && j[e].stop && e.indexOf(".run") === e.length - 4) {
var l = j[e];
f.removeData(this, e, !0);
l.stop(a)
}
} else if (j[e =
c + ".run"] && j[e].stop) j = j[e],
f.removeData(this, e, !0),
j.stop(a);
for (e = d.length; e--;) if (d[e].elem === this && (null == c || d[e].queue === c)) {
if (a) d[e](!0);
else d[e].saveState();
b = !0;
d.splice(e, 1)
} (!a || !b) && f.dequeue(this, c)
})
}
});
f.each({
slideDown: m("show", 1),
slideUp: m("hide", 1),
slideToggle: m("toggle", 1),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
},
function(c, e) {
f.fn[c] = function(c, a, f) {
return this.animate(e, c, a, f)
}
});
f.extend({
speed: function(c, e, a) {
var b = c && "object" === typeof c ?
f.extend({},
c) : {
complete: a || !a && e || f.isFunction(c) && c,
duration: c,
easing: a && e || e && !f.isFunction(e) && e
};
b.duration = f.fx.off ? 0: "number" === typeof b.duration ? b.duration: b.duration in f.fx.speeds ? f.fx.speeds[b.duration] : f.fx.speeds._default;
if (null == b.queue || !0 === b.queue) b.queue = "fx";
b.old = b.complete;
b.complete = function(c) {
f.isFunction(b.old) && b.old.call(this);
b.queue ? f.dequeue(this, b.queue) : !1 !== c && f._unmark(this)
};
return b
},
easing: {
linear: function(c, e, a, f) {
return a + f * c
},
swing: function(c, e, a, f) {
return ( - Math.cos(c *
Math.PI) / 2 + 0.5) * f + a
}
},
timers: [],
fx: function(c, e, a) {
this.options = e;
this.elem = c;
this.prop = a;
e.orig = e.orig || {}
}
});
f.fx.prototype = {
update: function() {
this.options.step && this.options.step.call(this.elem, this.now, this); (f.fx.step[this.prop] || f.fx.step._default)(this)
},
cur: function() {
if (null != this.elem[this.prop] && (!this.elem.style || null == this.elem.style[this.prop])) return this.elem[this.prop];
var c,
e = f.css(this.elem, this.prop);
return isNaN(c = parseFloat(e)) ? !e || "auto" === e ? 0: e: c
},
custom: function(c, e, a) {
function b(c) {
return j.step(c)
}
var j = this,
l = f.fx;
this.startTime = sa || u();
this.end = e;
this.now = this.start = c;
this.pos = this.state = 0;
this.unit = a || this.unit || (f.cssNumber[this.prop] ? "": "px");
b.queue = this.options.queue;
b.elem = this.elem;
b.saveState = function() {
j.options.hide && f._data(j.elem, "fxshow" + j.prop) === d && f._data(j.elem, "fxshow" + j.prop, j.start)
};
b() && f.timers.push(b) && !ya && (ya = setInterval(l.tick, l.interval))
},
show: function() {
var c = f._data(this.elem, "fxshow" + this.prop);
this.options.orig[this.prop] = c || f.style(this.elem, this.prop);
this.options.show =
!0;
c !== d ? this.custom(this.cur(), c) : this.custom("width" === this.prop || "height" === this.prop ? 1: 0, this.cur());
f(this.elem).show()
},
hide: function() {
this.options.orig[this.prop] = f._data(this.elem, "fxshow" + this.prop) || f.style(this.elem, this.prop);
this.options.hide = !0;
this.custom(this.cur(), 0)
},
step: function(c) {
var e,
a = sa || u(),
b = !0,
d = this.elem,
j = this.options;
if (c || a >= j.duration + this.startTime) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
j.animatedProperties[this.prop] = !0;
for (e in j.animatedProperties) ! 0 !==
j.animatedProperties[e] && (b = !1);
if (b) {
null != j.overflow && !f.support.shrinkWrapBlocks && f.each(["", "X", "Y"],
function(c, e) {
f.style(d, "overflow" + e, j.overflow[c])
});
j.hide && f(d).hide();
if (j.hide || j.show) for (e in j.animatedProperties) f.style(d, e, j.orig[e]),
f.removeData(d, "fxshow" + e, !0),
f.removeData(d, "toggle" + e, !0);
if (c = j.complete) j.complete = !1,
c.call(d)
}
return ! 1
}
Infinity == j.duration ? this.now = a: (c = a - this.startTime, this.state = c / j.duration, this.pos = f.easing[j.animatedProperties[this.prop]](this.state, c, 0,
1, j.duration), this.now = this.start + (this.end - this.start) * this.pos);
this.update();
return ! 0
}
};
f.extend(f.fx, {
tick: function() {
for (var c, e = f.timers, a = 0; a < e.length; a++) c = e[a],
!c() && e[a] === c && e.splice(a--, 1);
e.length || f.fx.stop()
},
interval: 13,
stop: function() {
clearInterval(ya);
ya = null
},
speeds: {
slow: 600,
fast: 200,
_default: 400
},
step: {
opacity: function(c) {
f.style(c.elem, "opacity", c.now)
},
_default: function(c) {
c.elem.style && null != f.css(c.elem, c.prop) ? f.style(c.elem, c.prop, c.now + c.unit) : c.elem[c.prop] = c.now
}
}
});
f.each(["width", "height"],
function(c, e) {
f.fx.step[e] = function(c) {
f.style(c.elem, e, Math.max(0, c.now) + c.unit)
}
});
if (f.expr && f.expr.filters) f.expr.filters.animated = function(c) {
return f.grep(f.timers,
function(e) {
return c === e.elem
}).length
};
var Sb = /^t(?:able|d|h)$/i,
cb = /^(?:body|html)$/i;
f.fn.offset = "getBoundingClientRect" in A.documentElement ?
function(c) {
var e = this[0],
a;
if (c) return this.each(function(e) {
f.offset.setOffset(this, c, e)
});
if (!e || !e.ownerDocument) return null;
if (e === e.ownerDocument.body) return f.offset.bodyOffset(e);
try {
a = e.getBoundingClientRect()
} catch(b) {}
var d = e.ownerDocument,
j = d.documentElement;
if (!a || !f.contains(j, e)) return a ? {
top: a.top,
left: a.left
}: {
top: 0,
left: 0
};
e = d.body;
d = W(d);
return {
top: a.top + (d.pageYOffset || f.support.boxModel && j.scrollTop || e.scrollTop) - (j.clientTop || e.clientTop || 0),
left: a.left + (d.pageXOffset || f.support.boxModel && j.scrollLeft || e.scrollLeft) - (j.clientLeft || e.clientLeft || 0)
}
}: function(c) {
var e = this[0];
if (c) return this.each(function(e) {
f.offset.setOffset(this, c, e)
});
if (!e || !e.ownerDocument) return null;
if (e === e.ownerDocument.body) return f.offset.bodyOffset(e);
var a,
b = e.offsetParent,
d = e.ownerDocument,
j = d.documentElement,
l = d.body;
a = (d = d.defaultView) ? d.getComputedStyle(e, null) : e.currentStyle;
for (var g = e.offsetTop, m = e.offsetLeft; (e = e.parentNode) && e !== l && e !== j && !(f.support.fixedPosition && "fixed" === a.position);) {
a = d ? d.getComputedStyle(e, null) : e.currentStyle;
g -= e.scrollTop;
m -= e.scrollLeft;
if (e === b) {
g += e.offsetTop;
m += e.offsetLeft;
if (f.support.doesNotAddBorder && (!f.support.doesAddBorderForTableAndCells ||
!Sb.test(e.nodeName))) g += parseFloat(a.borderTopWidth) || 0,
m += parseFloat(a.borderLeftWidth) || 0;
b = e.offsetParent
}
f.support.subtractsBorderForOverflowNotVisible && "visible" !== a.overflow && (g += parseFloat(a.borderTopWidth) || 0, m += parseFloat(a.borderLeftWidth) || 0)
}
if ("relative" === a.position || "static" === a.position) g += l.offsetTop,
m += l.offsetLeft;
f.support.fixedPosition && "fixed" === a.position && (g += Math.max(j.scrollTop, l.scrollTop), m += Math.max(j.scrollLeft, l.scrollLeft));
return {
top: g,
left: m
}
};
f.offset = {
bodyOffset: function(c) {
var e =
c.offsetTop,
a = c.offsetLeft;
f.support.doesNotIncludeMarginInBodyOffset && (e += parseFloat(f.css(c, "marginTop")) || 0, a += parseFloat(f.css(c, "marginLeft")) || 0);
return {
top: e,
left: a
}
},
setOffset: function(c, e, a) {
var b = f.css(c, "position");
if ("static" === b) c.style.position = "relative";
var d = f(c),
j = d.offset(),
l = f.css(c, "top"),
g = f.css(c, "left"),
m = {},
q = {}; ("absolute" === b || "fixed" === b) && -1 < f.inArray("auto", [l, g]) ? (q = d.position(), b = q.top, g = q.left) : (b = parseFloat(l) || 0, g = parseFloat(g) || 0);
f.isFunction(e) && (e = e.call(c, a,
j));
if (null != e.top) m.top = e.top - j.top + b;
if (null != e.left) m.left = e.left - j.left + g;
"using" in e ? e.using.call(c, m) : d.css(m)
}
};
f.fn.extend({
position: function() {
if (!this[0]) return null;
var c = this[0],
e = this.offsetParent(),
a = this.offset(),
b = cb.test(e[0].nodeName) ? {
top: 0,
left: 0
}: e.offset();
a.top -= parseFloat(f.css(c, "marginTop")) || 0;
a.left -= parseFloat(f.css(c, "marginLeft")) || 0;
b.top += parseFloat(f.css(e[0], "borderTopWidth")) || 0;
b.left += parseFloat(f.css(e[0], "borderLeftWidth")) || 0;
return {
top: a.top - b.top,
left: a.left -
b.left
}
},
offsetParent: function() {
return this.map(function() {
for (var c = this.offsetParent || A.body; c && !cb.test(c.nodeName) && "static" === f.css(c, "position");) c = c.offsetParent;
return c
})
}
});
f.each(["Left", "Top"],
function(c, a) {
var b = "scroll" + a;
f.fn[b] = function(a) {
var e,
j;
if (a === d) {
e = this[0];
return ! e ? null: (j = W(e)) ? "pageXOffset" in j ? j[c ? "pageYOffset": "pageXOffset"] : f.support.boxModel && j.document.documentElement[b] || j.document.body[b] : e[b]
}
return this.each(function() { (j = W(this)) ? j.scrollTo(!c ? a: f(j).scrollLeft(),
c ? a: f(j).scrollTop()) : this[b] = a
})
}
});
f.each(["Height", "Width"],
function(c, a) {
var b = a.toLowerCase();
f.fn["inner" + a] = function() {
var c = this[0];
return c ? c.style ? parseFloat(f.css(c, b, "padding")) : this[b]() : null
};
f.fn["outer" + a] = function(c) {
var a = this[0];
return a ? a.style ? parseFloat(f.css(a, b, c ? "margin": "border")) : this[b]() : null
};
f.fn[b] = function(c) {
var j = this[0];
if (!j) return null == c ? null: this;
if (f.isFunction(c)) return this.each(function(a) {
var e = f(this);
e[b](c.call(this, a, e[b]()))
});
if (f.isWindow(j)) {
var l =
j.document.documentElement["client" + a],
g = j.document.body;
return "CSS1Compat" === j.document.compatMode && l || g && g["client" + a] || l
}
if (9 === j.nodeType) return Math.max(j.documentElement["client" + a], j.body["scroll" + a], j.documentElement["scroll" + a], j.body["offset" + a], j.documentElement["offset" + a]);
return c === d ? (j = f.css(j, b), l = parseFloat(j), f.isNumeric(l) ? l: j) : this.css(b, "string" === typeof c ? c: c + "px", !0)
}
});
a.jQuery = a.$ = f;
"function" === typeof define && define.amd && define.amd.jQuery && define("jquery", [],
function() {
return f
})
})(d)
})();
if (this.env.iHatePrototype.stupidFuckingPrototype) this.document.getElementsByClassName = this.env.iHatePrototype.getElementsByClassName;
var b = this.$ = a.$ = d.jQuery.noConflict(!0);
this.baseData = a.baseData = p(this.$);
this.bodyOffset = a.bodyOffset = S(this.$); (function() {
function a(b) {
var d = function(a, b) {
return a << b | a >>> 32 - b
},
g = function(a) {
var b = "",
d,
j;
for (d = 7; 0 <= d; d--) j = a >>> 4 * d & 15,
b += j.toString(16);
return b
},
q,
h,
i = Array(80),
p = 1732584193,
o = 4023233417,
n = 2562383102,
w = 271733878,
r = 3285377520,
t,
H,
s,
z,
N,
b = this.utf8_encode(b);
t = b.length;
var C = [];
for (q = 0; q < t - 3; q += 4) h = b.charCodeAt(q) << 24 | b.charCodeAt(q + 1) << 16 | b.charCodeAt(q + 2) << 8 | b.charCodeAt(q + 3),
C.push(h);
switch (t % 4) {
case 0:
q = 2147483648;
break;
case 1:
q = b.charCodeAt(t - 1) << 24 | 8388608;
break;
case 2:
q = b.charCodeAt(t - 2) << 24 | b.charCodeAt(t - 1) << 16 | 32768;
break;
case 3:
q = b.charCodeAt(t - 3) << 24 | b.charCodeAt(t - 2) << 16 | b.charCodeAt(t - 1) << 8 | 128
}
for (C.push(q); 14 != C.length % 16;) C.push(0);
C.push(t >>> 29);
C.push(t << 3 & 4294967295);
for (b = 0; b < C.length; b += 16) {
for (q = 0; 16 > q; q++) i[q] = C[b + q];
for (q = 16; 79 >=
q; q++) i[q] = d(i[q - 3] ^ i[q - 8] ^ i[q - 14] ^ i[q - 16], 1);
h = p;
t = o;
H = n;
s = w;
z = r;
for (q = 0; 19 >= q; q++) N = d(h, 5) + (t & H | ~t & s) + z + i[q] + 1518500249 & 4294967295,
z = s,
s = H,
H = d(t, 30),
t = h,
h = N;
for (q = 20; 39 >= q; q++) N = d(h, 5) + (t ^ H ^ s) + z + i[q] + 1859775393 & 4294967295,
z = s,
s = H,
H = d(t, 30),
t = h,
h = N;
for (q = 40; 59 >= q; q++) N = d(h, 5) + (t & H | t & s | H & s) + z + i[q] + 2400959708 & 4294967295,
z = s,
s = H,
H = d(t, 30),
t = h,
h = N;
for (q = 60; 79 >= q; q++) N = d(h, 5) + (t ^ H ^ s) + z + i[q] + 3395469782 & 4294967295,
z = s,
s = H,
H = d(t, 30),
t = h,
h = N;
p = p + h & 4294967295;
o = o + t & 4294967295;
n = n + H & 4294967295;
w = w + s & 4294967295;
r = r + z & 4294967295
}
N = g(p) + g(o) + g(n) + g(w) + g(r);
return N.toLowerCase()
} (function(a) {
var b;
if (!a) b = d.CLIPBOARD = d.CLIPBOARD || {},
a = b.common = b.common || {};
a.pad = function(a, b, d) {
if (!a.length || !b) return a;
for (var d = d - a.length, j = "", g = 0; g < d; ++g) j += b;
return j + a
};
a.guid = function(a) {
function b() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
}
var d = b() + b() + "-" + b() + "-" + b() + "-" + b() + "-" + b() + b() + b();
a && (d = d.replace(/-/g, ""));
return d
};
a.randInt = function(a, b) {
return Math.floor(Math.random() * (b - a) + a)
};
a.caseInsensitiveCompare =
function(a, b) {
var d = a.toLowerCase(),
j = b.toLowerCase();
return d < j ? -1: d > j ? 1: 0
};
a.isValidUsername = function(b) {
return b && b.match(/^[A-Za-z]\w{1,19}$/) && !(b.toLowerCase() in a.loginBlacklist)
};
a.isValidEmail = function(a) {
return ! a || 100 < a.length ? !1: a.match(/^[a-z0-9.\-_+%]+@[a-z0-9-_+%]+\.[a-z0-9.\-_+%]+$/i)
};
a.loginBlacklist = {
about: 1,
account: 1,
activate: 1,
add: 1,
addons: 1,
admin: 1,
administrator: 1,
all: 1,
api: 1,
app: 1,
apps: 1,
archive: 1,
archives: 1,
avatar: 1,
avatarupload: 1,
auth: 1,
better: 1,
blob: 1,
blobloader: 1,
block: 1,
blog: 1,
cache: 1,
cancel: 1,
careers: 1,
cart: 1,
cat: 1,
cats: 1,
category: 1,
categories: 1,
changelog: 1,
checkout: 1,
chrome: 1,
chromeapp: 1,
chromeextversion: 1,
codereview: 1,
clip: 1,
clipper: 1,
clips: 1,
common: 1,
compare: 1,
config: 1,
configuration: 1,
connect: 1,
contact: 1,
create: 1,
css: 1,
"delete": 1,
direct_messages: 1,
documentation: 1,
download: 1,
downloads: 1,
edit: 1,
editor: 1,
email: 1,
emailverify: 1,
embed: 1,
employment: 1,
enterprise: 1,
error: 1,
extension: 1,
extensions: 1,
facebook: 1,
faq: 1,
favorites: 1,
feed: 1,
feedback: 1,
feeds: 1,
fleet: 1,
fleets: 1,
follow: 1,
followers: 1,
following: 1,
friend: 1,
friends: 1,
gist: 1,
group: 1,
groups: 1,
help: 1,
home: 1,
hosting: 1,
hostmaster: 1,
idea: 1,
ideas: 1,
index: 1,
info: 1,
invitations: 1,
invite: 1,
is: 1,
it: 1,
job: 1,
jobs: 1,
js: 1,
json: 1,
lib: 1,
lists: 1,
login: 1,
logout: 1,
logoutRedirect: 1,
log: 1,
logs: 1,
mail: 1,
manage: 1,
map: 1,
maps: 1,
mine: 1,
mis: 1,
news: 1,
notification: 1,
notifications: 1,
oauth: 1,
oauth_clients: 1,
offers: 1,
openid: 1,
order: 1,
orders: 1,
organizations: 1,
pass: 1,
people: 1,
plans: 1,
popular: 1,
post: 1,
privacy: 1,
profile: 1,
projects: 1,
put: 1,
recruitment: 1,
redeem: 1,
register: 1,
remove: 1,
replies: 1,
root: 1,
rss: 1,
sales: 1,
save: 1,
search: 1,
security: 1,
session: 1,
sessions: 1,
settings: 1,
shared: 1,
site: 1,
sites: 1,
shop: 1,
signup: 1,
sitemap: 1,
socialClipper: 1,
ssl: 1,
ssladmin: 1,
ssladministrator: 1,
sslwebmaster: 1,
start: 1,
"static": 1,
status: 1,
stories: 1,
styleguide: 1,
subscribe: 1,
subscriptions: 1,
support: 1,
sysadmin: 1,
sysadministrator: 1,
tag: 1,
tags: 1,
terms: 1,
token: 1,
tools: 1,
tour: 1,
translations: 1,
trends: 1,
twitter: 1,
twittr: 1,
unfollow: 1,
unsubscribe: 1,
update: 1,
url: 1,
user: 1,
users: 1,
utils: 1,
verifyemail: 1,
w3c: 1,
weather: 1,
welcome: 1,
widget: 1,
widgets: 1,
wiki: 1,
ww: 1,
www: 1,
wwww: 1,
xfn: 1,
xml: 1,
xmpp: 1,
yaml: 1,
yml: 1
};
a.merge = function(a, b, d) {
for (var j in b) if (b.hasOwnProperty(j) && (d || !a.hasOwnProperty(j))) a[j] = b[j];
return a
};
a.createAvatarUrl = function(a, b, d) {
return d ? a.cdnUser + d + "_" + b: a.staticBaseUrl + "/images/missing-avatar.jpg"
};
a.getBestThumbnailPath = function(b, d, j, g, h) {
if ("help" === b.type) return a.getThumbnailPathForLevel(b, 8);
h = Math.max(g, h);
g = Math.ceil(a.logBase(h, 2));
d = Math.max(d, j);
j = Math.ceil(a.logBase(d,
2));
h /= Math.pow(2, g - j);
j = Math.max(8, j);
1.15 < d / h && (j = Math.min(j + 1, g));
return a.getThumbnailPathForLevel(b, j)
};
a.getThumbnailPathForLevel = function(a, b) {
return a.thumbnailId ? a.thumbnailId + "_" + b: a.blobId + "_" + b
};
a.logBase = function(a, b) {
return Math.log(a) / Math.log(b)
};
a.inviteTypes = {
Facebook: "Facebook",
Twitter: "Twitter",
Linkedin: "Linkedin",
Email: "Email"
};
a.arrayRemove = function(a, b, d) {
d = a.slice((d || b) + 1 || a.length);
a.length = 0 > b ? a.length + b: b;
a.push.apply(a, d)
};
a.arrayRemoveByVal = function(a) {
for (var b = 1; b <
arguments.length; ++b) for (var d; 0 <= (d = a.indexOf(arguments[b]));) a.splice(d, 1)
};
a.arrayInsertIfUnique = function(a) {
for (var b = 1; b < arguments.length; ++b) 0 > a.indexOf(arguments[b]) && a.push(arguments[b])
}
})("undefined" === typeof process || !process.versions ? null: exports); (function(a) {
var c;
if (!a) a = d.CLIPBOARD = d.CLIPBOARD || {},
c = a.common = a.common || {},
a = c;
a.crc32 = function() {
return function(a, b) {
var d = 0,
g = d = 0,
h = a.length;
void 0 === b && (b = 0);
for (b ^= -1; g < h; g++) d = (b ^ a.charCodeAt(g)) & 255,
d = "0x" + "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(9 *
d, 8),
b = b >>> 8 ^ d;
g = b ^ -1;
0 > g && (g = 4294967295 + g + 1);
g = g.toString(16).toLowerCase();
for (h = 0; h < 8 - g.length; h++) g = "0" + g;
return g
}
} ()
})("undefined" === typeof process || !process.versions ? null: exports); (function(a) {
if (!a) a = d.CLIPBOARD = d.CLIPBOARD || {},
a.common = a.common || {},
a = a.common.blobSanitization = {};
var b = a.tagCloseType = {
normal: 1,
selfClosing: 2
};
a.unsafeTags = {
base: b.selfClosing,
basefont: b.selfClosing,
body: b.normal,
form: b.normal,
frame: b.normal,
frameset: b.normal,
head: b.normal,
html: b.normal,
isindex: b.normal,
link: b.selfClosing,
meta: b.selfClosing,
script: b.normal,
title: b.normal
};
a.unsafeAttributes = {
"class": 1,
id: 1,
width: 1,
height: 1,
style: 1,
hidden: 1,
name: 1
}
})("undefined" === typeof process || !process.versions ? null: exports); (function(b, d, g, h) {
function i() {
H || (USTORE.init(), H = !0)
}
function p() {
if (null != s) return s;
var a = CLIPBOARD.time,
b = (new Date).getTime();
return s = parseInt(a) - b
}
function o(a) {
var b = [];
g.each(a,
function(a, d) {
b.push(encodeURIComponent(a) + "=" + encodeURIComponent(d))
});
return b.sort().join("&")
}
function t(a, b) {
var d = a.sign ||
!1,
j = a.verb || null,
h = a.path || null,
q = a.cache || !1,
i = a.raw || null,
f = a.jsonp || !1,
B = a.jsonpCallbackName || null;
if (j && h && !(f && "GET" != j)) {
var o = "",
o = /^\/\//.test(h) ? h: r + h,
C = (new Date).getTime() + p(),
Q = function(a) {
b && b(a.error, a.result, a.requestBody)
},
G = function(a) {
b && (500 <= a.status ? b({
noConnection: !0,
statusCode: a.status
},
null) : b({
unknown: !0,
statusCode: a.status
},
null))
},
z = "GET" === j;
n.log && n.log.net(h);
if (z) if (d && (d = w.guid(), h = w.secret(), i = w.signMessage(o, null, C, d, h), o = -1 === o.indexOf("?") ? o + ("?" + i.msg) : o + ("&" +
i.msg)), f) {
j = {
type: j,
dataType: "jsonp",
url: o,
cache: q,
async: !0,
success: Q,
error: G
};
if (B) j.jsonp = !1,
j.jsonpCallback = B;
g.ajax(j)
} else g.ajax({
type: j,
url: o,
cache: q,
async: !0,
success: Q,
error: G
});
else {
B = i;
if (d) d = w.guid(),
h = w.secret(),
i = w.signMessage(o, i, C, d, h),
B = i.msg;
g.ajax({
type: j,
url: o,
data: B,
cache: q,
async: !0,
success: Q,
error: G
})
}
}
}
var n = b.CLIPBOARD = b.CLIPBOARD || {},
w = n.data = n.data || {},
b = b.location,
r = b.protocol + "//" + b.host;
n.tracker = n.tracker || {};
var H = !1,
s = null;
w.signMessage = function(b, d, j, h, i) {
b = o(g.extend({
hmac_url: encodeURIComponent(b),
hmac_time: encodeURIComponent(j),
hmac_guid: encodeURIComponent(h),
hmac_nonce: a(b + (new Date).getTime() + i)
},
d));
i = a(b + i);
return {
msg: b + "&hmac_sig=" + i,
sig: i
}
};
var z = w.localSignPost = function(a, b, d) {
t({
sign: !0,
verb: "POST",
path: a,
raw: b
},
d)
},
N = w.localPost = function(a, b, d) {
t({
verb: "POST",
path: a,
raw: b
},
d)
},
F = w.localSignPut = function(a, b, d) {
t({
sign: !0,
verb: "PUT",
path: a,
raw: b
},
d)
},
C = w.localSignGet = function(a, b) {
t({
sign: !0,
verb: "GET",
path: a
},
b)
},
G = w.localGet = function(a, b, d) {
t({
verb: "GET",
path: a,
cache: b
},
d)
},
L = w.localSignDelete =
function(a, b, d) {
t({
sign: !0,
verb: "DELETE",
path: a,
raw: b
},
d)
},
v = function(a, b, d, j) {
t({
verb: "GET",
path: a,
cache: b,
jsonp: !0,
jsonpCallbackName: d
},
j)
},
u = w.getData = function(a) {
i();
a = USTORE.getValue(a);
return null == a || "" == a || "null" == a ? null: a
};
w.setData = function(a, b) {
i();
USTORE.setValue(a, b)
};
w.deleteValue = function(a) {
i();
USTORE.deleteValue(a)
};
w.secret = function() {
return u("secret")
};
w.login = function() {
return u("login")
};
w.guid = function() {
return u("guid")
};
w.searchPrivate = function(a, b, d, j, g) {
a = {
scope: JSON.stringify(a)
};
if (b) a.query = b;
if (d) a.beforeTime = d;
if (j) a.rows = j;
z("/api/v1/searchPrivate", a,
function(a, b) {
g.apply(this, arguments)
})
};
w.searchPublic = function(a, b, d, j, g) {
a = {
scope: JSON.stringify(a)
};
if (b) a.query = b;
if (d) a.beforeTime = d;
if (j) a.rows = j;
N("/api/v1/searchPublic", a, g)
};
w.searchUsers = function(a, b, d, j) {
C("/api/v1/users/search?q=" + a + "&start=" + b + "&rows=" + d, j)
};
w.getPopularUsers = function(a) {
C("/api/v1/users/popular", a)
};
w.getClip = function(a, b) {
G("/api/v1/clips/" + a, !1,
function(a, d) {
b(a, d)
})
};
w.getTop = function(a,
b, d) {
G("/api/v1/top/" + a + "/" + b, !1, d)
};
w.getRecommendedTags = function(a) {
G("/api/v1/recommendedTags", !0, a)
};
var E = {};
w.getBlob = function(a, b) {
var d,
j;
d = "/api/v2/blobs/" + a;
n.config.staticBaseUrl ? (j = "getBlobJsonPCallback_" + a, E[j] ? E[j].push(b) : (E[j] = [b], d = n.config.staticBaseUrl + d + "/" + j, v(d, !0, j,
function(a, b) {
var d,
f;
f = E[j];
for (d = 0; d < f.length; ++d) f[d](a, b);
delete E[j]
}))) : G(d, !0,
function(a, d) {
b(a, d)
})
};
w.setClipAsPublic = function(a, b, d) {
F("/api/v1/clips/" + a, {
isPrivate: !b
},
function(a) {
d(a)
})
};
w.setClipAnnotation =
function(a, b, d) {
F("/api/v1/clips/" + a, {
annote: b
},
function(a) {
d(a)
})
};
w.setClipTitle = function(a, b, d) {
F("/api/v1/clips/" + a, {
title: b
},
function(a) {
d(a)
})
};
w.reclip = function(a, b) {
z("/api/v1/clips/" + a, {
reclip: !0
},
function(a) {
b(a)
})
};
w.getLikes = function(a) {
C("/api/v1/likes/", a)
};
w.getLikedClips = function(a, b, d, j) { ! j && "function" == typeof d && (j = d, d = null);
d ? G("/api/v1/likes/clips?start=" + a + "&rows=" + b + "&user=" + d, !1, j) : C("/api/v1/likes/clips?start=" + a + "&rows=" + b, j)
};
w.like = function(a, b, d) {
F("/api/v1/likes/" + a, {
addOrRemove: b
},
function(a) {
d(a)
})
};
w.addOpenAction = function(a, b) {
N("/api/v1/actions/open/" + a, b)
};
w.getActions = function(a, b) {
if (!a || 0 >= a.length) b("need at least one clip id to fetch actions for");
else {
var d = "";
"string" == typeof a ? d = a: a.join && (d = a.join(","));
G("/api/v1/actions/" + d, !1,
function(a, d) {
b && b(a, d)
})
}
};
w.getHotClips = function(a, b, d, j) {
C("/api/v1/hot?start=" + a + "&rows=" + b + "&type=" + d, j)
};
w.getComments = function(a, b) {
if (!a || 0 >= a.length) b("need at least one clip id to fetch comments for");
else {
var d = "";
"string" ==
typeof a ? d = a: a.join && (d = a.join(","));
G("/api/v1/comments/" + d, !1,
function(a, d) {
b(a, d)
})
}
};
w.addComment = function(a, b, d) {
F("/api/v1/comments/" + a, {
text: b
},
function(a, b) {
d(a, b)
})
};
w.deleteComment = function(a, b, d) {
L("/api/v1/comments/" + a, {
clipId: b
},
function(a, b) {
d(a, b)
})
};
w.getCounts = function(a, b) {
C("/api/v1/users/" + a + "/counts",
function(a, d) {
b(a, d)
})
};
w.getMessage = function(a) {
G("/api/v1/message", !1,
function(b, d) {
a(b, d)
})
};
w.updateUserProfile = function(a, b) {
F("/api/v1/users/", a, b)
};
w.emailClip = function(a,
b, d) {
z("/api/v1/share/emailClip", {
clipId: a,
toEmail: b
},
d)
};
w.getFacebookFriendList = function(a) {
C("/api/v1/secure/fb/friendsList", a)
};
w.getEmailContacts = function(a) {
C("/api/v1/secure/emailContacts", a)
};
w.connectFacebookAccount = function(a, b, d, j) {
z("/api/v1/secure/fb/connect/", {
fbId: a,
fbAccessToken: b,
fetchAvatar: d
},
j)
};
w.disconnectFacebookAccount = function(a) {
L("/api/v1/secure/fb/connect/", {},
a)
};
w.disconnectFbTimeline = function(a) {
L("/api/v1/fb/timeline/", {},
a)
};
w.disconnectFbStream = function(a) {
L("/api/v1/fb/stream/",
{},
a)
};
w.connectGoogleAccount = function(a, b) {
z("/api/v1/secure/google/connect", {
code: a
},
b)
};
w.connectYahooAccount = function(a, b, d, j) {
z("/api/v1/secure/yahoo/connect", {
token: a,
tokenSecret: b,
verifier: d
},
j)
};
w.connectTwitterAccount = function(a, b, d, j) {
z("/api/v1/secure/twitter/connect", {
token: a,
tokenSecret: b,
verifier: d
},
j)
};
w.disconnectTwitterAccount = function(a) {
L("/api/v1/secure/twitter/connect/", {},
a)
};
w.getTwitterFriends = function(a) {
C("/api/v1/secure/twitter/friends", a)
};
w.getTwitterIds = function(a, b) {
z("/api/v1/secure/twitter/ids",
{
method: a
},
b)
};
w.getTwitterData = function(a, b) {
z("/api/v1/secure/twitter/data", {
ids: a
},
b)
};
w.postTweet = function(a, b) {
z("/api/v1/secure/twitter/tweet", {
tweet: a
},
b)
};
w.connectLinkedinAccount = function(a, b, d, j) {
z("/api/v1/secure/linkedin/connect", {
token: a,
tokenSecret: b,
verifier: d
},
j)
};
w.disconnectLinkedinAccount = function(a) {
L("/api/v1/secure/linkedin/connect", {},
a)
};
w.getLinkedinContacts = function(a) {
C("/api/v1/secure/linkedin/contacts", a)
};
w.sendLinkedinMessage = function(a, b, d, j) {
z("/api/v1/secure/linkedin/sendmessage",
{
msgSubject: a,
msgBody: b,
personUrl: d
},
j)
};
w.lookupUser = function(a, b) {
G("/api/v1/users/lookup?" + o(a), !1, b)
};
w.getConnections = function(a, b) {
"function" === typeof a && !b && (b = a, a = h);
C("/api/v1/connections" + (a ? "?refreshIfOlderThan=" + a: ""), b)
};
w.getAutocompleteDict = function(a) {
w.localSignGet("/api/v1/autocomplete",
function(b, d) {
a && a(b, d)
})
};
w.getNotifications = function(a) {
C("/api/v1/notifications?markRead=1", a)
};
w.getUnreadNotificationCount = function(a) {
C("/api/v1/notifications/unreadCount", a)
};
w.sendInvite =
function(a, b) {
z("/api/v1/invites/sendInvite", {
email: a
},
b)
};
w.trackInvite = function(a, b, d) {
a = {
type: a,
to: b
};
if (d) a.fbRequestId = d;
z("/api/v1/invites/trackInvite", a)
};
w.sendFeedback = function(a, b) {
z("/api/v1/feedback", {
message: a
},
function(a) {
b(a)
})
};
w.addFollow = function(a, b) {
z("/api/v1/follow", {
item: a
},
function(a) {
b(a)
})
};
w.deleteFollow = function(a, b) {
L("/api/v1/follow/" + encodeURIComponent(encodeURIComponent(a)), {},
function(a) {
b(a)
})
};
w.testFollow = function(a, b) {
C("/api/v1/follows/" + a.join(","),
function(a,
d) {
b(a, d)
})
};
w.getFollowers = function(a, b) {
G("/api/v1/followers/" + a, !0,
function(a, d) {
b(a, d)
})
};
w.getFollowing = function(a, b) {
G("/api/v1/following/" + a, !0,
function(a, d) {
b(a, d)
})
};
w.updateUserTag = function(a, b, d, j) {
F("/api/v1/users/" + a + "/tags/" + encodeURIComponent(encodeURIComponent(b)), {
description: d
},
function(a) {
j(a)
})
};
w.getUserTag = function(a, b, d) {
C("/api/v1/users/" + a + "/tags/" + encodeURIComponent(encodeURIComponent(b)),
function(a, b) {
d(a, b)
})
};
w.getSession = function(a) {
C("/api/v1/sessions",
function(b, d) {
a(b,
d)
})
};
w.setAsFrozen = function(a, b, d) {
F("/api/v1/clips/" + a, {
frozen: b
},
function(a) {
d(a)
})
};
w.requestEmailVerification = function(a, b) {
var d = "/api/v1/validateemail";
b && (d += "/" + b);
z(d, {},
function(b, d) {
a(b, d)
})
};
w.getEmailVerification = function(a) {
C("/api/v1/validateemail",
function(b, d) {
a(b, d)
})
};
w.uploadAvatar = function(a, b) {
z("/api/v1/secure/users/avatar", {
facebookId: a
},
b)
}; (function(a) {
function b(a, d, j) {
F("/api/v1/clips/" + a, {
broken: d ? !0: !1
},
function(a, b) {
j(a, b)
})
}
a.flagAsBroken = function(a, d) {
b(a, !0, d)
};
a.flagAsNotBroken = function(a, d) {
b(a, !1, d)
}
})(w);
w.flagAsInappropriate = function(a, b, d) {
F("/api/v1/clips/" + a, {
_cb_action: "flagInappropriate",
reason: b || "[none]"
},
d)
};
w.linkAmplify = function(a, b, d, j) {
N("/api/v1/amplify", {
source: d,
clipboardLogin: b,
amplifyLogin: a
},
j)
}
})(d, document, b); (function(a, b, d) {
function g(a, b) {
var j = d("<" + a + "/>");
j.applyBlockStyles && ("block" === b ? j.applyBlockStyles() : j.applyInlineStyles());
return j
}
var h = a.CLIPBOARD,
i = h.common = h.common || {};
h.autocomplete = {};
var p = null,
o = "autocomplete-me-value";
h.autocomplete.setData = function(a) {
function b(a) {
return g("li", "block").data(o, a).text(a)
}
function d(a) {
var b = i.createAvatarUrl(h.config, "s", a.login);
return function() {
return g("li", "block").addClass("autocomplete_user_314159265").data(o, "@" + a.login).append(g("img", "inline").attr({
src: b
}).showPlaceholderOnError()).append(g("div", "block").append("@" + a.login, g("span", "inline").addClass("autocomplete_userRealName_314159265").text(a.name || "")))
}
}
p = {
items: []
};
for (var j in a.tags) a.tags.hasOwnProperty(j) &&
p.items.push({
name: "#" + a.tags[j],
render: b
});
for (var D in a.users) a.users.hasOwnProperty(D) && (j = a.users[D], p.items.push({
name: "@" + ((j.login || "") + (j.name ? " " + j.name: "")),
render: d(j)
}))
};
h.autocomplete.getData = function() {
return p
};
d.fn.autocompletify = function(a) {
a = d.extend({},
{
trigger: "[#@\\w]",
maxResults: 8
},
a);
return this.autocompleteMe(function() {
return p
},
a)
}
})(d, document, b); (function(a, b, d) {
function g() {
function a() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
}
return a() + a() + "-" + a() +
"-" + a() + "-" + a() + "-" + a() + a() + a()
}
function h(a, b) {
var j = b.createElement,
j = j("div").addClass(u + "wrapper" + b.classSuffix).append(j("ul")).hide().appendTo("body").on("mouseover", "li",
function() {
d(this).addClass(u + "selected").siblings().removeClass(u + "selected")
}).on("click", "li",
function() {
r(a)
});
b.setCss(j, "position", b.fixed ? "fixed": "absolute");
return j
}
function i(a, b) {
return F[a.attr("id")][b]
}
function p(a, b, d) {
F[a.attr("id")][b] = d
}
function o(a) {
var b = a.val().substring(0, a.caret().end),
d = i(a, "options").trigger,
a = i(a, "options").matcher;
return (RegExp(d + a + "*$").exec(b) || [])[0] || ""
}
function t(b, j, C) {
function A(a) {
for (var b in G) if (G.hasOwnProperty(b) && a === G[b]) return ! 0;
return ! 1
}
var L = b.attr("id") || b.attr("name");
L || (L = u + g(), b.attr("id", L));
F[L] = {
options: C,
list: h(b, C),
data: j,
attach: C.attach || b,
query: "",
shouldHide: !0,
timeoutId: null
};
b.on("keyup." + v,
function(a) {
if (a.ctrlKey || a.altKey || !a.shiftKey) {
var f = a.which;
if (A(f)) {
if (!i(b, "list").is(":visible")) return;
a.preventDefault();
a.stopImmediatePropagation();
if (f ===
G.ESC) {
s(b);
return
}
if (f === G.ENTER || f === G.TAB) {
r(b);
s(b);
return
}
if (f === G.UP || f === G.DOWN) return
}
a.stopPropagation(); (a = o(b)) ? H(b, a) : s(b)
}
});
b.on("keydown." + v,
function(a) {
var f = a.keyCode;
if (f === G.UP || f === G.DOWN) {
var d = w(b),
a = n(b).length;
null === d ? z(b, f === G.UP ? a - 1: 0) : (f = d + (f === G.UP ? -1: 1), z(b, (f + a) % a))
}
});
b.on("keydown." + v + " keypress." + v,
function(a) {
if (i(b, "list").is(":visible") && (a.ctrlKey || a.altKey || !a.shiftKey) && A(a.which || a.keyCode)) a.preventDefault(),
a.stopImmediatePropagation()
});
b.on("blur." + v,
function() {
p(b,
"shouldHide", !0);
var d = a.setTimeout(function() {
i(b, "shouldHide") && s(b);
p(b, "shouldHide", !0)
},
250);
p(b, "timeoutId", d)
});
b.on("focus." + v,
function() {
i(b, "shouldHide") && p(b, "shouldHide", !1);
var a = o(b);
a && H(b, a)
});
d(a).on("resize." + v + L,
function() {
i(b, "list").is(":visible") && N(b)
})
}
function w(a) {
var b = i(a, "options").classSuffix,
j = null;
n(a).each(function(a, g) {
if (d(g).hasClass(u + "selected" + b)) return j = a,
!1
});
return j
}
function n(a) {
return i(a, "list").find("li")
}
function r(a) {
var b = i(a, "list"),
d,
j = i(a, "options").classSuffix,
j = n(a).filter("li." + u + "selected" + j);
d = !j.length ? i(a, "list").hasClass(u + "inverted") ? n(a).last() : n(a).first() : j;
if (b.is(":visible")) {
var g = i(a, "query"),
b = a.val(),
j = a.caret();
d = d.data(u + "value");
g = j.start - g.length;
b = b.substring(0, g) + d + " " + b.substring(j.start);
a.val(b);
b = g + d.length + 1;
a.caret(b, b);
s(a)
}
}
function z(a, b) {
var d = i(a, "list"),
j = n(a);
if (d.is(":visible") && !(0 >= j.length || b >= j.length)) d = i(a, "options").classSuffix,
j.removeClass(u + "selected" + d),
j.eq(b).addClass(u + "selected" + d)
}
function H(g, h, q) {
if (!q) q =
i(g, "options").maxResults;
var B = i(g, "data");
"function" === typeof B && (B = B(), p(g, "data", B));
if (B) if (B.filter || C(B), q = B.filter(h, q), q.length) {
var o = i(g, "list"),
B = o.find("ul"),
t = i(g, "attach"),
f = t.offset(),
t = f.top - d(b).scrollTop() + t.outerHeight() + L;
o.is(":visible") || (t >= d(a).height() ? !o.hasClass(E) && f.top - d(b).scrollTop() > L && o.addClass(E) : o.removeClass(E));
B.empty();
o = o.hasClass(E);
for (f = 0; f < q.length; f++) t = o ? q.length - 1 - f: f,
B.append(q[t].render(q[t].name));
p(g, "query", h);
N(g);
z(g, o ? q.length - 1: 0)
} else s(g)
}
function s(a) {
i(a, "list").hide()
}
function N(a) {
if (0 !== n(a).length) {
var g = i(a, "list"),
h = i(a, "attach"),
a = i(a, "options"),
q = h.offset();
a.fixed && (q.top -= d(b).scrollTop(), q.left -= d(b).scrollLeft());
var B;
g.is(":visible") ? B = g.outerHeight() : (g.css("visibility", "hidden").show(), B = g.outerHeight(), g.hide().css("visibility", "visible"));
a.setCss(g, "left", q.left);
a.setCss(g, "top", q.top + (!g.hasClass(E) ? h.outerHeight() : -B));
a.setCss(g, "width", h.outerWidth() - 2);
g.show()
}
}
function C(a) {
a.filter = function(b, d) {
for (var j =
"^" + b.split("").join("[\\w\\s]*?"), g = [], h, j = RegExp(j, "i"), f = 0, i; f < a.items.length; f++) i = a.items[f],
(h = j.exec(i.name)) && g.push({
name: i.name,
render: i.render,
length: h[0].length,
index: h.index
});
g.sort(function(a, b) {
return a.index === b.index ? a.length === b.length ? a.name === b.name ? 0: a.name < b.name ? -1: 1: a.length < b.length ? -1: 1: a.index < b.index ? -1: 1
});
return g.slice(0, d)
}
}
var G = {
TAB: 9,
ENTER: 13,
ESC: 27,
UP: 38,
DOWN: 40
},
F = {},
L = 360,
v = "autocomplete-me",
u = v + "-",
E = u + "inverted";
d.fn.autocompleteMe = function() {
var b = {
classSuffix: "",
maxResults: 10,
attach: null,
trigger: "\\w",
matcher: "\\w",
fixed: !1,
setCss: function(a, b, d) {
a.css(b, d)
},
createElement: function(a) {
return d("<" + a + "/>")
}
};
return function(j, g) {
if ("string" === typeof j) {
var h = this.attr("id"),
i = F[h];
if (!i) return this;
switch (j) {
case "destroy":
var q = i.timeoutId;
q && a.clearTimeout(q);
i.list.remove();
F[h] = null;
this.off("." + v);
d(a).off("." + v + h)
}
return this
}
g = d.extend(!0, {},
b, g);
this.filter("input,textarea").each(function() {
t(d(this), j, g)
});
return this
}
} ()
})(d, document, b); (function(a,
b) {
b.fn.showPlaceholderOnError = function(d) {
var g = a.CLIPBOARD,
h = g.common.createAvatarUrl(g.config, d);
b(this).error(function() {
b(this).attr("src") !== h && b(this).attr("src", h)
});
return this
}
})(d, b); (function(a, b) {
b.fn.placeholder = function(a, d) {
this.each(function() {
var g = b(this),
h = g.attr("placeholder");
if (h) {
g.removeAttr("placeholder");
var i = g.attr("id") || g.attr("name");
i || (i = "input_" + Math.round(1E5 * Math.random()), g.attr("id", i));
var p = g.position(),
o = a ? "cssImportant": "css",
t = b("<label/>");
a && t.applyInlineStyles();
t[o](b.extend({
position: "absolute",
left: p.left + parseInt(g.css("padding-left")) + 4,
top: p.top + parseInt(g.css("padding-top")) + 1,
"font-size": g.css("font-size"),
"font-family": g.css("font-family"),
"line-height": g.css("line-height"),
color: g.css("color")
},
d || {})).attr({
"for": i,
tabindex: -1
}).text(h);
if (b.support.opacity) t[o]("opacity", 0.5);
else t[o]("color", "#999999");
g.val() && t.hide();
t.insertAfter(g);
g.keydown(function(a) { (46 <= a.which && 90 >= a.which || 96 <= a.which && 111 >= a.which || 186 <= a.which && 222 >= a.which) &&
t.hide()
}).keyup(function() {
t["" === g.val() ? "show": "hide"]()
}).focus(function() {
"" !== g.val() && t.hide()
})
}
});
return this
}
})(d, b);
b.easing.jswing = b.easing.swing;
b.extend(b.easing, {
def: "easeOutQuad",
swing: function(a, d, g, h, i) {
return b.easing[b.easing.def](a, d, g, h, i)
},
easeInQuad: function(a, b, d, g, h) {
return g * (b /= h) * b + d
},
easeOutQuad: function(a, b, d, g, h) {
return - g * (b /= h) * (b - 2) + d
},
easeInOutQuad: function(a, b, d, g, h) {
return 1 > (b /= h / 2) ? g / 2 * b * b + d: -g / 2 * (--b * (b - 2) - 1) + d
},
easeInCubic: function(a, b, d, g, h) {
return g * (b /=
h) * b * b + d
},
easeOutCubic: function(a, b, d, g, h) {
return g * ((b = b / h - 1) * b * b + 1) + d
},
easeInOutCubic: function(a, b, d, g, h) {
return 1 > (b /= h / 2) ? g / 2 * b * b * b + d: g / 2 * ((b -= 2) * b * b + 2) + d
},
easeInQuart: function(a, b, d, g, h) {
return g * (b /= h) * b * b * b + d
},
easeOutQuart: function(a, b, d, g, h) {
return - g * ((b = b / h - 1) * b * b * b - 1) + d
},
easeInOutQuart: function(a, b, d, g, h) {
return 1 > (b /= h / 2) ? g / 2 * b * b * b * b + d: -g / 2 * ((b -= 2) * b * b * b - 2) + d
},
easeInQuint: function(a, b, d, g, h) {
return g * (b /= h) * b * b * b * b + d
},
easeOutQuint: function(a, b, d, g, h) {
return g * ((b = b / h - 1) * b * b * b * b + 1) + d
},
easeInOutQuint: function(a,
b, d, g, h) {
return 1 > (b /= h / 2) ? g / 2 * b * b * b * b * b + d: g / 2 * ((b -= 2) * b * b * b * b + 2) + d
},
easeInSine: function(a, b, d, g, h) {
return - g * Math.cos(b / h * (Math.PI / 2)) + g + d
},
easeOutSine: function(a, b, d, g, h) {
return g * Math.sin(b / h * (Math.PI / 2)) + d
},
easeInOutSine: function(a, b, d, g, h) {
return - g / 2 * (Math.cos(Math.PI * b / h) - 1) + d
},
easeInExpo: function(a, b, d, g, h) {
return 0 == b ? d: g * Math.pow(2, 10 * (b / h - 1)) + d
},
easeOutExpo: function(a, b, d, g, h) {
return b == h ? d + g: g * ( - Math.pow(2, -10 * b / h) + 1) + d
},
easeInOutExpo: function(a, b, d, g, h) {
return 0 == b ? d: b == h ? d + g: 1 > (b /= h / 2) ?
g / 2 * Math.pow(2, 10 * (b - 1)) + d: g / 2 * ( - Math.pow(2, -10 * --b) + 2) + d
},
easeInCirc: function(a, b, d, g, h) {
return - g * (Math.sqrt(1 - (b /= h) * b) - 1) + d
},
easeOutCirc: function(a, b, d, g, h) {
return g * Math.sqrt(1 - (b = b / h - 1) * b) + d
},
easeInOutCirc: function(a, b, d, g, h) {
return 1 > (b /= h / 2) ? -g / 2 * (Math.sqrt(1 - b * b) - 1) + d: g / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + d
},
easeInElastic: function(a, b, d, g, h) {
var a = 1.70158,
i = 0,
p = g;
if (0 == b) return d;
if (1 == (b /= h)) return d + g;
i || (i = 0.3 * h);
p < Math.abs(g) ? (p = g, a = i / 4) : a = i / (2 * Math.PI) * Math.asin(g / p);
return - (p * Math.pow(2, 10 *
(b -= 1)) * Math.sin((b * h - a) * 2 * Math.PI / i)) + d
},
easeOutElastic: function(a, b, d, g, h) {
var a = 1.70158,
i = 0,
p = g;
if (0 == b) return d;
if (1 == (b /= h)) return d + g;
i || (i = 0.3 * h);
p < Math.abs(g) ? (p = g, a = i / 4) : a = i / (2 * Math.PI) * Math.asin(g / p);
return p * Math.pow(2, -10 * b) * Math.sin((b * h - a) * 2 * Math.PI / i) + g + d
},
easeInOutElastic: function(a, b, d, g, h) {
var a = 1.70158,
i = 0,
p = g;
if (0 == b) return d;
if (2 == (b /= h / 2)) return d + g;
i || (i = h * 0.3 * 1.5);
p < Math.abs(g) ? (p = g, a = i / 4) : a = i / (2 * Math.PI) * Math.asin(g / p);
return 1 > b ? -0.5 * p * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * h -
a) * 2 * Math.PI / i) + d: 0.5 * p * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * h - a) * 2 * Math.PI / i) + g + d
},
easeInBack: function(a, b, d, g, h, i) {
void 0 == i && (i = 1.70158);
return g * (b /= h) * b * ((i + 1) * b - i) + d
},
easeOutBack: function(a, b, d, g, h, i) {
void 0 == i && (i = 1.70158);
return g * ((b = b / h - 1) * b * ((i + 1) * b + i) + 1) + d
},
easeInOutBack: function(a, b, d, g, h, i) {
void 0 == i && (i = 1.70158);
return 1 > (b /= h / 2) ? g / 2 * b * b * (((i *= 1.525) + 1) * b - i) + d: g / 2 * ((b -= 2) * b * (((i *= 1.525) + 1) * b + i) + 2) + d
},
easeInBounce: function(a, d, g, h, i) {
return h - b.easing.easeOutBounce(a, i - d, 0, h, i) + g
},
easeOutBounce: function(a,
b, d, g, h) {
return (b /= h) < 1 / 2.75 ? g * 7.5625 * b * b + d: b < 2 / 2.75 ? g * (7.5625 * (b -= 1.5 / 2.75) * b + 0.75) + d: b < 2.5 / 2.75 ? g * (7.5625 * (b -= 2.25 / 2.75) * b + 0.9375) + d: g * (7.5625 * (b -= 2.625 / 2.75) * b + 0.984375) + d
},
easeInOutBounce: function(a, d, g, h, i) {
return d < i / 2 ? 0.5 * b.easing.easeInBounce(a, 2 * d, 0, h, i) + g: 0.5 * b.easing.easeOutBounce(a, 2 * d - i, 0, h, i) + 0.5 * h + g
}
}); (function(a) {
function b(g) {
var j = g || d.event,
h = [].slice.call(arguments, 1),
i = 0,
p = 0,
o = 0,
g = a.event.fix(j);
g.type = "mousewheel";
j.wheelDelta && (i = j.wheelDelta / 120);
j.detail && (i = -j.detail / 3);
o = i;
void 0 !== j.axis && j.axis === j.HORIZONTAL_AXIS && (o = 0, p = -1 * i);
void 0 !== j.wheelDeltaY && (o = j.wheelDeltaY / 120);
void 0 !== j.wheelDeltaX && (p = -1 * j.wheelDeltaX / 120);
h.unshift(g, i, p, o);
return (a.event.dispatch || a.event.handle).apply(this, h)
}
var g = ["DOMMouseScroll", "mousewheel"];
if (a.event.fixHooks) for (var h = g.length; h;) a.event.fixHooks[g[--h]] = a.event.mouseHooks;
a.event.special.mousewheel = {
setup: function() {
if (this.addEventListener) for (var a = g.length; a;) this.addEventListener(g[--a], b, !1);
else this.onmousewheel =
b
},
teardown: function() {
if (this.removeEventListener) for (var a = g.length; a;) this.removeEventListener(g[--a], b, !1);
else this.onmousewheel = null
}
};
a.fn.extend({
mousewheel: function(a) {
return a ? this.bind("mousewheel", a) : this.trigger("mousewheel")
},
unmousewheel: function(a) {
return this.unbind("mousewheel", a)
}
})
})(b); (function(a, b, d, g, h, i) {
function p(a, b) {
var d = typeof a[b];
return "function" == d || !!("object" == d && a[b]) || "unknown" == d
}
function o() {
try {
var a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
J = Array.prototype.slice.call(a.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),
1);
ga = 9 < parseInt(J[0], 10) && 0 < parseInt(J[1], 10);
return ! 0
} catch(b) {
return ! 1
}
}
function t() {
if (!S) {
S = !0;
for (var a = 0; a < ta.length; a++) ta[a]();
ta.length = 0
}
}
function n(a, b) {
S ? a.call(b) : ta.push(function() {
a.call(b)
})
}
function r() {
var a = parent;
if ("" !== A) for (var b = 0, d = A.split("."); b < d.length; b++) a = a[d[b]];
return a.easyXDM
}
function z(a) {
var b = a.toLowerCase().match(m),
a = b[2],
d = b[3],
b = b[4] || "";
if ("http:" == a && ":80" == b || "https:" == a && ":443" == b) b = "";
return a + "//" + d + b
}
function H(a) {
a = a.replace($, "$1/");
if (!a.match(/^(http||https):\/\//)) {
var b =
"/" === a.substring(0, 1) ? "": d.pathname;
"/" !== b.substring(b.length - 1) && (b = b.substring(0, b.lastIndexOf("/") + 1));
a = d.protocol + "//" + d.host + b + a
}
for (; K.test(a);) a = a.replace(K, "");
return a
}
function s(a, b) {
var d = "",
f = a.indexOf("#"); - 1 !== f && (d = a.substring(f), a = a.substring(0, f));
var f = [],
g;
for (g in b) b.hasOwnProperty(g) && f.push(g + "=" + i(b[g]));
return a + (aa ? "#": -1 == a.indexOf("?") ? "?": "&") + f.join("&") + d
}
function N(a) {
return "undefined" === typeof a
}
function F(a, b, d) {
var f,
g;
for (g in b) b.hasOwnProperty(g) && (g in a ?
(f = b[g], "object" === typeof f ? F(a[g], f, d) : d || (a[g] = b[g])) : a[g] = b[g]);
return a
}
function C(a) {
if (N(ca)) {
var d = b.body.appendChild(b.createElement("form")),
g = d.appendChild(b.createElement("input"));
g.name = f + "TEST" + E;
ca = g !== d.elements[g.name];
b.body.removeChild(d)
}
ca ? d = b.createElement('<iframe name="' + a.props.name + '"/>') : (d = b.createElement("IFRAME"), d.name = a.props.name);
d.id = d.name = a.props.name;
delete a.props.name;
a.onLoad && Z(d, "load", a.onLoad);
if ("string" == typeof a.container) a.container = b.getElementById(a.container);
if (!a.container) F(d.style, {
position: "absolute",
top: "-2000px"
}),
a.container = b.body;
g = a.props.src;
delete a.props.src;
F(d, a.props);
d.border = d.frameBorder = 0;
d.allowTransparency = !0;
a.container.appendChild(d);
d.src = g;
a.props.src = g;
return d
}
function G(f) {
var g = f.protocol,
h;
f.isHost = f.isHost || N(ba.xdm_p);
aa = f.hash || !1;
if (!f.props) f.props = {};
if (f.isHost) {
if (f.remote = H(f.remote), f.channel = f.channel || "default" + E++, f.secret = Math.random().toString(16).substring(2), N(g)) z(d.href) == z(f.remote) ? g = "4": p(a, "postMessage") ||
p(b, "postMessage") ? g = "1": f.swf && p(a, "ActiveXObject") && o() ? g = "6": "Gecko" === navigator.product && "frameElement" in a && -1 == navigator.userAgent.indexOf("WebKit") ? g = "5": f.remoteHelper ? (f.remoteHelper = H(f.remoteHelper), g = "2") : g = "0"
} else {
f.channel = ba.xdm_c;
f.secret = ba.xdm_s;
f.remote = ba.xdm_e;
var g = ba.xdm_p,
i;
if (i = f.acl) {
a: {
i = f.acl;
var m = f.remote;
"string" == typeof i && (i = [i]);
for (var q, t = i.length; t--;) if (q = i[t], q = RegExp("^" == q.substr(0, 1) ? q: "^" + q.replace(/(\*)/g, ".$1").replace(/\?/g, ".") + "$"), q.test(m)) {
i = !0;
break a
}
i = !1
}
i = !i
}
if (i) throw Error("Access denied for " + f.remote);
}
f.protocol = g;
switch (g) {
case "0":
F(f, {
interval: 100,
delay: 2E3,
useResize: !0,
useParent: !1,
usePolling: !1
},
!0);
if (f.isHost) {
if (!f.local) {
g = d.protocol + "//" + d.host;
h = b.body.getElementsByTagName("img");
for (m = h.length; m--;) if (i = h[m], i.src.substring(0, g.length) === g) {
f.local = i.src;
break
}
if (!f.local) f.local = a
}
g = {
xdm_c: f.channel,
xdm_p: 0
};
f.local === a ? (f.usePolling = !0, f.useParent = !0, f.local = d.protocol + "//" + d.host + d.pathname + d.search, g.xdm_e = f.local,
g.xdm_pa = 1) : g.xdm_e = H(f.local);
if (f.container) f.useResize = !1,
g.xdm_po = 1;
f.remote = s(f.remote, g)
} else F(f, {
channel: ba.xdm_c,
remote: ba.xdm_e,
useParent: !N(ba.xdm_pa),
usePolling: !N(ba.xdm_po),
useResize: f.useParent ? !1: f.useResize
});
h = [new y.stack.HashTransport(f), new y.stack.ReliableBehavior({}), new y.stack.QueueBehavior({
encode: !0,
maxLength: 4E3 - f.remote.length
}), new y.stack.VerifyBehavior({
initiate: f.isHost
})];
break;
case "1":
h = [new y.stack.PostMessageTransport(f)];
break;
case "2":
h = [new y.stack.NameTransport(f),
new y.stack.QueueBehavior, new y.stack.VerifyBehavior({
initiate: f.isHost
})];
break;
case "3":
h = [new y.stack.NixTransport(f)];
break;
case "4":
h = [new y.stack.SameOriginTransport(f)];
break;
case "5":
h = [new y.stack.FrameElementTransport(f)];
break;
case "6":
J || o(),
h = [new y.stack.FlashTransport(f)]
}
h.push(new y.stack.QueueBehavior({
lazy: f.lazy,
remove: !0
}));
return h
}
function L(a) {
for (var b, d = {
incoming: function(a, b) {
this.up.incoming(a, b)
},
outgoing: function(a, b) {
this.down.outgoing(a, b)
},
callback: function(a) {
this.up.callback(a)
},
init: function() {
this.down.init()
},
destroy: function() {
this.down.destroy()
}
},
f = 0, g = a.length; f < g; f++) {
b = a[f];
F(b, d, !0);
if (0 !== f) b.down = a[f - 1];
if (f !== g - 1) b.up = a[f + 1]
}
return b
}
function v(a) {
a.up.down = a.down;
a.down.up = a.up;
a.up = a.down = null
}
var u = this,
E = Math.floor(1E4 * Math.random()),
M = Function.prototype,
m = /^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,
K = /[\-\w]+\/\.\.\//,
$ = /([^:])\/\//g,
A = "",
y = {},
O = a.easyXDM,
f = "easyXDM_",
ca,
aa = !1,
J,
ga,
Z,
T;
if (p(a, "addEventListener")) Z = function(a, b, d) {
a.addEventListener(b, d, !1)
},
T =
function(a, b, d) {
a.removeEventListener(b, d, !1)
};
else if (p(a, "attachEvent")) Z = function(a, b, d) {
a.attachEvent("on" + b, d)
},
T = function(a, b, d) {
a.detachEvent("on" + b, d)
};
else throw Error("Browser not supported");
var S = !1,
ta = [],
ua;
"readyState" in b ? (ua = b.readyState, S = "complete" == ua || ~navigator.userAgent.indexOf("AppleWebKit/") && ("loaded" == ua || "interactive" == ua)) : S = !!b.body;
if (!S) {
if (p(a, "addEventListener")) Z(b, "DOMContentLoaded", t);
else if (Z(b, "readystatechange",
function() {
"complete" == b.readyState && t()
}), b.documentElement.doScroll &&
a === top) {
var La = function() {
if (!S) {
try {
b.documentElement.doScroll("left")
} catch(a) {
g(La, 1);
return
}
t()
}
};
La()
}
Z(a, "load", t)
}
var ba = function(a) {
for (var a = a.substring(1).split("&"), b = {},
d, f = a.length; f--;) d = a[f].split("="),
b[d[0]] = h(d[1]);
return b
} (/xdm_e=/.test(d.search) ? d.search: d.hash),
oa = function() {
var a = {},
b = {
a: [1, 2, 3]
};
if ("undefined" != typeof JSON && "function" === typeof JSON.stringify && '{"a":[1,2,3]}' === JSON.stringify(b).replace(/\s/g, "")) return JSON;
if (Object.toJSON && '{"a":[1,2,3]}' === Object.toJSON(b).replace(/\s/g,
"")) a.stringify = Object.toJSON;
if ("function" === typeof String.prototype.evalJSON && (b = '{"a":[1,2,3]}'.evalJSON(), b.a && 3 === b.a.length && 3 === b.a[2])) a.parse = function(a) {
return a.evalJSON()
};
return a.stringify && a.parse ? (oa = function() {
return a
},
a) : null
};
F(y, {
version: "2.4.15.118",
query: ba,
stack: {},
apply: F,
getJSONObject: oa,
whenReady: n,
noConflict: function(b) {
a.easyXDM = O; (A = b) && (f = "easyXDM_" + A.replace(".", "_") + "_");
return y
}
});
y.DomHelper = {
on: Z,
un: T,
requiresJSON: function(d) {
"object" == typeof a.JSON && a.JSON || b.write('<script type="text/javascript" src="' +
d + '"><\/script>')
}
}; (function() {
var a = {};
y.Fn = {
set: function(b, d) {
a[b] = d
},
get: function(b, d) {
var f = a[b];
d && delete a[b];
return f
}
}
})();
y.Socket = function(a) {
var b = L(G(a).concat([{
incoming: function(b, d) {
a.onMessage(b, d)
},
callback: function(b) {
if (a.onReady) a.onReady(b)
}
}])),
d = z(a.remote);
this.origin = z(a.remote);
this.destroy = function() {
b.destroy()
};
this.postMessage = function(a) {
b.outgoing(a, d)
};
b.init()
};
y.Rpc = function(a, b) {
if (b.local) for (var d in b.local) if (b.local.hasOwnProperty(d)) {
var f = b.local[d];
"function" ===
typeof f && (b.local[d] = {
method: f
})
}
var g = L(G(a).concat([new y.stack.RpcBehavior(this, b), {
callback: function(b) {
if (a.onReady) a.onReady(b)
}
}]));
this.origin = z(a.remote);
this.destroy = function() {
g.destroy()
};
g.init()
};
y.stack.SameOriginTransport = function(a) {
var b,
j,
h,
i;
return b = {
outgoing: function(a, b, d) {
h(a);
d && d()
},
destroy: function() {
j && (j.parentNode.removeChild(j), j = null)
},
onDOMReady: function() {
i = z(a.remote);
a.isHost ? (F(a.props, {
src: s(a.remote, {
xdm_e: d.protocol + "//" + d.host + d.pathname,
xdm_c: a.channel,
xdm_p: 4
}),
name: f + a.channel + "_provider"
}), j = C(a), y.Fn.set(a.channel,
function(a) {
h = a;
g(function() {
b.up.callback(!0)
},
0);
return function(a) {
b.up.incoming(a, i)
}
})) : (h = r().Fn.get(a.channel, !0)(function(a) {
b.up.incoming(a, i)
}), g(function() {
b.up.callback(!0)
},
0))
},
init: function() {
n(b.onDOMReady, b)
}
}
};
y.stack.FlashTransport = function(a) {
function h(a) {
g(function() {
p.up.incoming(a, t)
},
0)
}
function i(d) {
var f = a.swf + "?host=" + a.isHost,
g = "easyXDM_swf_" + Math.floor(1E4 * Math.random());
y.Fn.set("flash_loaded" + d.replace(/[\-.]/g,
"_"),
function() {
y.stack.FlashTransport[d].swf = r = G.firstChild;
for (var a = y.stack.FlashTransport[d].queue, b = 0; b < a.length; b++) a[b]();
a.length = 0
});
a.swfContainer ? G = "string" == typeof a.swfContainer ? b.getElementById(a.swfContainer) : a.swfContainer: (G = b.createElement("div"), F(G.style, ga && a.swfNoThrottle ? {
height: "20px",
width: "20px",
position: "fixed",
right: 0,
top: 0
}: {
height: "1px",
width: "1px",
position: "absolute",
overflow: "hidden",
right: 0,
top: 0
}), b.body.appendChild(G));
var h = "callback=flash_loaded" + d.replace(/[\-.]/g,
"_") + "&proto=" + u.location.protocol + "&domain=" + u.location.href.match(m)[3] + "&port=" + (u.location.href.match(m)[4] || "") + "&ns=" + A;
G.innerHTML = "<object height='20' width='20' type='application/x-shockwave-flash' id='" + g + "' data='" + f + "'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='" + f + "'></param><param name='flashvars' value='" + h + "'></param><embed type='application/x-shockwave-flash' FlashVars='" + h + "' allowScriptAccess='always' wmode='transparent' src='" +
f + "' height='1' width='1'></embed></object>"
}
var p,
o,
t,
r,
G;
return p = {
outgoing: function(b, d, f) {
r.postMessage(a.channel, b.toString());
f && f()
},
destroy: function() {
try {
r.destroyChannel(a.channel)
} catch(b) {}
r = null;
o && (o.parentNode.removeChild(o), o = null)
},
onDOMReady: function() {
t = a.remote;
y.Fn.set("flash_" + a.channel + "_init",
function() {
g(function() {
p.up.callback(!0)
})
});
y.Fn.set("flash_" + a.channel + "_onMessage", h);
a.swf = H(a.swf);
var b = a.swf.match(m)[3],
j = function() {
y.stack.FlashTransport[b].init = !0;
r = y.stack.FlashTransport[b].swf;
r.createChannel(a.channel, a.secret, z(a.remote), a.isHost);
a.isHost && (ga && a.swfNoThrottle && F(a.props, {
position: "fixed",
right: 0,
top: 0,
height: "20px",
width: "20px"
}), F(a.props, {
src: s(a.remote, {
xdm_e: z(d.href),
xdm_c: a.channel,
xdm_p: 6,
xdm_s: a.secret
}),
name: f + a.channel + "_provider"
}), o = C(a))
};
y.stack.FlashTransport[b] && y.stack.FlashTransport[b].init ? j() : y.stack.FlashTransport[b] ? y.stack.FlashTransport[b].queue.push(j) : (y.stack.FlashTransport[b] = {
queue: [j]
},
i(b))
},
init: function() {
n(p.onDOMReady, p)
}
}
};
y.stack.PostMessageTransport =
function(b) {
function j(a) {
var f;
if (a.origin) f = z(a.origin);
else if (a.uri) f = z(a.uri);
else if (a.domain) f = d.protocol + "//" + a.domain;
else throw "Unable to retrieve the origin of the event";
f == p && a.data.substring(0, b.channel.length + 1) == b.channel + " " && h.up.incoming(a.data.substring(b.channel.length + 1), f)
}
var h,
i,
m,
p;
return h = {
outgoing: function(a, d, f) {
m.postMessage(b.channel + " " + a, d || p);
f && f()
},
destroy: function() {
T(a, "message", j);
i && (m = null, i.parentNode.removeChild(i), i = null)
},
onDOMReady: function() {
p = z(b.remote);
if (b.isHost) {
var o = function(d) {
d.data == b.channel + "-ready" && (m = "postMessage" in i.contentWindow ? i.contentWindow: i.contentWindow.document, T(a, "message", o), Z(a, "message", j), g(function() {
h.up.callback(!0)
},
0))
};
Z(a, "message", o);
F(b.props, {
src: s(b.remote, {
xdm_e: z(d.href),
xdm_c: b.channel,
xdm_p: 1
}),
name: f + b.channel + "_provider"
});
i = C(b)
} else Z(a, "message", j),
m = "postMessage" in a.parent ? a.parent: a.parent.document,
m.postMessage(b.channel + "-ready", p),
g(function() {
h.up.callback(!0)
},
0)
},
init: function() {
n(h.onDOMReady,
h)
}
}
};
y.stack.FrameElementTransport = function(h) {
var i,
m,
p,
o;
return i = {
outgoing: function(a, b, d) {
p.call(this, a);
d && d()
},
destroy: function() {
m && (m.parentNode.removeChild(m), m = null)
},
onDOMReady: function() {
o = z(h.remote);
if (h.isHost) F(h.props, {
src: s(h.remote, {
xdm_e: z(d.href),
xdm_c: h.channel,
xdm_p: 5
}),
name: f + h.channel + "_provider"
}),
m = C(h),
m.fn = function(a) {
delete m.fn;
p = a;
g(function() {
i.up.callback(!0)
},
0);
return function(a) {
i.up.incoming(a, o)
}
};
else {
if (b.referrer && z(b.referrer) != ba.xdm_e) a.top.location = ba.xdm_e;
p = a.frameElement.fn(function(a) {
i.up.incoming(a, o)
});
i.up.callback(!0)
}
},
init: function() {
n(i.onDOMReady, i)
}
}
};
y.stack.NameTransport = function(a) {
function b(d) {
p.contentWindow.sendMessage(d, a.remoteHelper + (m ? "#_3": "#_2") + a.channel)
}
function d() {
m ? (2 === ++t || !m) && i.up.callback(!0) : (b("ready"), i.up.callback(!0))
}
function j(a) {
i.up.incoming(a, G)
}
function h() {
r && g(function() {
r(!0)
},
0)
}
var i,
m,
p,
o,
t,
r,
G,
N;
return i = {
outgoing: function(a, d, f) {
r = f;
b(a)
},
destroy: function() {
p.parentNode.removeChild(p);
p = null;
m &&
(o.parentNode.removeChild(o), o = null)
},
onDOMReady: function() {
m = a.isHost;
t = 0;
G = z(a.remote);
a.local = H(a.local);
m ? (y.Fn.set(a.channel,
function(b) {
m && "ready" === b && (y.Fn.set(a.channel, j), d())
}), N = s(a.remote, {
xdm_e: a.local,
xdm_c: a.channel,
xdm_p: 2
}), F(a.props, {
src: N + "#" + a.channel,
name: f + a.channel + "_provider"
}), o = C(a)) : (a.remoteHelper = a.remote, y.Fn.set(a.channel, j));
p = C({
props: {
src: a.local + "#_4" + a.channel
},
onLoad: function Ea() {
var b = p || this;
T(b, "load", Ea);
y.Fn.set(a.channel + "_load", h); (function wa() {
"function" ==
typeof b.contentWindow.sendMessage ? d() : g(wa, 50)
})()
}
})
},
init: function() {
n(i.onDOMReady, i)
}
}
};
y.stack.HashTransport = function(b) {
function d() {
if (t) {
var a = t.location.href,
b = "",
f = a.indexOf("#"); - 1 != f && (b = a.substring(f));
b && b != p && (p = b, j.up.incoming(p.substring(p.indexOf("_") + 1), H))
}
}
var j,
h,
i,
m,
p,
o,
t,
r,
G,
H;
return j = {
outgoing: function(a) {
if (r) a = b.remote + "#" + o+++"_" + a,
(h || !G ? r.contentWindow: r).location = a
},
destroy: function() {
a.clearInterval(i); (h || !G) && r.parentNode.removeChild(r);
r = null
},
onDOMReady: function() {
h =
b.isHost;
m = b.interval;
p = "#" + b.channel;
o = 0;
G = b.useParent;
H = z(b.remote);
if (h) {
b.props = {
src: b.remote,
name: f + b.channel + "_provider"
};
if (G) b.onLoad = function() {
t = a;
i = setInterval(d, m);
j.up.callback(!0)
};
else {
var n = 0,
w = b.delay / 50; (function Aa() {
if (++n > w) throw Error("Unable to reference listenerwindow");
try {
t = r.contentWindow.frames[f + b.channel + "_consumer"]
} catch(a) {}
t ? (i = setInterval(d, m), j.up.callback(!0)) : g(Aa, 50)
})()
}
r = C(b)
} else t = a,
i = setInterval(d, m),
G ? (r = parent, j.up.callback(!0)) : (F(b, {
props: {
src: b.remote +
"#" + b.channel + new Date,
name: f + b.channel + "_consumer"
},
onLoad: function() {
j.up.callback(!0)
}
}), r = C(b))
},
init: function() {
n(j.onDOMReady, j)
}
}
};
y.stack.ReliableBehavior = function() {
var a,
b,
d = 0,
f = 0,
g = "";
return a = {
incoming: function(j, h) {
var i = j.indexOf("_"),
m = j.substring(0, i).split(","),
j = j.substring(i + 1);
m[0] == d && (g = "", b && b(!0));
0 < j.length && (a.down.outgoing(m[1] + "," + d + "_" + g, h), f != m[1] && (f = m[1], a.up.incoming(j, h)))
},
outgoing: function(j, h, i) {
g = j;
b = i;
a.down.outgoing(f + "," + ++d + "_" + j, h)
}
}
};
y.stack.QueueBehavior =
function(a) {
function b() {
if (a.remove && 0 === f.length) v(d);
else if (!j && !(0 === f.length || p)) {
j = !0;
var h = f.shift();
d.down.outgoing(h.data, h.origin,
function(a) {
j = !1;
h.callback && g(function() {
h.callback(a)
},
0);
b()
})
}
}
var d,
f = [],
j = !0,
m = "",
p,
o = 0,
t = !1,
C = !1;
return d = {
init: function() {
N(a) && (a = {});
if (a.maxLength) o = a.maxLength,
C = !0;
a.lazy ? t = !0: d.down.init()
},
callback: function(a) {
j = !1;
var f = d.up;
b();
f.callback(a)
},
incoming: function(b, f) {
if (C) {
var g = b.indexOf("_"),
j = parseInt(b.substring(0, g), 10);
m += b.substring(g + 1);
0 === j && (a.encode && (m = h(m)), d.up.incoming(m, f), m = "")
} else d.up.incoming(b, f)
},
outgoing: function(g, j, h) {
a.encode && (g = i(g));
var m = [],
p;
if (C) {
for (; 0 !== g.length;) p = g.substring(0, o),
g = g.substring(p.length),
m.push(p);
for (; p = m.shift();) f.push({
data: m.length + "_" + p,
origin: j,
callback: 0 === m.length ? h: null
})
} else f.push({
data: g,
origin: j,
callback: h
});
t ? d.down.init() : b()
},
destroy: function() {
p = !0;
d.down.destroy()
}
}
};
y.stack.VerifyBehavior = function(a) {
function b() {
f = Math.random().toString(16).substring(2);
d.down.outgoing(f)
}
var d,
f,
g;
return d = {
incoming: function(j, h) {
var i = j.indexOf("_"); - 1 === i ? j === f ? d.up.callback(!0) : g || (g = j, a.initiate || b(), d.down.outgoing(j)) : j.substring(0, i) === g && d.up.incoming(j.substring(i + 1), h)
},
outgoing: function(a, b, g) {
d.down.outgoing(f + "_" + a, b, g)
},
callback: function() {
a.initiate && b()
}
}
};
y.stack.RpcBehavior = function(a, b) {
function d(a) {
a.jsonrpc = "2.0";
j.down.outgoing(h.stringify(a))
}
function f(a, b) {
var g = Array.prototype.slice;
return function() {
var f = arguments.length,
j,
h = {
method: b
};
0 < f && "function" ===
typeof arguments[f - 1] ? (1 < f && "function" === typeof arguments[f - 2] ? (j = {
success: arguments[f - 2],
error: arguments[f - 1]
},
h.params = g.call(arguments, 0, f - 2)) : (j = {
success: arguments[f - 1]
},
h.params = g.call(arguments, 0, f - 1)), m["" + ++i] = j, h.id = i) : h.params = g.call(arguments, 0);
if (a.namedParams && 1 === h.params.length) h.params = h.params[0];
d(h)
}
}
function g(a, b, f, j) {
if (f) {
var h,
i;
b ? (h = function(a) {
h = M;
d({
id: b,
result: a
})
},
i = function(a, f) {
i = M;
var g = {
id: b,
error: {
code: -32099,
message: a
}
};
if (f) g.error.data = f;
d(g)
}) : h = i = M;
"[object Array]" ===
Object.prototype.toString.call(j) || (j = [j]);
try {
var l = f.method.apply(f.scope, j.concat([h, i]));
N(l) || h(l)
} catch(m) {
i(m.message)
}
} else b && d({
id: b,
error: {
code: -32601,
message: "Procedure not found."
}
})
}
var j,
h = b.serializer || oa(),
i = 0,
m = {};
return j = {
incoming: function(a) {
a = h.parse(a);
if (a.method) b.handle ? b.handle(a, d) : g(a.method, a.id, b.local[a.method], a.params);
else {
var f = m[a.id];
a.error ? f.error && f.error(a.error) : f.success && f.success(a.result);
delete m[a.id]
}
},
init: function() {
if (b.remote) for (var d in b.remote) b.remote.hasOwnProperty(d) &&
(a[d] = f(b.remote[d], d));
j.down.init()
},
destroy: function() {
for (var d in b.remote) b.remote.hasOwnProperty(d) && a.hasOwnProperty(d) && delete a[d];
j.down.destroy()
}
}
};
u.easyXDM = y
})(d, document, location, d.setTimeout, decodeURIComponent, encodeURIComponent); (function(a, b, d, g) {
a.fn.caret = function(h, i) {
var p,
o,
t = this[0],
n = a.browser.msie;
if ("object" === typeof h && "number" === typeof h.start && "number" === typeof h.end) p = h.start,
o = h.end;
else if ("number" === typeof h && "number" === typeof i) p = h,
o = i;
else if ("string" === typeof h) - 1 <
(p = t.value.indexOf(h)) ? o = p + h[b] : p = null;
else if ("[object RegExp]" === Object.prototype.toString.call(h)) {
var r = h.exec(t.value);
if (null != r) p = r.index,
o = p + r[0][b]
}
if ("undefined" != typeof p) return n ? (n = this[0].createTextRange(), n.collapse(!0), n.moveStart("character", p), n.moveEnd("character", o - p), n.select()) : (this[0].selectionStart = p, this[0].selectionEnd = o),
this[0].focus(),
this;
if (n) {
o = document.selection;
var z,
H;
"textarea" != this[0].tagName.toLowerCase() ? (n = this.val(), p = o[d]()[g](), p.moveEnd("character", n[b]),
z = "" == p.text ? n[b] : n.lastIndexOf(p.text), p = o[d]()[g](), p.moveStart("character", -n[b]), H = p.text[b]) : (p = o[d](), o = p[g](), o.moveToElementText(this[0]), o.setEndPoint("EndToEnd", p), z = o.text[b] - p.text[b], H = z + p.text[b])
} else z = t.selectionStart,
H = t.selectionEnd;
p = t.value.substring(z, H);
return {
start: z,
end: H,
text: p,
replace: function(a) {
return t.value.substring(0, z) + a + t.value.substring(H, t.value[b])
}
}
}
})(b, "length", "createRange", "duplicate"); (function(a, b) {
a.fn.allParents = function() {
if (!this.length) return a([]);
for (var d = a(this[0]), g = d.parents(), d = d[0].ownerDocument; d !== b;) d = (d.parentWindow || d.defaultView).frameElement,
g.push(d),
Array.prototype.push.apply(g, a(d).parents().toArray()),
d = d.ownerDocument;
return g
}
})(b, document); (function(a, b) {
a.fn.bgPosition = function() {
return b.defaultView && b.defaultView.getComputedStyle ? this.css("background-position") : !this[0] || !this[0].currentStyle ? "0 0": this[0].currentStyle.backgroundPositionX + " " + this[0].currentStyle.backgroundPositionY
}
})(b, document); (function(a, b) {
function d(a,
b, g) {
for (var j = a.constructor, g = {
notImportant: !g
},
h = 0; h < a.length; h++) for (var i in b) b.hasOwnProperty(i) && j.style(a[h], i, b[i], g)
}
b.reset = {
shared: {
"background-image": "none",
"background-origin": "padding-box",
"background-size": "auto",
"border-spacing": "0",
border: "0 solid black",
"border-image": "none",
bottom: "auto",
clear: "none",
color: "#CFCFCF",
content: "normal",
crop: "auto",
cursor: "auto",
direction: "ltr",
"float": "none",
"font-family": '"Lucida Grande", Arial, sans-serif',
"font-size": "13px",
"font-size-adjust": "none",
"font-stretch": "normal",
"font-style": "normal",
"font-variant": "normal",
"font-weight": "normal",
height: "auto",
left: "auto",
"letter-spacing": "normal",
"line-break": "auto",
"line-height": "normal",
"margin-bottom": "0",
"margin-left": "0",
"margin-right": "0",
"margin-top": "0",
"max-height": "none",
"max-width": "none",
"min-height": "none",
"min-width": "none",
"outline-color": "invert",
"outline-style": "none",
"outline-width": "medium",
"overflow-wrap": "normal",
"padding-bottom": "0",
"padding-left": "0",
"padding-right": "0",
"padding-top": "0",
position: "static",
quotes: "none",
right: "auto",
"text-autospace": "none",
"text-decoration": "none",
"text-outline": "none",
"text-overflow": "clip",
"text-shadow": "none",
"text-transform": "none",
"text-wrap": "none",
top: "auto",
"unicode-bidi": "normal",
visibility: "visible",
"white-space": "normal",
width: "auto",
"word-break": "normal",
"word-spacing": "normal",
"z-index": "auto"
},
block: {
display: "block",
overflow: "visible",
"overflow-clip": "auto",
"overflow-style": "auto",
"overflow-x": "visible",
"overflow-y": "visible",
"text-align": "left",
"text-indent": "0",
widows: "2"
},
inline: {
display: "inline",
"vertical-align": "baseline"
},
table: {
"border-collapse": "separate",
"table-layout": "auto",
display: "table"
},
tableCell: {
"empty-cells": "show",
"vertical-align": "baseline",
display: "table-cell"
},
tableRow: {
display: "table-row"
},
list: {
"list-style-image": "none",
"list-style-position": "outside",
"list-style-type": "disc"
},
link: {
cursor: "pointer"
},
listItem: {
display: "list-item"
},
textInput: {
cursor: "text"
}
};
var g = ["moz", "webkit", "o", "ms"],
h = {
"border-top-left-radius": 0,
"border-top-right-radius": 0,
"border-bottom-left-radius": 0,
"border-bottom-right-radius": 0,
"box-shadow": "none"
},
i;
for (i in h) {
b.reset[i] = h[i];
for (var p = 0; p < g.length; p++) h.hasOwnProperty(i) && (b.reset["-" + g[p] + "-" + i] = h[i])
}
if (b.support.opacity) b.reset.opacity = "1",
b.reset["background-color"] = "transparent",
b.reset["background-attachment"] = "scroll",
b.reset["background-position"] = "0 0",
b.reset["background-image"] = "none",
b.reset["background-repeat"] = "repeat";
b.fn.applyBlockStyles = function() {
var a = b.extend({},
b.reset.shared, b.reset.block);
d(this, a, !1);
return this
};
b.fn.applyInlineStyles = function() {
var a = b.extend({},
b.reset.shared, b.reset.inline);
d(this, a, !1);
return this
};
b.fn.applyTableStyles = function() {
this.applyBlockStyles();
d(this, b.reset.table, !1);
return this
};
b.fn.applyTableCellStyles = function() {
this.applyBlockStyles();
d(this, b.reset.tableCell, !1);
return this
};
b.fn.applyTableRowStyles = function() {
this.applyBlockStyles();
d(this, b.reset.tableRow, !1);
return this
};
b.fn.applyListStyles = function() {
this.applyBlockStyles();
d(this, b.reset.list, !1);
return this
};
b.fn.applyLinkStyles = function() {
this.applyInlineStyles();
d(this, b.reset.link, !1);
return this
};
b.fn.applyListItemStyles = function() {
this.applyBlockStyles();
d(this, b.reset.listItem, !1);
return this
};
b.fn.applyTextInputStyles = function() {
this.applyInlineStyles();
d(this, b.reset.textInput, !1);
return this
};
b.fn.cssImportant = function(a, b) {
return this.css(a, b, !0)
}
})(d, b); (function(a, b) {
b.htmlEncode = function(a) {
return b("<div/>").text(a || "").html()
};
b.htmlDecode = function(a) {
return b("<div/>").html(a ||
"").text()
}
})(d, b); (function(a) {
a.fn.trueCoordinates = function(a) {
if (!a) return {
left: parseFloat(this.attr("clipboard_left")),
top: parseFloat(this.attr("clipboard_top"))
};
this.attr("clipboard_left", a.left).attr("clipboard_top", a.top);
return this
};
a.fn.removeTrueCoordinates = function() {
return this.removeAttr("clipboard_left").removeAttr("clipboard_top")
}
})(b); (function(a, b) {
a.fn.trueOffset = function() {
for (var d = this.offset(), g = this[0].ownerDocument; g !== b;) {
var g = (g.parentWindow || g.defaultView).frameElement,
h = a(g).offset();
d.left += h.left;
d.top += h.top;
g = g.ownerDocument
}
return d
}
})(b, document); (function() {
function a(b) {
return 10 > b ? "0" + b: b
}
function b(a) {
i.lastIndex = 0;
return i.test(a) ? '"' + a.replace(i,
function(a) {
var b = t[a];
return "string" === typeof b ? b: "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice( - 4)
}) + '"': '"' + a + '"'
}
function g(a, d) {
var h,
i,
t,
q,
r = p,
C,
z = d[a];
z && "object" === typeof z && "function" === typeof z.toJSON && (z = z.toJSON(a));
"function" === typeof n && (z = n.call(d, a, z));
switch (typeof z) {
case "string":
return b(z);
case "number":
return isFinite(z) ? "" + z: "null";
case "boolean":
case "null":
return "" + z;
case "object":
if (!z) return "null";
p += o;
C = [];
if ("[object Array]" === Object.prototype.toString.apply(z)) {
q = z.length;
for (h = 0; h < q; h += 1) C[h] = g(h, z) || "null";
t = 0 === C.length ? "[]": p ? "[\n" + p + C.join(",\n" + p) + "\n" + r + "]": "[" + C.join(",") + "]";
p = r;
return t
}
if (n && "object" === typeof n) {
q = n.length;
for (h = 0; h < q; h += 1) i = n[h],
"string" === typeof i && (t = g(i, z)) && C.push(b(i) + (p ? ": ": ":") + t)
} else for (i in z) Object.hasOwnProperty.call(z, i) && (t = g(i,
z)) && C.push(b(i) + (p ? ": ": ":") + t);
t = 0 === C.length ? "{}": p ? "{\n" + p + C.join(",\n" + p) + "\n" + r + "}": "{" + C.join(",") + "}";
p = r;
return t
}
}
if ("function" !== typeof Date.prototype.toJSON) Date.prototype.toJSON = function() {
return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + a(this.getUTCMonth() + 1) + "-" + a(this.getUTCDate()) + "T" + a(this.getUTCHours()) + ":" + a(this.getUTCMinutes()) + ":" + a(this.getUTCSeconds()) + "Z": null
},
String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
return this.valueOf()
};
var h = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
i = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
p,
o,
t = {
"\u0008": "\\b",
"\t": "\\t",
"\n": "\\n",
"\u000c": "\\f",
"\r": "\\r",
'"': '\\"',
"\\": "\\\\"
},
n;
if ("function" !== typeof d.CLIPBOARD.JSON.stringify) d.CLIPBOARD.JSON.stringify = function(a, b, d) {
var j;
o = p = "";
if ("number" === typeof d) for (j = 0; j < d; j += 1) o += " ";
else "string" ===
typeof d && (o = d);
if ((n = b) && "function" !== typeof b && ("object" !== typeof b || "number" !== typeof b.length)) throw Error("JSON.stringify");
return g("", {
"": a
})
};
if ("function" !== typeof d.CLIPBOARD.JSON.parse) d.CLIPBOARD.JSON.parse = function(a, b) {
function d(a, g) {
var j,
h,
i = a[g];
if (i && "object" === typeof i) for (j in i) Object.hasOwnProperty.call(i, j) && (h = d(i, j), void 0 !== h ? i[j] = h: delete i[j]);
return b.call(a, g, i)
}
var g,
a = "" + a;
h.lastIndex = 0;
h.test(a) && (a = a.replace(h,
function(a) {
return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice( - 4)
}));
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 g = eval("(" + a + ")"),
"function" === typeof b ? d({
"": g
},
"") : g;
throw new SyntaxError("JSON.parse");
}
})()
})();
this.xdm = a.xdm = d.easyXDM;
if (this.domain !== d.location.host) this.xdm = this.xdm.noConflict(M.util.idSuffix);
this.$("head").append(this.$("<link/>").attr({
type: "text/css",
rel: "stylesheet",
href: this.staticBaseUrl +
"/css/1.0.17/clipper.css"
}));
this.trigger("initialized");
return ! 0
}
function o(h, p) {
p = M.util.merge(M.util.merge({},
ca), p);
this.scope = h || d.document.documentElement;
this.document = this.scope.ownerDocument;
this.documentId = T(this.document);
this.preferences = {};
this.allowedMetrics = p.allowedMetrics;
this.baseUri = d.location.protocol + "//" + d.CLIPBOARD.config.baseUrl + "/";
this.staticBaseUrl = d.CLIPBOARD.config.staticBaseUrl;
this.domain = d.CLIPBOARD.config.baseUrl;
this.instanceId = p.instanceId;
this.origin = p.origin ||
"default";
this.bookmarkletVersion = p.bookmarkletVersion;
if (0 > this.documentId) L.push(this.document),
this.documentId = L.length - 1;
this.user = {
guid: "",
sessionId: ""
};
var n;
if (n = /^(https?):\/\/www\.clipboard\.com\//.exec(this.baseUri)) this.baseUri = n[1] + "://clipboard.com/";
if (!/^http/.test(this.staticBaseUrl)) this.staticBaseUrl = d.location.protocol + this.staticBaseUrl;
H[this.documentId] || (H[this.documentId] = {
env: {
iHatePrototype: g(this.document)
},
baseData: {},
$: null,
bodyOffset: {}
});
this.$ = H[this.documentId].$;
this.env = H[this.documentId].env;
this.baseData = H[this.documentId].baseData;
this.support = i;
this.defaultTitle = M.util.trim(this.document.title) || this.document.location.href;
N.call(this);
if (!this.support) this.support = i = {
rgba: t(this.$),
dpi: z(this.$),
regexSplit: 3 === "x y".split(/(\s)/).length
};
n = {
$: this.$,
xdm: this.xdm,
document: this.document,
baseUri: this.baseUri,
baseData: this.baseData,
bodyOffset: this.bodyOffset,
support: this.support,
preferences: this.preferences,
staticBaseUrl: this.staticBaseUrl,
domain: this.domain
};
this.ui = p.createUiThunk(n);
this.dao = new M.DataAccess(this.baseUri, this.$.ajax, this.xdm);
this.controls = [this.ui];
this.selectors = p.populateSelectorsThunk(n);
this.extractors = {};
for (var r in this.selectors) this.selectors.hasOwnProperty(r) && (this.extractors[r] = this.selectors[r].getExtractor());
if (M.extractors.BookmarkExtractor) this.extractors.bookmark = new M.extractors.BookmarkExtractor(n);
y.call(this);
this.on("activated",
function() {
this.activeSelector ? a.call(this, this.activeSelector.type, !0) : this.dao.fetchUserData()
});
this.env.iHatePrototype.stupidFuckingPrototype && b.call(this, "info", {
data: "badPrototypeVersion"
});
o.instances[this.origin] || (o.instances[this.origin] = {});
o.instances[this.origin][this.instanceId] = this;
"function" === typeof p.debug && p.debug(this)
}
i = void 0;
var H = {},
L = [],
M = d.CLIPBOARD.client,
$ = "rectangle",
ca = {
populateSelectorsThunk: function(a) {
return {
text: new M.selectors.TextSelector(a),
rectangle: new M.selectors.RectangleSelector(a)
}
},
createUiThunk: function(a) {
return new M.ui.WidgetUiController(a)
},
allowedMetrics: null
};
o.instances = {};
o.checkedLoginStatus = !1;
M.util.inherit(o, new M.ActivatableControl, new M.EventEmitter);
o.prototype.constructor = o;
o.prototype.createClip = function() {
var a = {
source: d.location.href,
date: (new Date).toString(),
type: "clip",
version: "0.1",
title: "",
html: "",
text: "",
annotation: "",
width: 0,
height: 0,
top: null,
left: null,
"private": !0
};
return function(b) {
return M.util.merge(M.util.merge({},
M.util.merge(a, {
title: this.defaultTitle
})), b)
}
} ();
o.prototype.shouldLogMetric = function(a) {
return ! this.allowedMetrics ||
this.allowedMetrics[a]
};
o.prototype.setActiveSelectorByContext = function() {
for (var a in this.selectors) if (this.selectors.hasOwnProperty(a) && this.selectors[a].shouldUseAsDefault()) {
this.setActiveSelector(a);
break
}
};
o.prototype.setActiveSelector = function(a) {
if (this.selectors[a] && this.activeSelector !== this.selectors[a]) this.activeSelector && (this.activeSelector.deactivate(), this.removeControl(this.activeSelector)),
this.activeSelector = this.selectors[a],
this.controls.push(this.activeSelector)
};
o.prototype.doActivate =
function() {
var a = !0;
return function() {
a ? a = !1: this.trigger("reloaded")
}
} ();
M.Clipper = o
})(window); (function(d) {
function i() {}
i.prototype = {
extract: function() {
return ""
}
};
d.CLIPBOARD.client.Extractor = i
})(window);
(function(d) {
function i() {}
i.prototype = {
select: function() {},
getSelection: function() {
return {
startElement: null,
endElement: null
}
},
disableGlobalEvents: function() {},
enableGlobalEvents: function() {},
shouldUseAsDefault: function() {
return ! 1
},
getExtractor: function() {
return null
},
setPreferences: function() {}
};
i.failureStatus = {
nowhereToZoom: "nowhereToZoom",
maxSizeExceededViaZoom: "maxSizeExceededViaZoom",
maxSizeExceededViaDrag: "maxSizeExceededViaDrag"
};
d.CLIPBOARD.client.Selector = i
})(window);
(function(d) {
function i(a) {
a.props = {};
a.props[b.util.doNotClipAllAttributeName] = !0;
return new this.xdm.Socket(a)
}
function g(a, b, d) {
this.baseUri = a;
this.sendAjaxRequest = b;
this.promises = [];
this.xdm = d
}
var b = d.CLIPBOARD.client,
a = {
crossDomainPostFailed: "crossDomainPostFailedForPromise",
emptyResponse: "emptyResponseFromPromise",
retryCount: "maxedOutPromiseRetryCount",
serverSideSave: "failedToSaveClipOrBlob",
promiseUnavailable: "promiseUnavailable",
timeout: "savingClipTimedOut",
malformedResponse: "malformedJsonInClipSaveResponse",
invalidResponse: "invalidResponseSavingClip",
expiredRequest: "expiredRequest",
expiredSession: "expiredSession",
unauthorized: "unauthorized",
badRequest: "badRequest",
emptyResult: "emptyResultSavingClip",
unknown: "unknown"
};
g.promiseResult = {
processing: 0,
succeeded: 1,
failedToSave: -1,
unavailable: -2
};
g.sendFailureStatus = a;
b.util.inherit(g, new b.EventEmitter);
g.prototype.constructor = g;
b.util.merge(g.prototype, {
addPromiseCheck: function(b, d) {
var i = this,
d = d || (new Date).getTime();
i.promises.push(b);
if (!i.promises.timeoutId) i.promises.timeoutId =
setTimeout(function() {
i.promises.timeoutId = null;
if (0 !== i.promises.length) {
var b = i.promises.shift();
i.sendAjaxRequest({
dataType: "jsonp",
url: i.baseUri + "api/v1/promises/" + encodeURIComponent(b.key),
error: function() {
i.trigger("sendFailed", {
reason: a.crossDomainPostFailed
})
},
success: function(h) {
if (h) switch (h.status) {
case g.promiseResult.processing:
if (10 < b.tryCount) {
i.trigger("sendFailed", {
reason: a.retryCount
});
break
}
b.tryCount++;
i.addPromiseCheck(b, d);
break;
case g.promiseResult.succeeded:
i.trigger("sendSucceeded",
{
retryAttempts: b.tryCount,
duration: (new Date).getTime() - d
});
break;
case g.promiseResult.failedToSave:
i.trigger("sendFailed", {
reason: a.serverSideSave
});
break;
case g.promiseResult.unavailable:
i.trigger("sendFailed", {
reason: a.promiseUnavailable
})
} else i.trigger("sendFailed", {
reason: a.emptyResponse
})
}
})
}
},
500)
},
updatePreferences: function(a) {
var g = {};
b.util.forEach(a,
function(a, b) {
g[b] = "object" === typeof a ? d.CLIPBOARD.JSON.stringify(a) : a
});
var K = i.call(this, {
remote: this.baseUri + "utils/xdm",
onReady: function() {
var a =
d.CLIPBOARD.JSON.stringify({
APIpath: "/api/v1/users",
method: "PUT",
data: g
});
K.postMessage(a)
},
onMessage: function() {
K.destroy()
}
})
},
sendClip: function(b) {
this.trigger("sendingClip");
var g = this,
K = setTimeout(function() {
g.trigger("sendFailed", {
reason: a.timeout
})
},
3E4),
s = i.call(this, {
remote: g.baseUri + "utils/xdm",
onReady: function() {
clearTimeout(K);
s.postMessage(d.CLIPBOARD.JSON.stringify({
APIpath: "/api/v1/clips",
method: "POST",
data: b
}))
},
onMessage: function(b) {
var h;
if (b && 0 < b.length) try {
if (b = d.CLIPBOARD.JSON.parse(b),
b.error) {
var i = b.error;
h = i.expiredSession ? a.expiredSession: i.expiredRequest ? a.expiredRequest: i.badRequest ? a.badRequest: i.unauthorized ? a.unauthorized: a.unknown
} else b.result ? g.addPromiseCheck({
key: b.result.promiseKey,
tryCount: 0
}) : h = a.emptyResult
} catch(F) {
h = a.malformedResponse
} else h = a.invalidResponse;
h && g.trigger("sendFailed", {
reason: h
});
s.destroy()
}
})
},
logMetric: function(a, b, d) {
var g = this;
setTimeout(function() {
g.sendAjaxRequest(g.baseUri + "api/v1/metrics/" + (d.guid || ""), {
type: "GET",
data: {
eventName: a,
sessionId: d.sessionId,
data: b || {}
},
dataType: "jsonp"
})
},
20)
},
fetchAutocompleteData: function() {
var a = this,
b = i.call(this, {
remote: a.baseUri + "utils/xdm",
onReady: function() {
var a = d.CLIPBOARD.JSON.stringify({
action: "fetchAutocompleteData"
});
b.postMessage(a)
},
onMessage: function(g) {
if (g && g.length) {
var i = null;
try {
i = d.CLIPBOARD.JSON.parse(g).result,
a.trigger("autocompleteDataReceived", {
dict: i
})
} catch(u) {
a.trigger("autocompleteDataFailed", {
error: "invalidJson"
})
}
} else a.trigger("autocompleteDataFailed", {
error: "xdmFailed"
});
b.destroy()
}
})
},
fetchUserData: function() {
var a = this,
b = i.call(a, {
remote: this.baseUri + "utils/xdm",
onReady: function() {
b.postMessage(d.CLIPBOARD.JSON.stringify({
action: "fetchUserData"
}))
},
onMessage: function(g) {
var i;
if (!g || !g.length) i = {
error: !0,
message: "Empty response"
};
else try {
i = d.CLIPBOARD.JSON.parse(g)
} catch(u) {
i = {
error: !0,
message: "Invalid json"
}
}
a.trigger("userDataReceived", {
error: i.error ? i.message: null,
config: i.config,
loggedIn: i.loggedIn,
preferences: i.preferences,
userGuid: i.guid,
sessionId: i.sid,
thirdPartyCookiesEnabled: i.thirdPartyCookiesEnabled
});
b.destroy()
}
})
}
});
b.DataAccess = g
})(window); (function(d) {
function i() {}
i.prototype = {
showLoadingMessage: function() {},
show3rdPartyCookiesErrorMessage: function() {},
hideNotification: function() {},
showErrorNotification: function() {},
enableClipping: function() {},
disableClipping: function() {},
showNotification: function() {},
handleExtraction: function() {},
setPreferences: function() {},
setLoginState: function() {}
};
d.CLIPBOARD.client.UiController = i
})(window);
(function(d) {
function i() {}
d = d.CLIPBOARD.client;
d.util.inherit(i, new d.UiController, new d.ActivatableControl, new d.EventEmitter);
i.prototype.constructor = i;
d.ui.NoOpUiController = i
})(window);
(function(d) {
function i(a) {
var b = [],
d;
for (d in a) a.hasOwnProperty(d) && b.push(d + "=" + a[d]);
return b.join(",")
}
function g(a, b, g) {
var h = this.$,
i,
r;
void 0 === d.screenLeft ? (i = d.screenX, r = d.screenY) : (i = d.screenLeft, r = d.screenTop);
r += 100;
g ? (h = g.offset(), i += h.left + g.outerWidth() / 2, r += h.top + g.outerHeight() / 2) : (i += h(d).width() / 2, h(d).height());
a = Math.max(0, i - a / 2);
b = Math.max(0, r - b / 2);
return {
left: a,
top: b
}
}
function b() {
var a = this,
b = d.setInterval(function() {
if (a.window.closed) a.alreadyClosed || a.trigger("closed",
{
source: "manual"
}),
d.clearInterval(b),
a.alreadyClosed = !1
},
100)
}
function a(a, b, d) {
h.EventEmitter.call(this);
h.ActivatableControl.call(this);
d = d || {};
this.$ = a.$;
this.xdm = a.xdm;
this.domain = a.domain;
this.url = b;
this.name = d.name || "popup_" + Math.round(1E6 * Math.random());
this.width = d.width || 640;
this.height = d.height || 480
}
var h = d.CLIPBOARD.client;
h.util.inherit(a, new h.ActivatableControl, new h.EventEmitter);
h.util.merge(a.prototype, {
constructor: a,
name: "",
window: null,
params: {
location: "yes",
resizable: "yes",
alwaysRaised: "yes"
},
open: function(a) {
if (this.isOpen()) return this.window.focus(),
this.window;
this.window && this.destroy();
h.popups[this.name] = {
done: !1
};
var K = this.$,
a = K.extend({
width: this.width,
height: this.height
},
this.params, g.call(this, this.width, this.height, a)),
s = K('iframe[name="' + this.name + '"]');
s.length || (s = K("<iframe/>").attr("src", "https://" + this.domain + "/utils/clipper-connect-iframe").attr("name", this.name).css({
top: -1E4,
left: -1E4,
display: "none",
position: "absolute"
}).appendTo("body"));
this.window = d.open(this.url,
this.name + Math.round(1E5 * Math.random()), i(a));
b.call(this);
var u = this;
K(d).on("message.clipboard_review",
function(a) {
a = a.originalEvent; ! a || a.origin !== "https://" + u.domain || 0 !== a.data.indexOf("clipboard:") || (u.trigger("externalWorkCompleted", {
status: a.data.substring(10)
}), s.remove(), s = null)
});
this.trigger("opened", {
window: this.window
});
return this.window
},
close: function(a, b) {
if (this.isOpen()) {
if ("manual" !== a) this.alreadyClosed = !0;
this.window.close();
this.$(d).off("message.clipboard_review");
this.trigger("closed",
{
source: a || "programmatic",
status: b
})
}
},
destroy: function() {
this.close();
this.window = null;
this.trigger("destroyed")
},
isOpen: function() {
return this.window ? !this.window.closed: !1
},
doDeactivate: function() {
this.destroy()
}
});
a.getOrigin = function() {
return d.location.href
};
a.factory = function(b, d) {
switch (b) {
case "login":
return new a(d, d.baseUri + "login?display=popup", {
name: "clipboardLogin",
width: 640,
height: 380
});
default:
throw Error("Unsupported popup window type");
}
};
h.ui.PopupWindow = a
})(window);
(function(d) {
function i(a) {
return "review_" + v.util.addSuffix(a)
}
function g(a, d, g) {
a.trigger("confirmed", {
method: g,
clip: d.clip,
reviewData: b.call(a)
})
}
function b() {
var a = this.$,
b = v.util.trim(a("#" + r.annotationInput).val());
b === a("#" + r.annotationInput).attr("placeholder") && (b = "");
return {
title: v.util.trim(a("#" + r.titleInput).val()),
tweet: this.clipAction.postToTwitter,
postToFacebook: this.clipAction.postToFacebook,
published: this.clipAction.publish,
annotation: b
}
}
function a(a, b) {
a.trigger("canceled", {
method: b
})
}
function h(a) {
var b = this.$,
d = b("<div/>").attr("id", r.bookmarkTitle).text(a.clip.title),
a = b("<div/>").attr("id", r.bookmarkSubtitle).text(a.clip.source),
g = b("<img/>").attr("id", r.bookmarkImage).attr("src", this.staticBaseUrl + "/images/1.0.17/bookmarkMed.png"),
d = b("<div/>").attr("id", r.bookmarkWrapper).append(g, d, a);
return b("<div/>").append(d).html()
}
function n(a) {
var b = "Publish" === a ? "publish": "postTo" + a;
this.clipAction[b] = !this.clipAction[b];
this.$("#" + r["actionMenuItem" + a]).toggleClass(r.actionMenuActive)
}
function K(a, b) {
return function(d) {
"success" === d.status && (n.call(a, b), a.preferences["connectedTo" + b] || a.trigger("socialNetworkConnected", {
network: b
}), a[b.toLowerCase() + "Window"].close({
source: "external"
}))
}
}
function s(a, b) {
return function() {
a.$("#" + r["actionMenuItem" + b]).removeClass(r.spinner)
}
}
function u(a) {
this.baseUri = a.baseUri;
this.staticBaseUrl = a.staticBaseUrl;
this.$ = a.$;
this.domain = a.domain;
this.document = a.document;
this.$dialog = this.$overlay = null;
this.preferences = {};
this.sandbox = null;
this.clipAction =
{
publish: !1,
postToFacebook: !1,
postToTwitter: !1
};
this.facebookWindow = new v.ui.PopupWindow(a, "about:blank", {
name: "facebookStream" + v.util.idSuffix,
width: 650,
height: 310
});
var b = "twitter" + v.util.idSuffix,
g = "https://" + this.domain + "/oauth/twitter/?source=clipper&origin=" + d.encodeURIComponent(v.ui.PopupWindow.getOrigin()) + "&proxy=" + b;
this.twitterWindow = new v.ui.PopupWindow(a, g, {
name: b,
width: 550,
height: 550
});
this.twitterWindow.on("externalWorkCompleted", K(this, "Twitter")).on("closed", s(this, "Twitter"));
this.facebookWindow.on("externalWorkCompleted",
K(this, "Facebook")).on("closed", s(this, "Facebook"));
this.controls = [this.facebookWindow, this.twitterWindow]
}
var v = d.CLIPBOARD.client,
r = {
overlay: i("overlay"),
fancyButton: i("button"),
bookmarkTitle: i("bookmarkTitle"),
bookmarkSubtitle: i("bookmarkSubtitle"),
bookmarkImage: i("bookmarkImage"),
bookmarkWrapper: i("bookmarkWrapper"),
activeControl: i("activeControl"),
publishControl: i("publishControl"),
publishWrapper: i("publishWrapper"),
publishText: i("publishText"),
annotationInput: i("annotate"),
autocompleteTrigger: i("autocompleteTrigger"),
dialog: i("dialog"),
header: i("header"),
titleInput: i("title"),
contents: i("contents"),
clipContents: i("clipContents"),
controls: i("controls"),
control: i("control"),
footer: i("footer"),
inputContainer: i("inputContainer"),
buttonWrapper: i("buttonWrapper"),
save: i("save"),
cancel: i("cancel"),
actionMenu: i("actionMenu"),
actionMenuItem: i("actionMenuItem"),
actionMenuItemFacebook: i("actionMenuItemFacebook"),
actionMenuItemTwitter: i("actionMenuItemTwitter"),
actionMenuItemPublish: i("actionMenuItemPublish"),
actionMenuIcon: i("actionMenuIcon"),
actionMenuIcon_publish: i("actionMenuIcon_publish"),
actionMenuIcon_facebook: i("actionMenuIcon_facebook"),
actionMenuIcon_twitter: i("actionMenuIcon_twitter"),
actionMenuLabel: i("actionMenuLabel"),
actionMenuActive: i("actionMenuActive"),
spinner: i("spinner"),
wrapper: i("wrapper")
};
v.util.inherit(u, new v.ActivatableControl, new v.EventEmitter);
u.prototype.close = function() {
if (this.isOpen()) {
this.trigger("closing");
this.$("#" + r.annotationInput).autocompleteMe("destroy");
if (this.sandbox) this.sandbox.destroy(),
this.sandbox = null;
var a = this,
b = this.$;
this.$overlay.fadeOut(200,
function() {
a.$overlay.remove();
a.$overlay = null
});
this.$dialog.fadeOut(200,
function() {
a.$dialog.remove();
a.$dialog = null
});
this.clipAction = {
publish: this.preferences.publishByDefault,
postToFacebook: !1,
postToTwitter: !1
};
b(this.document).off("." + v.util.eventNamespace.review);
this.trigger("closed")
}
};
u.prototype.open = function(b) {
function s(a) {
return function() {
var b = aa.caret(),
d = aa.val();
aa.val(d.substring(0, b.start) + a + d.substring(b.start)).caret(b.start +
1, b.start + 1);
J.trigger("autocompleteTriggered", {
source: "clickTrigger",
type: "#" === a ? "tag": "user"
})
}
}
function u(a) {
var b = "autocompleteTrigger" + ("#" === a ? "Tag": "User"),
d = "#" === a ? "tags": "connections";
return y("<span/>").applyInlineStyles().attr("id", i(b)).attr("title", "Show " + d).text(a).click(s(a))
}
var y = this.$,
J = this;
J.trigger("opening");
var K = y(d).width(),
S = y(d).height(),
t = b.clip.height + 2 + 30 + 158,
z,
p = b.clip.width,
N = b.clip.height,
o = b.rawHtml;
"bookmark" === b.clip.type ? (o = h.call(this, b), z = p = 640, N = 120, t = Math.min(S -
100, N + 2 + 30 + 158)) : (z = Math.min(Math.max(600, b.clip.width + 50), K - 100), t = Math.min(t, S - 100));
this.$dialog = y("<div/>").applyBlockStyles().attr("id", r.dialog);
var H = y("<div/>").applyBlockStyles().attr("id", r.header);
y("<input/>").applyTextInputStyles().attr({
type: "text",
id: r.titleInput,
tabindex: 1,
placeholder: "Enter a title for your clip",
value: v.util.trim(b.clip.title) || this.document.title
}).appendTo(H);
var L = y("<div/>").applyBlockStyles().attr("id", r.contents).cssImportant("height", t - 158 + "px");
y("<div/>").applyBlockStyles().attr("id",
r.clipContents).cssImportant({
height: N
}).appendTo(L);
var M = y("<div/>").applyBlockStyles().attr("id", r.footer),
$ = y("<div/>").applyBlockStyles().attr("id", r.inputContainer).appendTo(M),
ca = v.util.trim(b.clip.annote || ""),
aa = y("<input/>").applyTextInputStyles().attr({
tabindex: 2,
id: r.annotationInput,
placeholder: "Enter annotation, #tags and @mentions",
title: "Enter annotation, #tags and @mentions",
spellcheck: "true",
type: "text",
value: ca ? ca + " ": ""
}).on("keypress keydown keyup",
function(a) {
27 === a.keyCode || 13 ===
a.keyCode || a.stopPropagation()
}).autocompletify({
fixed: !0,
setCss: function(a, b, d) {
a.cssImportant(b, d)
},
createElement: function(a) {
a = y("<" + a + "/>");
return "block" === a.css("display") ? a.applyBlockStyles() : a.applyInlineStyles()
}
}).appendTo($);
y("<div/>").applyBlockStyles().attr("id", r.autocompleteTrigger).append(u("#")).append(u("@")).appendTo($); (function() {
function a(b, d) {
var g = r.actionMenuItem,
h = b.toLowerCase(),
i = !1;
d && (g += " " + r.actionMenuActive);
if ("facebook" === h || "twitter" === h) i = !J.isLoggedIn;
g = y("<div/>").applyBlockStyles().addClass(g).attr("id",
r["actionMenuItem" + b]).append(y("<span/>").applyInlineStyles().attr("id", r["actionMenuIcon_" + h]).addClass(r.actionMenuIcon)).append(y("<span/>").applyInlineStyles().addClass(r.actionMenuLabel).text(b)).click(function() {
"publish" === h ? n.call(J, b) : J.clipAction[h] ? J[h + "Window"].close() : J.preferences["Twitter" === b ? "connectedToTwitter": "connectedToFbStream"] ? n.call(J, b) : (y(this).addClass(r.spinner), J[h + "Window"].open(y(this)))
});
i && g.hide();
return g
}
var b = y("<div/>").applyBlockStyles().attr("id", r.actionMenu).append(a("Publish",
J.preferences.publishByDefault));
J.preferences.connectedToTimeline || b.append(a("Facebook"));
return b.append(a("Twitter"))
})().appendTo(M);
var Z = y("<span/>").applyInlineStyles().attr({
id: r.cancel
}).text("Cancel").click(function() {
a(J, "cancelButton")
}),
$ = y("<button/>").applyInlineStyles().attr({
id: r.save,
tabindex: 3
}).addClass(r.fancyButton).text("Save").click(function() {
g(J, b, "saveButton")
});
y("<div/>").applyBlockStyles().attr("id", r.buttonWrapper).append(Z, $).appendTo(M);
y("<div/>").applyBlockStyles().attr("id",
r.wrapper).append(H, L, M).appendTo(this.$dialog);
this.$dialog.appendTo("body").find('input[type="text"]').placeholder(!0);
this.sandbox = v.util.createSandbox(y, y("#" + r.clipContents));
this.sandbox.$element.cssImportant({
visibility: "visible",
left: "auto",
top: "auto",
position: "static",
width: p,
height: N,
opacity: 1
});
this.sandbox.addSandboxCss(this.staticBaseUrl);
this.sandbox.html('<div class="' + v.util.clipContainerClass + '">' + o + "</div>");
v.util.assureFixedPositioning(this.$dialog);
N = p = 0; ! y.support.boxModel &&
y.browser.msie && "8.0" === y.browser.version && (p = y(d).scrollTop(), N = y(d).scrollLeft());
this.$overlay = y("<div>").applyBlockStyles().attr("id", r.overlay).cssImportant({
top: 0,
left: 0,
position: "fixed"
}).appendTo("body");
v.util.assureFixedPositioning(this.$overlay);
this.$overlay.animate({
opacity: 0.8
},
500);
this.$dialog.cssImportant({
left: b.clip.left - y(d).scrollLeft() - 15,
top: b.clip.top - y(d).scrollTop() - 81,
width: z,
height: t
}).css("opacity", 0).animate({
opacity: 0.9
},
500);
this.$dialog.animate({
left: 0.5 * (K - z) + N,
top: 0.5 *
(S - t) + p,
opacity: 1
},
700, "easeOutExpo",
function() {
var a = y(this).find("#" + r.annotationInput),
b = a.val().length;
a.focus().caret(b, b)
});
y(this.document).on("keydown." + v.util.eventNamespace.review,
function(d) {
27 === d.keyCode ? a(J, "escapeKey") : 13 === d.keyCode && (d.target === Z[0] ? a(J, "cancelButton") : g(J, b, "enterKey"))
}); (function() {
if (y.browser.webkit && "wolframalpha.com" === document.domain) {
var a = [];
L.find("img").attr("src",
function() {
a.push(y(this).attr("src"));
y(this).css("opacity", "1");
return "foo"
});
var b = 0;
d.setTimeout(function() {
L.find("img").attr("src",
function() {
return a[b++]
})
},
1E3)
}
})();
this.trigger("opened")
};
u.prototype.constructor = u;
u.prototype.isOpen = function() {
return !! this.$overlay && !!this.$dialog
};
u.prototype.doDeactivate = function() {
if (this.isOpen() && (this.close(), this.sandbox)) this.sandbox.destroy(),
this.sandbox = null
};
u.prototype.setPreferences = function(a) {
this.preferences = a;
this.clipAction.publish = !!this.preferences.publishByDefault
};
u.prototype.setLoginState = function(a) {
if (this.isLoggedIn =
a) a = "https://" + this.domain + "/utils/clipper-connect?origin=" + v.ui.PopupWindow.getOrigin() + "&proxy=" + this.facebookWindow.name,
this.facebookWindow.url = "http://www.facebook.com/dialog/oauth/?scope=email,publish_stream&client_id=" + d.CLIPBOARD.config.facebookAppId + "&redirect_uri=" + d.encodeURIComponent(a) + "&display=popup&response_type=token";
this.isOpen() && (a = this.isLoggedIn ? "fadeIn": "fadeOut", this.$("#" + r.actionMenuIcon_facebook).parent()[a]("slow"), this.$("#" + r.actionMenuIcon_twitter).parent()[a]("slow"))
};
v.ui.Review = u
})(window);
(function(d, i) {
function g(a) {
return "widget_" + M.util.addSuffix(a)
}
function b(a, b) {
for (var d = b.split(" "), g = 0; g < d.length; g++) if (/Active_clipboard_314159265$/.test(d[g])) return d[g];
return ""
}
function a(a) {
return function() {
return g(a + "Active")
}
}
function h(a) {
return function() {
var b;
b = /Active_clipboard_314159265\b/.test(a.$("#" + I.selectorType)[0].className);
a.trigger("navigated", {
source: "initiate",
type: a.currentSelectorType,
status: b ? "disabled": "enabled"
})
}
}
function n(a) {
this.trigger("selectorSwitched", {
type: a
})
}
function K() {
var a = this.$("#" + I.flyout).cssImportant("background-color", "#57443f");
this.$.browser.webkit && a.show();
a.slideDown(250);
this.$("#" + I.menuContainer).addClass(Q)
}
function s(a) {
var b = this.$,
d = this;
b("#" + I.flyout).slideUp(250,
function() {
b(this).empty();
d.activeTab = null;
b(this).cssImportant("background-color", "transparent");
b("#" + I.menuContainer).removeClass(Q);
a && a()
})
}
function u(a, b) {
var d = a.$;
return function() {
var g = d(this),
h = {};
h[b] = g.is('input[type="checkbox"]') ? g.is(":checked") : g.val();
v.call(a, h)
}
}
function v(a) {
this.trigger("preferencesUpdated", {
preferences: a
})
}
function r() {
var d = this.$,
h = this,
i = d("#" + I.clipContainer).find("." + ea).andSelf();
if (this.activeTab === Y.selectors) s.call(this,
function() {
T(i, !1)
});
else {
T(i, !0);
var p = [];
M.util.forEach(fb,
function(i, o) {
var t = o.toLowerCase(),
m = d("<div/>").addClass(j).applyBlockStyles(),
z = d("<div/>").applyBlockStyles().attr("id", g(t + "Dark")).addClass(ga).appendTo(m);
t === h.currentSelectorType && z.addClass(a(t + "Dark"));
d("<h4/>").addClass(g("selectorHeader")).mouseover(function() {
t !==
h.currentSelectorType && z.addClass(a(t + "Dark"))
}).mouseout(function() {
t !== h.currentSelectorType && z.removeClass(b)
}).mousedown(function(a) {
a.stopPropagation();
n.call(h, t);
var g = d(this).find("." + ga)[0];
d("#" + I.flyout).find("." + ga).filter(function() {
return this !== g
}).removeClass(b)
}).append(z).append(d("<span/>").applyInlineStyles().text(o)).appendTo(m);
d("<div/>").html(i).applyBlockStyles().appendTo(m);
p.push(m[0])
});
E.call(this, d(p));
K.call(this)
}
}
function F() {
var b = this.$,
d = b("#" + I.help);
if (this.activeTab ===
Y.help) s.call(this,
function() {
J(d, !1);
T(d, !1)
});
else {
J(d, !0);
T(d, !0);
var h = [];
M.util.forEach(eb,
function(d, j) {
var i = g(j),
p = b("<div/>").addClass(B).applyBlockStyles();
b("<div/>").applyBlockStyles().addClass(i + " " + ga).addClass(a(j)).appendTo(p);
b("<div/>").applyBlockStyles().addClass(X).html(d).find("p").applyBlockStyles().end().appendTo(p);
h.push(p[0])
});
for (var j = 0; j < h.length - 1; j++) b("<div/>").applyBlockStyles().addClass(g("divider")).appendTo(h[j]);
E.call(this, b(h));
K.call(this)
}
}
function E(a) {
function b() {
function j() {
if ("auto" !==
h) {
g.height("auto");
var a = g.height();
g.height(h);
g.animate({
height: a
},
200, "linear",
function() {
g.height("auto");
g.cssImportant("overflow", "auto")
})
}
}
g.empty().append(a.hide());
d.support.opacity ? a.fadeIn(250).promise().done(j) : (a.show(), j())
}
var d = this.$,
g = d("#" + I.flyout),
h = g.height(),
h = h || "auto",
j = g.height(h).cssImportant("overflow", "hidden").contents();
d.support.opacity ? j.fadeOut(250).promise().done(b) : (j.remove(), b())
}
function O() {
var a = this.$,
b = this,
d = a("#" + I.preferences);
if (this.activeTab === Y.preferences) s.call(this,
function() {
J(d, !1);
T(d, !1)
});
else {
J(d, !0);
T(d, !0);
var h = a("<div/>").applyBlockStyles().addClass(j);
a("<h4/>").applyBlockStyles().text("Clip settings").appendTo(h);
var i = a("<table/>").applyTableStyles(),
p = [];
a("<tr/>").applyTableRowStyles().append(a("<td/>").applyTableCellStyles().append(a("<input/>").applyInlineStyles().attr({
type: "checkbox",
id: g("preferencesReview"),
checked: this.preferences.reviewClip
}).change(u(this, "reviewClip"))), a("<td/>").applyTableCellStyles().append(a("<label/>").applyInlineStyles().attr({
"for": g("preferencesReview")
}).text("Review clip before saving"))).appendTo(i);
a("<tr/>").applyTableRowStyles().append(a("<td/>").applyTableCellStyles().append(a("<input/>").applyInlineStyles().attr({
type: "checkbox",
id: g("preferencesPublish"),
checked: this.preferences.publishByDefault
}).change(u(this, "publishByDefault"))), a("<td/>").applyTableCellStyles().append(a("<label/>").applyInlineStyles().attr({
"for": g("preferencesPublish")
}).text("Publish clips by default"))).appendTo(i);
i.appendTo(h);
p.push(h[0]);
var h = a("<div/>").applyBlockStyles().addClass(j),
o = a("<ul/>").applyListStyles().attr("id",
I.colorRadioList);
a("<h4/>").applyBlockStyles().text("Rectangle color").appendTo(h);
M.util.forEach(M.util.rectColors,
function(d, g) {
var h = b.rgbaSupport ? "rgba(" + d.startColor.join(",") + ", 0.25)": "rgb(" + d.startColor.join(",") + ")";
a("<li/>").applyListItemStyles().cssImportant("background-color", h).click(function(a) {
return function() {
v.call(b, {
rectangleColor: a
})
}
} (g)).appendTo(o)
});
h.append(o);
h.append(a("<div/>").cssImportant("clear", "left"));
p.push(h[0]);
p.push(a("<div/>").cssImportant("clear", "left")[0]);
E.call(this, a(p));
K.call(this)
}
}
function y(a) {
var d = a.$;
return function() {
var g = d(this),
h = a.$container.find("." + ca),
j = d("#" + I.menu),
i = (h.length - 1) * w + w / 3;
a.$container.data("expanded") ? s.call(a,
function() {
j.find("." + ea + ", " + ra).filter(":not(#" + I.selectorType + ")").each(function() {
d(this).removeClass(b).removeClass(D).parent().removeClass(b).removeClass(q)
});
var a = d(this);
j.animate({
width: j.width() - i
},
250, "easeInCubic",
function() {
a.empty();
h.hide();
g.toggleClass(aa + " " + Z)
})
}) : (j.width(j.width()), h.show(),
j.animate({
width: j.width() + i
},
250, "easeInCubic",
function() {
g.toggleClass(aa + " " + Z)
}));
a.$container.data("expanded", !a.$container.data("expanded"))
}
}
function J(d, g) {
var h = /^widget_(.+?)_clipboard_314159265$/.exec(d.attr("id"))[1];
g ? d.addClass(a(h)) : d.removeClass(b)
}
function T(a, b) {
a.toggleClass(D, b).closest("." + ra).toggleClass(q, b)
}
function S(a) {
this.$container.find("." + ea + ", " + ra).filter(":not(#" + I.selectorType + ")").removeClass(b);
T(this.$container.find("." + D), !1);
this.trigger("navigated", {
source: a
});
switch (a) {
case Y.help:
F.call(this);
break;
case Y.preferences:
O.call(this);
break;
case Y.selectors:
r.call(this)
}
this.activeTab = Y[a]
}
function t(a) {
var b = this;
this.$container.fadeOut("fast",
function() {
b.$container.remove();
b.$container = null;
a && a.call(b)
})
}
function z(a) {
function b(a, d, g) {
a = j("<div/>").applyBlockStyles().attr("id", a + "_container").addClass(ra + " " + ka).append("<div/>").find("div").applyBlockStyles().attr("id", a).addClass(ea).end();
g !== i && a.cssImportant("left", g);
d && a.addClass(ca);
return a
}
var g = this,
j = g.$,
p = j("<div/>").applyBlockStyles().attr("id", I.clipContainer).addClass(ka).append(b(I.selectorType, !1).toggleClass(ka + " " + I.rectangle)).append(b(I.selectorDropDown, !0).removeClass(ka)),
t = w + w / 3;
this.$container = j("<div/>").applyBlockStyles().attr("id", I.login).append("<div/>").find("div:first").applyBlockStyles().attr("id", I.menuContainer).append("<div/>").find("div:first").applyBlockStyles().attr("id", I.menuBackground).append(j("<div/>").applyBlockStyles().attr("id", I.message)).append("<div/>").find("div:eq(1)").width(w +
w / 2).applyBlockStyles().attr("id", I.menu).append(p).append(b(I.preferences, !0, t + 0 * w)).append(b(I.help, !0, t + 1 * w)).append(b(I.home, !0, t + 2 * w)).append(b(I.close, !0, t + 3 * w)).append(b(I.expand).find("div").addClass(aa).end()).end().end().end().append(j("<div/>").applyBlockStyles().attr("id", I.flyout).hide());
j("body").append(this.$container);
j.support.boxModel ? j("#" + I.menuBackground).cssImportant("background-image", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAYAAACkJ9JhAAAAt0lEQVQImQXBDS8CAQCA4ffnYQwRSQ2lUpfcLleSSulDXcvHGIb5qa/n4e85kd/VXH6WM/lOpvK1GMvn44N8zEbyPrmXt3FfXkc9eRl25WnQkVWvLctuLMnttSw6TZnfRDJrhTKNGzJpXso4CmQU1mQYVmXQKEu/XpJeUJS7WkG61TPpVE6lXcpL6zwncfFY4kJWopNDCfNpucrtSyObkvrRjgSZbakebMlFelMqextSTq1LaXfNf6t8Z14HSskhAAAAAElFTkSuQmCC")') :
(j("#" + I.menuBackground).cssImportant({
"padding-bottom": 0
}), j("#" + I.flyout).cssImportant({
position: "relative",
top: -2,
left: -1
}));
M.util.flagAsUnclippable(this.$container);
this.$container.data("expanded", !1);
j("#" + I.selectorType).mousedown(h(g));
j("#" + I.selectorDropDown).click(function() {
S.call(g, Y.selectors)
});
j("#" + I.home).click(function() {
g.trigger("navigated", {
source: "home"
});
d.open(g.baseUri, "clipboard_blank")
});
j("#" + I.close).click(function() {
g.trigger("navigated", {
source: "close"
})
});
j("#" + I.expand).click(y(this));
j("#" + I.help).click(function() {
S.call(g, Y.help)
});
j("#" + I.preferences).click(function() {
S.call(g, Y.preferences)
});
o.call(this, "login", a)
}
function p(a) {
var b = this,
d = b.baseUri,
g = b.$;
this.$container = g("<div/>").applyBlockStyles().attr("id", I.logout).append(g("<p/>").applyBlockStyles().append("Please ").append(g("<a/>").applyLinkStyles().attr({
href: d + "login?popup=1",
target: "_blank",
id: I.loginLink
}).click(function() {
b.trigger("loginClicked", {
$element: g(this)
});
return ! 1
}).text("login")).append(" to Clipboard to start clipping"));
M.util.flagAsUnclippable(this.$container);
g("body").append(this.$container);
o.call(this, "logout", a)
}
function N(a) {
var b = this.$;
this.$container = b("<div/>").applyBlockStyles().attr("id", I.waiting).append(b("<img/>").applyInlineStyles().attr("id", I.spinner).attr("src", this.staticBaseUrl + "/images/1.0.17/loadingYellowBall.gif"));
M.util.flagAsUnclippable(this.$container);
b("body").append(this.$container);
o.call(this, "waiting", a)
}
function o(a, b) {
var d = this.$,
g = this;
this.$container.cssImportant({
top: 0,
right: 20
});
d.support.opacity && this.$container.cssImportant("opacity", 0);
var h = {
top: "+=" + $
};
if (d.support.opacity) h.opacity = db;
M.util.assureFixedPositioning(this.$container);
this.$container.animate(h, 200,
function() {
g.trigger("controlDisplayed", {
type: a
});
b && b()
})
}
function H(a, b) {
var d = this.$container && this.$container.attr("id"),
g;
switch (a) {
case "login":
g = z;
break;
case "logout":
g = p;
break;
case "waiting":
g = N;
break;
default:
b && b.call(this);
return
}
var h = this,
j = function() {
g.call(h, b)
};
d ? d !== I[a] ? t.call(this, j) : b && b.call(this) :
j()
}
function L(a) {
this.$container = null;
this.baseUri = a.baseUri;
this.staticBaseUrl = a.staticBaseUrl;
this.$ = a.$;
this.currentSelectorType = "rectangle";
this.activeTab = null;
this.rgbaSupport = a.support.rgba;
this.isLoggedIn = !1
}
var M = d.CLIPBOARD.client,
$ = 20,
ca = g("verboseItem"),
aa = g("expand"),
Z = g("collapse"),
ga = g("inlineIcon"),
Q = g("flyout"),
j = g("preferencesBlock"),
D = g("selectedTab"),
q = g("selectedTabContainer"),
B = g("helpBlock"),
X = g("helpText"),
ea = g("menuItemIcon"),
ra = g("menuItemContainer"),
ka = g("menuItemHoverContainer"),
w = 42,
db = 0.99,
Y = {
help: "help",
preferences: "preferences",
selectors: "selectors"
},
I = {
loginLink: g("loginLink"),
clipContainer: g("clipContainer"),
selectorType: g("selectorType"),
rectangle: g("rectangle"),
home: g("home"),
close: g("close"),
bookmark: g("bookmark"),
text: g("text"),
help: g("help"),
preferences: g("preferences"),
expand: g("expand"),
message: g("message"),
logout: g("logoutControl"),
login: g("loginControl"),
selectorDropDown: g("selectorDropDown"),
menu: g("menu"),
menuContainer: g("menuContainer"),
menuBackground: g("menuBackground"),
flyout: g("flyout"),
colorRadioList: g("colorRadioList"),
waiting: g("waitingControl"),
spinner: g("waitingControlSpinner")
},
eb = {
rectangle: '<p>Go to "clip mode." Just move your mouse around until you find something you like, and click.</p><p>You can also click and drag your mouse to get a better selection, or scroll the mousewheel to zoom in or out.</p><p>If you have text selected, this will automatically put you into "text mode" and extract the selected text.</p>',
text: '<p>Switch to "text mode." Highlight some text, and it will format it in an easy-to-read fashion.</p>',
preferences: "<p>Adjust your clipping preferences.</p>",
home: "<p>Open up your Clipboard home page in a new window.</p>",
close: "<p>Hide the Clipper.</p>"
},
fb = {
Rectangle: "<p>Select a rectangular region to clip. This is the default setting.</p>",
Text: "<p>Select a region to clip by highlighting text.</p>"
},
Ba = function() {
function a(g, o, m) {
var t = this.$;
t("#" + I.menu).find("." + ka + ":first").cssImportant("border-top-left-radius", "0px").cssImportant("border-bottom-left-radius", "0px");
g = t("#" + I.message).removeClass().addClass(m).html(g);
m = g.show().width();
t.support.boxModel ? g.cssImportant("width", "1px").animate({
width: m
},
p, "easeOutCubic",
function() {
t(this).width("auto")
}) : (g.cssImportant({
visibility: "hidden",
position: "absolute",
width: "auto"
}).show(), m = g.parent().width() - g.next().width() - g.outerWidth() + 2, g.cssImportant({
left: m,
visibility: "visible"
}));
var z = this,
g = o === i ? h: o;
j = o === i || 0 <= o ? d.setTimeout(function() {
b.call(z)
},
g) : 0
}
function b(a) {
var g = this.$;
j = d.clearTimeout(j);
g.support.boxModel ? (g("#" + I.menu).find("." + ka + ":first").cssImportant("border-top-left-radius",
"4px").cssImportant("border-bottom-left-radius", "4px"), g("#" + I.message).animate({
width: 0
},
p, "easeInCubic",
function() {
g(this).hide().width("auto");
a && a()
})) : (g("#" + I.message).hide(), a && a())
}
var h = 3E3,
j,
p = 200;
return {
showMessage: function(d, h) {
var j = this;
H.call(this, "login",
function() {
b.call(j,
function() {
a.call(j, d, h, g("messageSuccess"))
})
})
},
hideMessage: b,
showErrorMessage: function(d, h) {
var j = this;
H.call(this, "login",
function() {
b.call(j,
function() {
a.call(j, d, h, g("messageError"))
})
})
}
}
} ();
M.util.inherit(L,
new M.ActivatableControl, new M.EventEmitter);
L.prototype.constructor = L;
L.prototype.enableClipping = function(b) {
var g = this,
j = d.setInterval(function() {
if (g.$container && g.$container.attr("id") === I.login) {
d.clearInterval(j);
var h = I[g.currentSelectorType];
g.$("#" + I.selectorType).removeClass(h).addClass(I[b]).addClass(a(b));
g.currentSelectorType = b
}
},
100)
};
L.prototype.doActivate = function() {
this.$container || (this.isLoggedIn ? z.call(this) : N.call(this))
};
L.prototype.doDeactivate = function() {
if (this.$container) {
var a =
this,
b = {
top: "-=" + ($ + this.$container.height())
};
if (this.$.support.opacity) b.opacity = 0;
this.$container.animate(b,
function() {
a.$container.remove();
a.$container = null
})
}
this.activeTab = null
};
L.prototype.show = function() {
this.$container && this.$container.fadeIn("fast")
};
L.prototype.hide = function() {
this.$container && this.$container.fadeOut("fast")
};
L.prototype.showMessage = Ba.showMessage;
L.prototype.hideMessage = Ba.hideMessage;
L.prototype.showErrorMessage = Ba.showErrorMessage;
L.prototype.disableClipping = function() {
this.hideMessage();
this.$("#" + I.selectorType).removeClass(b)
};
L.prototype.setPreferences = function(a) {
this.preferences = a
};
L.prototype.showLoadingMessage = function() {
H.call(this, "waiting")
};
L.prototype.setLoginState = function(a) {
this.isLoggedIn = a;
H.call(this, a ? "login": "logout")
};
M.ui.Widget = L
})(window);
(function(d) {
function i(a) {
function b() {
v.remove();
h.remove();
t.remove();
u.remove()
}
var g = this.$,
h = g("<div/>").css({
position: "fixed",
top: 0,
left: 0,
background: "#000000",
zIndex: s,
opacity: 0.5,
width: "100%",
height: "100%"
}),
i = "#faq-third-party-cookies",
n = d.navigator.userAgent;
/MSIE/i.test(n) ? i += "-ie": /Firefox/i.test(n) ? i += "-firefox": /Chrome/i.test(n) ? i += "-chrome": /Safari/i.test(n) && (i += "-safari");
n = "";
switch (a) {
case "cookies":
n = '<p style="">The clipper requires 3rd party cookies to be enabled. Head over to our <a target="_blank" href="' +
this.baseUri + "help" + i + '" style="color: #469CB9">help page</a> for instructions on how to enable them.</p>'
}
var n = n + '<p style="position: absolute; bottom: 40px; margin: 0 auto; width: 90%">Click anywhere to dismiss this message.</p>',
a = {
top: "50%",
left: "50%",
display: "none",
width: 600,
height: 440,
padding: "20px",
"margin-left": -300,
"margin-top": -220,
position: "fixed"
},
u = g("<div/>").css(g.extend({},
a, {
background: "#eee",
"z-index": s + 3
})).appendTo("body"),
v = g("<div/>").css(g.extend({},
a, {
background: "transparent url(" +
this.staticBaseUrl + "/images/1.0.17/logo1.png) no-repeat center center",
opacity: 0.3,
"z-index": s + 4
})),
t = g("<div/>");
t.css(g.extend({},
a, {
zIndex: s + 5,
"-webkit-border-radius": "3px",
"-moz-border-radius": "3px",
"border-radius": "3px",
"-webkit-box-shadow": "-3px 3px 10px rgba(0,0,0,0.75)",
"box-shadow": "-3px 3px 10px rgba(0,0,0,0.75)",
background: "transparent",
color: "rgb(57,39,27)",
"text-align": "center",
"font-family": '"lucida grande", tahoma, verdana, arial, sans-serif',
"font-size": "22px"
})).html(n);
g.each([u,
h, v, t],
function() {
this.appendTo("body").fadeIn().click(b)
});
K.util.assureFixedPositioning(h)
}
function g(a) {
return function() {
a.$(d).unbind("." + u);
a.$(a.document).unbind("." + u);
a.widget.hide()
}
}
function b(a) {
return function() {
a.widget.show()
}
}
function a(a) {
return function(b) {
a.trigger("reviewConfirmed", b);
a.review.close();
var d = b.clip;
d.postToFacebook = b.reviewData.postToFacebook;
d.tweet = b.reviewData.tweet;
d.annotation = b.reviewData.annotation;
d["private"] = !b.reviewData.published;
d.title = b.reviewData.title ||
d.title;
a.trigger("clipConfirmed", {
clip: d
})
}
}
function h() {
var d = this;
this.review.on("opening", g(this)).on("closing", b(this)).on("confirmed", a(this)).on("canceled",
function() {
d.review.close()
}).on("socialNetworkConnected",
function(a) {
var b = {
preferences: {}
};
if ("Twitter" === a.network) b.preferences.connectedToTwitter = !0;
else if ("Facebook" === a.network) b.preferences.connectedToFbStream = !0;
d.trigger("preferencesUpdated", b)
}).bubble("preferencesUpdated").to(this).bubble("autocompleteTriggered").to(this).bubble("closing").to(this,
"reviewClosing").bubble("closed").to(this, "reviewClosed").bubble("opening").to(this, "reviewOpening").bubble("canceled").to(this, "reviewCanceled");
this.widget.on("loginClicked",
function(a) {
d.loginWindow.open(a.$element)
}).bubble("navigated").to(this).bubble("selectorSwitched").to(this).bubble("preferencesUpdated").to(this).bubble("displayed").to(this, "controlsDisplayed");
this.loginWindow.on("closed",
function() {
d.trigger("userDataRequested")
})
}
function n(a, b) {
this.baseUri = a.baseUri;
this.staticBaseUrl =
a.staticBaseUrl;
this.$ = a.$;
this.document = a.document;
this.shouldShowReview = a.preferences.reviewClip;
b = K.util.merge(K.util.merge({},
{
review: v.review(a),
widget: v.widget(a)
}), b);
this.review = b.review;
this.widget = b.widget;
this.loginWindow = K.ui.PopupWindow.factory("login", a);
this.controls = [this.review, this.widget, this.loginWindow];
h.call(this)
}
var K = d.CLIPBOARD.client,
s = 9999999,
u = "clipboard_ui",
v = {
review: function(a) {
return new K.ui.Review(a)
},
widget: function(a) {
return new K.ui.Widget(a)
}
};
K.util.inherit(n,
new K.UiController, new K.ActivatableControl, new K.EventEmitter);
n.prototype.constructor = n;
n.prototype.doDeactivate = function() {
this.hideNotification()
};
K.util.merge(n.prototype, {
showLoadingMessage: function() {
this.widget.showLoadingMessage()
},
show3rdPartyCookiesErrorMessage: function() {
i.call(this, "cookies")
},
showNotification: function(a, b) {
this.widget.showMessage(a, b)
},
hideNotification: function(a) {
this.widget.hideMessage(a)
},
showErrorNotification: function(a, b) {
this.widget.showErrorMessage(a, b)
},
enableClipping: function(a) {
this.widget.enableClipping(a)
},
disableClipping: function(a) {
this.widget.disableClipping(a)
},
handleExtraction: function(a) {
this.shouldShowReview ? this.review.open(a) : this.trigger("clipConfirmed", a)
},
setPreferences: function(a) {
this.shouldShowReview = !!a.reviewClip;
this.widget.setPreferences(a);
this.review.setPreferences(a)
},
setLoginState: function(a) {
this.widget.setLoginState(a);
this.review.setLoginState(a)
}
});
K.ui.WidgetUiController = n
})(window);
(function(d) {
function i(a) {
return function() {
if (!a.bookmark) a.dragging = !0
}
}
function g(a) {
return function(b) {
if (3 !== b.which) {
var d = "click";
a.bookmark ? d = "bookmark": a.selectionData.startElement !== a.selectionData.endElement ? d = "drag": a.zoomContext.zooming && (d = "zoom");
var g = a.bookmark ? "bookmark": "rectangle";
a.selecting = !1;
a.dragging = !1;
n.call(a);
var h = a.getSelection(),
i = setInterval(function() {
if (!a.animationContext.animating) clearInterval(i),
a.trigger("selectionEnded", {
selectionData: h,
selectionType: g,
extractionContext: {
rect: a.$zoomRect.data("dimensions"),
extractionType: d
}
}),
a.selecting = !0
},
50)
}
}
}
function b(a) {
var b = !1,
d = 1E3 / O;
return function(g, h, i, t) {
if (g.metaKey || g.shiftKey || g.altKey || g.ctrlKey) {
if (!a.zoomContext.sentMetaEventToTracker) a.trigger("scrolled", {
source: "mouseWheelWithMetaKey"
}),
a.zoomContext.sentMetaEventToTracker = !0;
return ! 0
}
if (b || 0 === t || !a.selectionData.startElement) return ! 1;
b = !0;
if (!a.zoomContext.zooming) a.zoomContext.start.clientX = g.clientX,
a.zoomContext.start.clientY = g.clientY;
0 > t ? a.zoomIn() : a.zoomOut();
setTimeout(function() {
b = !1
},
d);
return ! 1
}
}
function a(a) {
return function(b) {
b.preventDefault();
if (a.selecting) {
var d;
if (! (d = !a.zoomContext.zooming)) {
var g = a.zoomContext;
d = g.start.clientX - b.clientX;
g = g.start.clientY - b.clientY;
d = Math.sqrt(d * d + g * g) >= y
}
d && (a.zoomContext.reset(), a.animateTo({
clientX: b.clientX,
clientY: b.clientY
}))
}
}
}
function h() {
if (!this.bookmark) this.trigger("bookmarkPage"),
this.$zoomRect.cssImportant({
"border-top-width": J,
"border-bottom-width": J,
"border-right-width": J,
"border-left-width": J
},
!0),
K.call(this),
this.$canvasOverlay.cssImportant("cursor",
"pointer"),
this.$bookmark.show().cssImportant({
left: -80,
opacity: 0
}).delay(200).animate({
left: 20,
opacity: 1
},
"fast", "linear"),
this.selectionData.startElement = this.selectionData.startElement = null,
this.bookmark = !0
}
function n(a) {
var b = this.$;
this.bookmark = !1;
this.trigger("notBookmarkPage");
this.$canvasOverlay.cssImportant("cursor", "default");
this.$zoomRect.cssImportant({
"border-top-width": r,
"border-bottom-width": r,
"border-right-width": r,
"border-left-width": r
},
!0);
v.util.retireFixedPositioning(this.$zoomRect);
this.$bookmark.animate({
left: -80,
opacity: 0
},
"fast", "linear",
function() {
b(this).hide();
a && a()
})
}
function K() {
var a = this,
b = this.$,
g = b.support.boxModel ? 2 * (J + F) : 0;
v.util.assureFixedPositioning(this.$zoomRect);
this.$zoomRect.stop(!0, !1).animate({
left: 0,
top: 0,
width: b(d).width() - g,
height: b(d).height() - g
},
150, "easeOutQuad",
function() {
a.animationContext.animating = !1;
b(this).cssImportant({
width: b(d).width() - g,
height: b(d).height() - g
})
})
}
function s(a) {
this.bookmark && n.call(this);
var b = this.selectionData.endElement;
if (! (this.selectionData.startElement === a && this.selectionData.endElement === a)) {
if (this.dragging) {
if (!this.selectionData.startElement) this.selectionData.startElement = a
} else this.selectionData.startElement = a;
this.selectionData.endElement = a;
this.animationContext.animating = !0;
this.trigger("selecting");
var d = this.$,
a = d(this.selectionData.startElement),
d = d(this.selectionData.endElement),
a = v.util.getOuterDimensions(a),
d = v.util.getOuterDimensions(d),
a = {
top: Math.min(a.top, d.top),
left: Math.min(a.left, d.left),
bottom: Math.max(a.bottom, d.bottom),
right: Math.max(a.right, d.right)
};
a.width = a.right - a.left;
a.height = a.bottom - a.top;
a.area = a.width * a.height;
if (a.area > v.util.maxArea) this.selectionData.endElement = b,
this.trigger("selectionFailed", {
reason: v.Selector.failureStatus.maxSizeExceededViaDrag
});
else {
this.$zoomRect.data("dimensions", a);
var g = this;
this.$zoomRect.stop(!0, !1).animate({
left: a.left - r - F - this.bodyOffset.left,
top: a.top - r - F - this.bodyOffset.top,
width: a.width,
height: a.height
},
250, "easeOutQuad",
function() {
g.animationContext.animating =
!1
})
}
}
}
function u(a) {
this.type = "rectangle";
this.support = a.support;
this.bodyOffset = a.bodyOffset;
this.$ = a.$;
this.staticBaseUrl = a.staticBaseUrl;
this.selecting = !1;
this.baseData = a.baseData;
this.document = a.document;
this.preferences = a.preferences;
this.getExtractor = function() {
return new v.extractors.HtmlExtractor(a)
};
this.$canvasOverlay = this.$zoomRect = null;
this.dragging = !1;
this.zoomContext = {
zooming: !1,
noZoomReason: "",
lastZoom: 0,
start: {
clientX: 0,
clientY: 0
},
path: null,
current: -1,
reset: function() {
this.zooming =
!1;
this.lastZoom = 0;
this.start.clientX = -1;
this.start.clientY = -1;
this.path = null;
this.current = -1;
this.noZoomReason = "";
this.sentMetaEventToTracker = !1
},
sentMetaEventToTracker: !1
};
this.selectionData = {
startElement: null,
endElement: null
};
this.animationContext = {
animating: !1,
timeoutId: 0
}
}
var v = d.CLIPBOARD.client,
r = 2,
F = 2,
E = "rectangleSelector_" + v.util.idSuffix,
O = 5,
y = 15,
J = 10,
T = "zoom" + v.util.idSuffix,
S = "canvas" + v.util.idSuffix,
t = "bookmarkImage" + v.util.idSuffix,
z = function() {
function a(d) {
var g = this.$;
if (null === this.zoomContext.path) {
var h =
!0,
i = g(this.selectionData.startElement),
p = i;
this.zoomContext.path = i.allParents().filter(function() {
h = b(g(this), p); ! 0 === h && (p = g(this));
return ! 0 === h
}).map(function() {
return g(this)
}).toArray();
if (!0 === h) h = v.Selector.failureStatus.nowhereToZoom;
this.zoomContext.path.unshift(i);
this.zoomContext.noZoomReason = h
}
if (d) {
d = this.zoomContext.path[this.zoomContext.current + 1];
if (!d) return this.zoomContext.lastZoom && (new Date).getTime() - this.zoomContext.lastZoom > 2 * (1E3 / O) && this.trigger("selectionFailed", {
reason: this.zoomContext.noZoomReason
}),
this.zoomContext.lastZoom = (new Date).getTime(),
[];
this.zoomContext.lastZoom = (new Date).getTime();
this.zoomContext.current++;
return d
}
this.zoomContext.current = Math.max(0, this.zoomContext.current - 1);
return (d = this.zoomContext.path[this.zoomContext.current]) || []
}
var b = function() {
var a = {
head: 1,
meta: 1,
link: 1,
style: 1,
script: 1
};
return function(b, d) {
var g;
if (! (g = !b[0])) if (! (g = 1 !== b[0].nodeType)) if (! (g = b[0].nodeName.toLowerCase() in a)) {
g = v.util.getDimensions(b);
var h = v.util.getDimensions(d);
g = g.area < 0.95 * h.area ?
!1: v.util.computeOverlap(g, h).area >= 0.95 * h.area;
g = !g
}
return g ? v.Selector.failureStatus.nowhereToZoom: !v.util.shouldInclude(b, {}) ? v.Selector.failureStatus.maxSizeExceededViaZoom: !0
}
} ();
return function(b) {
var d = a.call(this, b);
if (d.length) this.zoomContext.zooming = !0,
this.trigger("zooming", {
direction: b ? "in": "out"
}),
b = d.trueOffset(),
v.util.adjustOffsetForMargins(d, b),
d.trueCoordinates(b),
this.animateTo(d[0])
}
} ();
v.util.inherit(u, new v.Selector, new v.ActivatableControl, new v.EventEmitter);
u.prototype.constructor =
u;
u.prototype.doActivate = function() {
var d = this.$;
if (!this.$zoomRect) v.util.rewritePageHtml(this.$, this.baseData, this.support),
this.$zoomRect = d("<div/>").applyBlockStyles().attr("id", T),
this.support.rgba ? this.$zoomRect.cssImportant("opacity", 1) : this.$zoomRect.cssImportant("opacity", 0.25),
v.util.applyGradient(this.$zoomRect, this.preferences.rectangleColor),
this.$bookmark = d("<img/>").applyBlockStyles().attr("id", t).attr("src", this.staticBaseUrl + "/images/1.0.17/bookmarkLarge.png").click(g(this)),
v.util.flagAsUnclippable(this.$zoomRect),
this.$canvasOverlay = d("<div/>").applyBlockStyles().attr("id", S).mousedown(i(this)).mousemove(a(this)).mouseup(g(this)).mousewheel(b(this)),
v.util.flagAsUnclippable(this.$canvasOverlay),
d("body").append(this.$canvasOverlay).append(this.$bookmark).append(this.$zoomRect),
v.util.assureFixedPositioning(this.$canvasOverlay),
v.util.assureFixedPositioning(this.$bookmark),
this.enableGlobalEvents(),
this.selecting = !0,
this.dragging = !1,
this.select()
};
u.prototype.doDeactivate = function() {
this.selecting = !1;
if (this.$zoomRect &&
this.$canvasOverlay) {
if (this.animationContext.timeoutId) this.animationContext.timeoutId = d.clearTimeout(this.animationContext.timeoutId);
var a = this,
b = this.$(this.document);
this.bookmark && n.call(this,
function() {
a.$bookmark.remove();
a.$bookmark = null
});
this.$zoomRect.animate({
width: 0,
height: 0,
left: this.$(d).width() + b.scrollLeft() - 130,
top: b.scrollTop() + 40,
opacity: 0
},
{
duration: 350,
easing: "easeInOutQuad",
complete: function() {
v.util.retireFixedPositioning(a.$zoomRect);
a.$zoomRect.remove();
a.$zoomRect = null
}
});
v.util.retireFixedPositioning(this.$canvasOverlay);
this.$canvasOverlay.remove();
this.$canvasOverlay = null;
this.disableGlobalEvents();
this.animationContext.animating = !1;
this.zoomContext.reset()
}
};
u.prototype.disableGlobalEvents = function() {
this.$(this.document).unbind("keydown." + E)
};
u.prototype.enableGlobalEvents = function() {
var a = this;
this.$(this.document).bind("keydown." + E,
function(b) {
27 === b.keyCode && (a.deactivate(), a.trigger("canceled", {
source: "escapeKey"
}))
})
};
u.prototype.zoomIn = function() {
z.call(this,
!0)
};
u.prototype.zoomOut = function() {
z.call(this, !1)
};
u.prototype.animateTo = function(a) {
var b = this.$;
if (0 <= this.animationContext.timeoutId) this.animationContext.timeoutId = clearTimeout(this.animationContext.timeoutId);
var g = null,
i = this;
if ("undefined" === typeof a.nodeType) {
if (!i.dragging) {
var t = a.clientX,
z = a.clientY,
n = b(d).width(),
b = b(d).height();
if (20 > t || t > n - 20 || 20 > z || z > b - 20) g = function() {
h.call(i)
}
}
g || (g = function() {
i.$canvasOverlay.hide();
i.$zoomRect.hide();
var b = v.util.getElementFromPoint(a.clientX,
a.clientY, i.$, i.document);
i.$canvasOverlay.show();
i.$zoomRect.show();
b && s.call(i, b)
})
} else g = function() {
a && s.call(i, a)
};
this.animationContext.timeoutId = setTimeout(g, 20)
};
u.prototype.getSelection = function() {
return {
startElement: this.selectionData.startElement,
endElement: this.selectionData.endElement
}
};
u.prototype.shouldUseAsDefault = function() {
return ! 0
};
u.prototype.setPreferences = function(a) {
this.preferences = a;
this.$zoomRect && v.util.applyGradient(this.$zoomRect, this.preferences.rectangleColor)
};
v.selectors.RectangleSelector =
u
})(window);
(function(d) {
function i(a) {
return function() {
b.call(a)
}
}
function g(a) {
return function(b) {
27 === b.keyCode && (a.deactivate(), a.trigger("canceled", {
source: "escapeKey"
}))
}
}
function b() {
var a = this.getSelection();
a.text && this.trigger("selectionEnded", {
selectionType: "text",
selectionData: a,
extractionContext: {
top: a.top,
left: a.left
}
})
}
function a(a) {
this.type = "text";
this.$ = a.$;
this.document = a.document;
this.startCoordinates = {
x: null,
y: null
};
this.activated = !1;
this.getExtractor = function() {
return new h.extractors.TextExtractor(a)
}
}
var h =
d.CLIPBOARD.client;
h.util.inherit(a, new h.Selector, new h.ActivatableControl, new h.EventEmitter);
a.prototype.constructor = a;
a.prototype.doActivate = function() {
if (!this.activated) this.activated = !0,
this.startCoordinates.x = null,
this.startCoordinates.y = null,
this.enableGlobalEvents(),
this.select()
};
a.prototype.doDeactivate = function() {
this.disableGlobalEvents();
this.activated = !1
};
a.prototype.getSelection = function() {
var a = h.util.getRangeData(this.document);
return {
fragment: a.fragment,
text: h.util.trim(a.text),
top: a.offset.top,
left: a.offset.left
}
};
a.prototype.select = b;
a.prototype.enableGlobalEvents = function() {
this.$(this.document).on("mouseup.clipboard_text_selector", i(this)).on("keydown.clipboard_text_selector", g(this))
};
a.prototype.disableGlobalEvents = function() {
this.$(this.document).off(".clipboard_text_selector")
};
a.prototype.shouldUseAsDefault = function() {
return !! h.util.trim(this.getSelection().text)
};
h.selectors.TextSelector = a
})(window);
(function(d) {
function i(a, b, d) {
function g(b) {
b = O.util.getOuterDimensions(b);
return 0 < b.area && (b.left > a.right || b.right < a.left || b.top > a.bottom || b.bottom < a.top)
}
function h(a) {
var b = n(a);
if (! (!b.hasClass(O.util.rewriteClass) && !b.is(":visible") || g(b))) if (b.attr(O.util.cullNodeAttributeFlag, !0), F.push(a), b.children().each(function() {
h(this)
}), "iframe" === a.nodeName.toLowerCase()) try {
h(b.contents()[0].documentElement)
} catch(d) {}
}
function i(a, b) {
for (var d = a, g = b; d.length && g.length;) {
d = d.next();
if (!d.length) {
d =
b;
g = a;
break
}
if (d[0] === b[0]) {
d = a;
g = b;
break
}
g = g.next();
if (g[0] === a[0]) {
d = b;
g = a;
break
}
if (!g.length) {
d = a;
g = b;
break
}
}
do
if (h(d[0]), d[0] === g[0]) break;
while (d = d.next())
}
var n = this.$,
r = this.document,
s,
u,
y,
v,
F = [];
v = !1;
if (b[0] === r.documentElement || d[0] === r.documentElement) s = r.documentElement;
else if (b[0] === d[0]) s = d[0];
else {
r = b.allParents().toArray();
v = d.allParents().toArray();
r.reverse();
v.reverse();
r.push(b[0]);
v.push(d[0]);
d = Math.max(r.length, v.length);
for (b = 0; b < d; b++) {
var E = r[b],
j = v[b];
if (E !== j) {
s = r[b - 1];
u = n(E);
y = n(j);
break
}
}
if (!s) return [];
v = !0
} (function(a) {
a.setAttribute(O.util.cullNodeAttributeFlag, !0);
var b = n(a).allParents().each(function() {
this.setAttribute(O.util.cullNodeAttributeFlag, !0)
});
F.push(a);
Array.prototype.push.apply(F, b.toArray())
})(s);
v ? i(u, y) : h(s);
return F
}
function g(a, b, d) {
var g = a.constructor;
if (a.hasClass(O.util.rewriteClass)) {
for (var a = a.contents(), h = 0, i = 0; i < a.length; i++) d.firstIteration = !1,
h = r.call(this, g(a[i]), b, d) || h;
return h
}
return 0
}
function b(a, b) {
for (var d in b) b.hasOwnProperty(d) &&
a.css(d) !== b[d] && a.css(d, b[d])
}
function a(a, b) {
var d = {},
g,
h;
for (g = 0; g < b.length; g++) {
h = b[g];
try {
d[h] = a.css(h)
} catch(i) {}
}
return d
}
function h(a, b) {
function d(b) {
void 0 === s[b] && (s[b] = a.css(b));
s[b] && (r[b] = s[b])
}
function g(a, b) {
"border" === a ? 0 !== s[a + b + "Width"] && h.each(["Style", "Width", "Color"],
function(g, h) {
d(a + b + h)
}) : d(a + b)
}
var h = a.constructor,
i = a.trueOffset(),
n = {},
r = {
marginTop: 0,
marginBottom: 0,
marginLeft: 0,
marginRight: 0,
paddingTop: 0,
paddingBottom: 0,
paddingLeft: 0,
paddingRight: 0
},
s = {
paddingLeft: parseFloat(a.css("padding-left")),
paddingRight: parseFloat(a.css("padding-right")),
paddingTop: parseFloat(a.css("padding-top")),
paddingBottom: parseFloat(a.css("padding-bottom")),
marginLeft: parseFloat(a.css("margin-left")),
marginTop: parseFloat(a.css("margin-top")),
marginRight: parseFloat(a.css("margin-right")),
marginBottom: parseFloat(a.css("margin-bottom")),
borderRightWidth: parseFloat(a.css("border-right-width")),
borderLeftWidth: parseFloat(a.css("border-left-width")),
borderTopWidth: parseFloat(a.css("border-top-width")),
borderBottomWidth: parseFloat(a.css("border-bottom-width"))
};
n.borderLeft = i.left;
n.borderTop = i.top;
n.paddingLeft = n.borderLeft + s.borderLeftWidth;
n.paddingRight = n.paddingLeft + a.width() + s.paddingLeft + s.paddingRight;
n.paddingTop = n.borderTop + s.borderTopWidth;
n.paddingBottom = n.paddingTop + a.height() + s.paddingTop + s.paddingBottom;
n.borderRight = n.paddingRight + s.borderRightWidth;
n.borderBottom = n.paddingBottom + s.borderBottomWidth;
n.marginLeft = n.borderLeft - s.marginLeft;
n.marginTop = n.borderTop - s.marginTop;
n.marginRight = n.borderRight + s.marginRight;
n.marginBottom = n.borderBottom +
s.marginBottom;
h.each(["Left", "Right", "Top", "Bottom"],
function(a, d) {
var i = "Right" === d || "Bottom" === d;
h.each(["margin", "border", "padding"],
function(a, h) {
var j = n[h + d];
i ? j <= b[d.toLowerCase()] && !("margin" !== h ? 0: 0 > s[h + d]) && g(h, d) : j >= b[d.toLowerCase()] && !("margin" !== h ? 0: 0 > s[h + d]) && g(h, d)
})
});
return r
}
function n(a, b, d) {
function g(a, d, i) {
var p = O.util.convertUnitsToPixels(a, parseFloat(b.css("font-size")));
if (!1 !== p) return p;
p = a;
switch (a) {
case "left":
case "top":
return 0;
case "right":
case "bottom":
a = "100%";
break;
case "center":
a = "50%"
}
if (!/^-?[\d\.]+%$/.test(a)) return 0;
a = parseFloat(a);
d = (d = /url\(['"]?(.+?)['"]?\)/i.exec(d)) && 1 < d.length ? d[1] : null;
if (!d) return 0;
var d = h("<img/>").attr("src", d).css({
left: "-100000px",
position: "absolute"
}).appendTo("body"),
t = d.width(),
n = d.height();
d.remove();
d = "horizontal" === i || p in {
left: 1,
right: 1
} ? t: n;
i = "horizontal" === i || p in {
left: 1,
right: 1
} ? b.width() : b.height();
return a / 100 * i - d * (a / 100)
}
var h = b.constructor,
i = b.css("background-image");
if ("none" !== i) {
var n = b.bgPosition().split(" ");
"undefined" === typeof n[1] && (n[1] = "center");
if (! (3 <= n.length)) {
n[0] = g(n[0], i, "horizontal");
n[1] = g(n[1], i, "vertical");
var r = O.util.getDimensions(b);
if (r.top < d.top || r.left < d.left) n[0] -= d.left - r.left,
n[1] -= d.top - r.top;
n[0] += "px";
n[1] += "px";
a["background-image"] = i;
a["background-position"] = n.join(" ");
a["background-attachment"] = "scroll"
}
}
}
function K(a, b, d) {
function g(a, h, t) {
n[a] < d[a] && s[a] < d[a] ? b.css(a, 0) : s[a] >= d[a] && s[a] + t <= d[h] ? b.css(a, i[a]) : b.css(a, i[a] - (d[a] - s[a]))
}
if (!a.is("param")) {
var h = a.css("position");
if (! ("static" === h || "fixed" === h)) if (b.css("position", h), "relative" !== h) {
var i = a.position();
if (! ("relative" === h && 0 === i.top && 0 === i.left)) {
var n = a.trueOffset(),
h = a.width() - Math.max(0, n.left + a.width() - d.right),
h = Math.min(d.width, h),
r = a.height() - Math.max(0, n.top + a.height() - d.bottom),
r = Math.min(d.height, r);
b.width(h);
b.height(r);
var s = a.offsetParent().offset();
g("left", "right", a.width());
g("top", "bottom", a.height())
}
}
}
}
function s(a, b) {
var d = O.util.getOuterDimensions(a),
g = O.util.computeOverlap(d, b);
this.trigger("overlapCalculated",
{
overlap: g,
sourceDimensions: d,
ratio: 0 !== d.area ? g.area / d.area: 0
});
return d.area && g.area >= 0.95 * d.area || a[0].nodeName.toLowerCase() in J || "none" !== a.css("clear") && 0 === a.children().length && 0 === d.area ? "full": "partial"
}
function u(a, b) {
function d() {
return "none" !== g(this).css("float")
}
var g = this.$,
h = this.document,
n = g(a.startElement),
r = g(a.endElement),
s = (new Date).getTime(),
u = +!!g.browser.mozilla || +!!g.browser.msie,
n = i.call(this, b, n, r);
this.trigger("searchSpaceCulled", {
elements: n
});
this.sandbox.$element.css({
width: b.width +
u,
height: b.height
});
u = g("<div/>").addClass(y);
this.sandbox.append(u);
r = {
rect: b,
firstIteration: !0
};
v.call(this, g(this.document.documentElement), u, r, !0);
u.find(":last-child").each(function() {
var a = g(this);
if (! ("inline" === a.css("display") || a.is("p,ul,ol,dl,dt,table,tr,td,th,tbody,thead,tfoot,q"))) {
var b = a.prev();
b.length || (b = a);
b.children().is(d) && a.append(g("<div/>").css("clear", "both"))
}
}); (h = this.domainHackers[h.domain]) && h.hack(u);
for (h = 0; h < n.length; ++h) n[h].removeAttribute(O.util.cullNodeAttributeFlag);
return {
clip: u,
elapsedTime: (new Date).getTime() - s
}
}
function v(a, b, d) {
if (!a.attr(O.util.cullNodeAttributeFlag)) return this.trigger("elementExtracting", {
element: a[0],
method: "rect"
}),
this.trigger("elementIgnored", {
reason: "not culled"
}),
!1;
var g = O.util.getOuterDimensions(a),
h = O.util.computeOverlap(g, d.rect),
i = s.call(this, a, d.rect);
this.trigger("elementExtracting", {
element: a[0],
method: "rect",
sourceDimensions: g,
overlap: h
}); (a = "full" === i ? r.call(this, a, b, d) : F.call(this, a, b, d)) ? this.trigger("elementExtracted",
{
method: "rect"
}) : this.trigger("elementIgnored", {
reason: "extractFull or extractPart failed"
});
return a
}
function r(d, h, i) {
this.trigger("elementExtracting", {
method: "full",
element: d[0]
});
var n = this.$;
if (3 === d[0].nodeType) return h.append(this.document.createTextNode(d[0].nodeValue)),
this.trigger("elementExtracted", {
method: "full"
}),
!0;
if (g.call(this, d, h, i)) return this.trigger("elementExtracted", {
method: "full"
}),
!0;
var o = {
reason: null
};
if (!O.util.shouldInclude(d, o)) return this.trigger("elementIgnored", {
reason: o.reason
}),
!1;
var u = d[0].nodeName.toLowerCase(),
u = u in O.util.semanticBlockTagNames || "body" === u || "html" === u || "form" === u ? "div": u;
if ("style" === u) return this.trigger("elementIgnored", {
reason: "style tag"
}),
!1;
if ("fixed" == d.css("position")) return this.trigger("elementIgnored", {
reason: "fixed position"
}),
!1;
if ("input" === u) {
o = d.prop("type");
if ("hidden" === o) return this.trigger("elementIgnored", {
reason: "unsupported input: " + o
}),
!1;
"submit" === o && (o = "button");
o = n("<" + u + "/>").attr("type", o)
} else o = u in O.util.cloneableTags ?
O.util.safeClone(d) : "canvas" === u ? n("<img/>").attr("src", d[0].toDataURL("image/png")).attr("alt", "image converted from <canvas>").attr("width", d.width()).attr("height", d.height()).css("display", "inline") : n("<" + u + "/>");
S(d, o);
var v = T.call(this, d);
if (h.hasClass(y)) v.position = "static";
h.append(o);
b(o, v); (h = this.tweakers[u]) && h.tweakFully(d, o);
if ("iframe" !== u) {
h = d.contents();
for (u = 0; u < h.length; u++) v = n(h[u]),
3 === h[u].nodeType ? o.append(this.document.createTextNode(h[u].nodeValue)) : 1 === h[u].nodeType && ("full" ===
s.call(this, v, i.rect) ? r.call(this, v, o, i) : F.call(this, v, o, i))
}
v = a(d, ["width", "height"]);
b(o, v);
K(d, o, i.rect);
i.firstIteration = !1;
this.trigger("elementExtracted", {
method: "full"
});
return ! 0
}
function F(d, i, p) {
this.trigger("elementExtracting", {
method: "partial",
element: d[0]
});
var r = this.$;
if (d.attr(O.util.doNotClipAllAttributeName)) return this.trigger("elementIgnored", {
reason: "do not clip attribute"
}),
!1;
if (3 === d[0].nodeType) return i.append(document.createTextNode(d[0].nodeValue)),
this.trigger("elementExtracted",
{
method: "partial"
}),
!0;
if (g.call(this, d, i, p)) return this.trigger("elementExtracted", {
method: "partial"
}),
!0;
var o = {
reason: null
};
if (!O.util.shouldInclude(d, o)) return this.trigger("elementIgnored", {
reason: o.reason
}),
!1;
var s = d[0].nodeName.toLowerCase(),
s = s in O.util.semanticBlockTagNames ? "div": s;
s in O.util.cloneableTags ? (o = O.util.safeClone(d), o.text("")) : o = s in O.util.tagsToConvertToDiv ? r("<div/>") : r("<" + s + "/>");
i.append(o);
i.hasClass(y) ? (o.width(p.rect.width).height(p.rect.height), o.wrap('<div style="position:relative;z-index:0;overflow:hidden;"><div style="position:relative;z-index:-9999;background-color:#FFF;">')) :
"table" === s && o.attr({
cellpadding: 0,
cellspacing: 0,
border: 0
}).css("border-collapse", "collapse"); (i = this.tweakers[s]) && i.tweakPartially(d, o);
b(o, h(d, p.rect));
var i = o,
u = p.rect,
E = a(d, ["background-clip", "background-color", "background-image", "background-origin", "background-repeat"]);
n(E, d, u);
b(i, E);
"fixed" !== d.css("position") && K(d, o, p.rect);
b(o, a(d, "display,float,clear,font-size,line-height,font-family,color,visibility,white-space".split(",")));
i = !1;
if ("iframe" !== s) {
if (d = d.contents(), d.length) for (var r =
0, J; r < d.length; r++) J = d.eq(r),
1 === J[0].nodeType ? (J.attr(O.util.cullNodeAttributeFlag) || J.is("br") || J.hasClass(O.util.rewriteClass) && J.find("br").length || 0 === O.util.getOuterDimensions(J).area) && v.call(this, J, o, p) && (i = !0) : 3 === J[0].nodeType && (i = F.call(this, J, o, p) || i)
} else try {
J = r(d.contents()[0].documentElement),
o.css("display", "inline-block"),
i = v.call(this, J, o, p)
} catch(T) {
i = !1
}
i ? this.trigger("elementExtracted", {
method: "partial"
}) : (this.trigger("elementIgnored", {
reason: "no children were extracted"
}),
o.remove());
return i
}
function E(a) {
this.$ = a.$;
this.baseData = a.baseData;
this.support = a.support;
this.document = a.document;
this.sandbox = null;
this.tweakers = {
a: new E.AnchorTweaker(this.baseData),
button: new E.ButtonTweaker,
embed: (new E.EmbedTweaker(this.baseData)).bubble("autoplayDisabled").to(this),
iframe: (new E.IframeTweaker(this.baseData)).bubble("autoplayDisabled").to(this),
img: new E.ImageTweaker(this.baseData),
input: new E.InputTweaker(this.baseData),
object: (new E.ObjectTweaker(this.baseData)).bubble("autoplayDisabled").to(this),
param: (new E.ParamTweaker(this.baseData)).bubble("autoplayDisabled").to(this),
source: new E.SourceTweaker(this.baseData),
table: new E.TableTweaker(this.baseData),
video: (new E.VideoTweaker(this.baseData)).bubble("autoplayDisabled").to(this)
};
this.domainHackers = {
"tlc.discovery.com": new E.TlcDiscoveryHacker,
"www.youtube.com": new E.YouTubeHacker
}
}
var O = d.CLIPBOARD.client,
y = O.util.clipContainerClass,
J = {
embed: 1,
param: 1,
object: 1,
video: 1,
audio: 1,
source: 1,
br: 1,
img: 1
},
T = function() {
var a = "-moz-border-bottom-left-radius,-moz-border-bottom-right-radius,-moz-border-top-left-radius,-moz-border-top-right-radius,-moz-box-shadow,-webkit-border-bottom-left-radius,-webkit-border-bottom-right-radius,-webkit-border-top-left-radius,-webkit-border-top-right-radius,-webkit-box-shadow,background-clip,background-color,background-image,background-origin,background-position,background-repeat,border-bottom-color,border-bottom-style,border-bottom-width,border-top-color,border-top-style,border-top-width,border-left-color,border-left-style,border-left-width,border-right-color,border-right-style,border-right-width,border-bottom-left-radius,border-bottom-right-radius,border-top-left-radius,border-top-right-radius,border-spacing,border-collapse,box-shadow,caption-side,clear,clip,color,content,counter-increment,counter-reset,cursor,direction,display,empty-cells,float,font-family,font-size,font-style,font-variant,font-weight,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,margin-bottom,margin-left,margin-right,margin-top,marker-offset,max-height,max-width,min-height,min-width,opacity,outline-color,outline-style,outline-width,overflow-x,overflow-y,padding-bottom,padding-left,padding-right,padding-top,page-break-after,page-break-before,page-break-inside,quotes,table-layout,text-align,text-shadow,text-decoration,text-indent,text-transform,vertical-align,visibility,white-space,word-spacing,z-index".split(",");
return function(b) {
for (var d = {},
g, h = this.document, i = 0; i < a.length; i++) {
var n = a[i];
if ("line-height" === n && b[0].currentStyle) g = b[0].currentStyle.lineHeight;
else if ("margin-right" === n && h.defaultView && h.defaultView.getComputedStyle) g = h.defaultView.getComputedStyle(b[0], null).getPropertyValue("margin-right");
else if (0 === n.indexOf("background-position")) g = b.bgPosition();
else try {
g = b.css(n)
} catch(r) {
g = null
}
g && (d[n] = g)
}
"inline" === d.display && d.clip && delete d.clip;
return d
}
} (),
S = function() {
function a(b, d, g) { (b =
b.attr(g)) && d.attr(g, b)
}
return function(b, d) {
a(b, d, "title");
a(b, d, "alt");
a(b, d, "rel")
}
} ();
O.util.inherit(E, new O.Extractor, new O.ActivatableControl, new O.EventEmitter);
O.util.merge(E.prototype, {
constructor: E,
tweakers: {},
domainHackers: {},
extract: function(a, b) {
this.activate();
this.trigger("extractionStarted", {
rect: b.rect,
selection: a
});
var d = u.call(this, a, b.rect);
a.startElement = a.endElement = null;
if (d) {
var g = d.clip,
h = O.util.compactHtml(g.html()),
g = g.text().replace(/\s+/gm, " "),
i = this.sandbox.getDimensions();
this.sandbox.empty(); - 1 !== h.indexOf("data_clipboard3141592654") && (h = h.replace("data_clipboard3141592654", "data"), h = h.replace(/classid=['"]?clsid:D27CDB6E-AE6D-11cf-96B8-444553540000['"]?/gi, ""));
this.trigger("extracted", {
elapsedTime: d.elapsedTime,
html: h,
text: g,
dimensions: i,
top: b.rect.top,
left: b.rect.left,
extractionType: b.extractionType,
clipData: b.clipData
})
} else this.trigger("nothingExtracted");
this.deactivate()
}
});
E.prototype.doActivate = function() {
if (!this.sandbox) O.util.rewritePageHtml(this.$, this.baseData,
this.support),
this.sandbox = O.util.createSandbox(this.$),
this.trigger("sandboxBuilt", {
nodeName: this.sandbox.$element[0].nodeName.toLowerCase()
})
};
E.prototype.doDeactivate = function() {
if (this.sandbox) this.sandbox.destroy(),
this.sandbox = null
};
E.prototype.type = "clip";
O.extractors.HtmlExtractor = E
})(window);
(function(d) {
function i(a) {
function b(a, i) {
if (3 === a.nodeType) 0 < a.nodeValue.length && i.appendChild(a.cloneNode(!0));
else if (1 === a.nodeType) {
var r = a.nodeName.toLowerCase();
if (!v[r]) {
s[r] ? (i.appendChild(h.util.safeClone(g(a))[0]), i = i.lastChild, r = i.getAttribute("href"), null !== r && i.setAttribute("href", h.util.normalizeUri(r, d))) : u[r] && i.firstChild && (i.appendChild(n.createElement("br")), i.appendChild(n.createElement("br")));
for (var r = 0, o = a.childNodes.length; r < o; r++) b(a.childNodes[r], i)
}
}
}
for (var d = this.baseData,
g = this.$, i = this.document.createDocumentFragment(), n = this.document, K = 0, S = a.childNodes.length, t; K < S; K++) t = a.childNodes[K],
b(t, i);
return i
}
function g(a) {
return '<blockquote class="' + n + '"><p class="' + K + '">' + a + "</p></blockquote>"
}
function b(a) {
var b = a.ownerDocument.createElement("div");
b.appendChild(a);
return b.innerHTML
}
function a(a) {
this.$ = a.$;
this.baseData = a.baseData;
this.document = a.document;
this.staticBaseUrl = a.staticBaseUrl
}
var h = d.CLIPBOARD.client,
n = "clipboard_blockquote_314159265",
K = "clipboard_blockquote_text_314159265",
s = {
b: 1,
strong: 1,
em: 1,
i: 1,
code: 1,
samp: 1,
kbd: 1,
tt: 1,
"var": 1,
a: 1,
s: 1,
del: 1,
sup: 1,
sub: 1,
ins: 1,
u: 1,
abbr: 1,
acronym: 1,
small: 1,
big: 1,
dfn: 1,
br: 1,
q: 1,
cite: 1
},
u = {
p: 1
},
v = {
script: 1,
noscript: 1,
noembed: 1,
embed: 1,
object: 1,
meta: 1,
base: 1,
head: 1,
style: 1,
noframes: 1
};
a.prototype.constructor = a;
h.util.inherit(a, new h.Extractor, new h.ActivatableControl, new h.EventEmitter);
a.prototype.extract = function(a, n) {
var s = (new Date).getTime(),
u = i.call(this, a.fragment),
v = g(b(u)),
J = h.util.createSandbox(this.$),
K = this.$("<div/>").attr("id",
h.util.addSuffix("sandbox_readiness"));
J.addSandboxCss(this.staticBaseUrl);
J.html(v);
J.append(K);
u = K.attr("id");
K.attr("id", "foo").attr("id", u);
var S = this,
t = d.setInterval(function() {
if ("-9123px" === K.css("left")) {
d.clearInterval(t);
K.remove();
J.$body.width(570);
var b = J.getDimensions();
J.destroy();
S.trigger("extracted", {
elapsedTime: (new Date).getTime() - s,
html: v,
text: a.text,
dimensions: b,
extractionType: "text",
left: n.left,
top: n.top
})
}
},
100)
};
a.prototype.type = "text";
h.extractors.TextExtractor = a
})(window);
(function(d) {
function i(d) {
this.$ = d.$;
this.baseUri = d.baseUri;
this.baseData = d.baseData
}
d = d.CLIPBOARD.client;
d.util.inherit(i, new d.Extractor, new d.ActivatableControl, new d.EventEmitter);
d.util.merge(i.prototype, {
constructor: i,
extract: function(d, b) {
this.trigger("extracted", {
elapsedTime: 0,
html: "",
text: "",
compressedHtml: "",
dimensions: {
width: 1280,
height: 1024
},
top: 0,
left: 0,
extractionType: b.extractionType
})
}
});
i.prototype.type = "bookmark";
d.extractors.BookmarkExtractor = i
})(window);
(function(d) {
function i(d) {
this.domain = d
}
i.prototype = {
hack: function() {}
};
d.CLIPBOARD.client.extractors.HtmlExtractor.DomainHacker = i
})(window); (function(d) {
function i() {}
i.prototype = {
tweakPartially: function() {},
tweakFully: function() {}
};
d.CLIPBOARD.client.extractors.HtmlExtractor.TagTweaker = i
})(window);
(function(d) {
function i() {}
d = d.CLIPBOARD.client.extractors.HtmlExtractor;
i.prototype = new d.DomainHacker("tlc.discovery.com");
i.prototype.hack = function(d) {
d.find('object[name="video-per-page-player"]').each(function() {
var b = d.constructor(this),
a = b.find('param[name="flashvars"]').attr("value").match(/clipRefId%22%3A%22(\w+?)%22/);
a && b.replaceWith('<iframe id="dit-video-embed" width="640" height="360" src="http://static.discoverymedia.com/videos/components/tlc/{refId}/snag-it-player.html?auto=no" frameborder="0" scrolling="no" allowtransparency="true"></iframe>'.replace("{refId}",
a[1]))
})
};
d.TlcDiscoveryHacker = i
})(window);
(function(d) {
function i() {}
d = d.CLIPBOARD.client.extractors.HtmlExtractor;
i.prototype = new d.DomainHacker("www.youtube.com");
i.prototype.hack = function(d) {
var b = d.find("embed"),
d = d.constructor;
if (b.length) for (var a = 0; a < b.length; ++a) {
var h = d("embed")[0];
if ((h = (h.outerHTML || (new XMLSerializer).serializeToString(h)).match(/video_id=([^&"]+)/g)) && 1 <= h.length) if ((h = /video_id=([^&"]+)/.exec(h[h.length - 1])) && 2 <= h.length) {
var i = d(b[a]).width(),
K = d(b[a]).height(),
h = '<iframe src="http://www.youtube.com/embed/{id}?wmode=transparent" width="{w}" height="{h}" frameborder="0" allowfullscreen></iframe>'.replace("{id}",
h[1]).replace("{w}", i).replace("{h}", K);
d(b[a]).replaceWith(h)
}
}
};
d.YouTubeHacker = i
})(window); (function(d) {
function i(a) {
this.baseData = a
}
function g(a, d) {
b.util.copyAttributeAndNormalize(a, d, "href", this.baseData)
}
var b = d.CLIPBOARD.client,
d = b.extractors.HtmlExtractor;
b.util.inherit(i, new d.TagTweaker);
i.prototype.tweakFully = g;
i.prototype.tweakPartially = g;
d.AnchorTweaker = i
})(window);
(function(d) {
function i() {}
var d = d.CLIPBOARD.client,
g = d.extractors.HtmlExtractor;
d.util.inherit(i, new g.TagTweaker);
i.prototype.tweakFully = function(b, a) {
a.height(b.outerHeight()).width(b.outerWidth())
};
g.ButtonTweaker = i
})(window);
(function(d) {
function i(b) {
this.baseData = b
}
var g = d.CLIPBOARD.client,
d = g.extractors.HtmlExtractor;
g.util.inherit(i, new d.TagTweaker, new g.EventEmitter);
i.prototype.tweakFully = function(b, a) {
g.util.copyAttributeAndNormalize(b, a, "src", this.baseData) && g.util.disableAutoplayForUrl(a, "src") && this.trigger("autoplayDisabled", {
source: "embed.src"
});
if (g.util.copyAttributeIfExists(b, a, "flashvars")) if (g.util.disableAutoplayForUrl(a, "flashvars")) this.trigger("autoplayDisabled", {
source: "embed.flashvars"
});
else {
var d =
a.attr("flashvars");
a.attr("flashvars", d + (d.length ? "&": "") + "autoplay=false")
}
};
d.EmbedTweaker = i
})(window);
(function(d) {
function i(b) {
this.baseData = b
}
var g = d.CLIPBOARD.client,
d = g.extractors.HtmlExtractor;
g.util.inherit(i, new d.TagTweaker, new g.EventEmitter);
i.prototype.tweakFully = function(b, a) {
g.util.copyAttributeAndNormalize(b, a, "src", this.baseData) && (g.util.disableAutoplayForUrl(a, "src") ? this.trigger("autoplayDisabled", {
source: "iframe.src"
}) : "#" === a.attr("src") && a.attr("src", "about:blank"));
g.util.copyAttributeIfExists(b, a, "scrolling");
g.util.copyAttributeIfExists(b, a, "frameborder");
g.util.copyAttributeIfExists(b,
a, "webkitAllowFullScreen");
g.util.copyAttributeIfExists(b, a, "allowFullScreen");
var d = a.attr("src");
/^http:\/\/www\.youtube\.com\/embed\//.test(d) && (d = -1 !== d.indexOf("wmode=") ? d.replace(/\bwmode=.*?([&|$])/i, "wmode=transparent$1") : d + (( - 1 === d.indexOf("?") ? "?": "&") + "wmode=transparent"), a.attr("src", d))
};
d.IframeTweaker = i
})(window);
(function(d) {
function i(a) {
this.baseData = a
}
function g(a, d) {
b.util.copyAttributeAndNormalize(a, d, "src", this.baseData)
}
var b = d.CLIPBOARD.client,
d = b.extractors.HtmlExtractor;
b.util.inherit(i, new d.TagTweaker);
i.prototype.tweakFully = function(a, d) {
g.call(this, a, d);
b.util.copyAttributeIfExists(a, d, "width");
b.util.copyAttributeIfExists(a, d, "height")
};
i.prototype.tweakPartially = g;
d.ImageTweaker = i
})(window);
(function(d) {
function i(a, d) {
"submit" === a.attr("type") ? d.attr("value", a.attr("value") || "Submit Query") : b.util.copyAttributeIfExists(a, d, "value")
}
function g() {}
var b = d.CLIPBOARD.client,
d = b.extractors.HtmlExtractor;
b.util.inherit(g, new d.TagTweaker);
g.prototype.tweakFully = i;
g.prototype.tweakPartially = i;
d.InputTweaker = g
})(window);
(function(d) {
function i(b) {
this.baseData = b
}
var g = d.CLIPBOARD.client,
d = g.extractors.HtmlExtractor;
g.util.inherit(i, new d.TagTweaker, new g.EventEmitter);
i.prototype.tweakFully = function(b, a) {
g.util.copyAttributeAndNormalize(b, a, "data", this.baseData) && g.util.disableAutoplayForUrl(a, "data") && this.trigger("autoplayDisabled", {
source: "object.data"
})
};
d.ObjectTweaker = i
})(window);
(function(d) {
function i(a, d) {
var g = a.attr("name");
if (g) switch (d.attr("name", g), g = g.toLowerCase(), g) {
case "flashvars":
d.attr("value", a.attr("value"));
b.util.disableAutoplayForUrl(d, "value") && this.trigger("autoplayDisabled", {
source: "param.flashvars"
});
break;
case "play":
case "autostart":
"false" !== d.attr("value") && (d.attr("value", "false"), this.trigger("autoplayDisabled", {
source: "param." + g
}));
break;
case "movie":
b.util.copyAttributeAndNormalize(a, d, "value", this.baseData)
}
}
function g(a) {
this.baseData = a
}
var b = d.CLIPBOARD.client,
d = b.extractors.HtmlExtractor;
b.util.inherit(g, new d.TagTweaker, new b.EventEmitter);
g.prototype.tweakFully = i;
g.prototype.tweakPartially = i;
d.ParamTweaker = g
})(window);
(function(d) {
function i(a, d) {
b.util.copyAttributeAndNormalize(a, d, "src", this.baseData);
b.util.copyAttributeIfExists(a, d, "type")
}
function g(a) {
this.baseData = a
}
var b = d.CLIPBOARD.client,
d = b.extractors.HtmlExtractor;
b.util.inherit(g, new d.TagTweaker);
g.prototype.tweakFully = i;
g.prototype.tweakPartially = i;
d.SourceTweaker = g
})(window);
(function(d) {
function i(a) {
this.baseData = a
}
function g(a, d) {
d.attr("bgcolor") && (d.css("background-color", d.css("background-color")), d.removeAttr("bgcolor"));
var g = d.attr("background");
g && (d.removeAttr("background"), d.css("background-image", "url(" + b.util.normalizeUri(g, this.baseData) + ")"))
}
var b = d.CLIPBOARD.client,
d = b.extractors.HtmlExtractor;
b.util.inherit(i, new d.TagTweaker);
i.prototype.tweakFully = g;
i.prototype.tweakPartially = g;
d.TableTweaker = i
})(window);
(function(d, i) {
function g(a) {
this.baseData = a
}
var b = d.CLIPBOARD.client,
a = b.extractors.HtmlExtractor;
b.util.inherit(g, new a.TagTweaker, new b.EventEmitter);
g.prototype.tweakFully = function(a, d) {
d.attr("src") && d.attr("src", b.util.normalizeUri(d.attr("src"), this.baseData));
d.attr("poster") && d.attr("poster", b.util.normalizeUri(d.attr("poster"), this.baseData));
d.attr("autoplay") !== i && (d.removeAttr("autoplay"), this.trigger("autoplayDisabled", {
source: "video.autoplay"
}));
d.attr("controls", "controls")
};
a.VideoTweaker =
g
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment