Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- VigLink JavaScript Library -- http://www.viglink.com
- Permission is hereby granted to create derivative works, but only for use
- with the VigLink web service.
- Copyright (c) 2014 VigLink. Rights reserved and patent(s) pending.
- */
- (function(i) {
- var e, u = function(a, b) {
- try {
- return ("function" === typeof window[b] || "object" === typeof window[b]) && a instanceof window[b]
- } catch (d) {
- }
- return !1
- }, c = {_breaker: {},each: function(a, b) {
- var d, f;
- if ("object" === c.type(a) && a.hasOwnProperty)
- for (d in a) {
- if (a.hasOwnProperty(d) && b(a[d], d) === c._breaker)
- break
- }
- else if (a) {
- d = 0;
- for (f = a.length; d < f && b(a[d], d) !== c._breaker; d++)
- ;
- }
- },extend: function(a) {
- var b, d, f, c, g = arguments.length;
- a = a || {};
- for (d = 1; d < g; d++)
- if (c = arguments[d], void 0 !== c && null !== c)
- for (f in c)
- b = c[f], a !== b &&
- void 0 !== b && (a[f] = b);
- return a
- },noop: function() {
- },type: function(a) {
- return null === a ? "null" : void 0 === a ? "undefined" : u(a, "HTMLElement") || "object" === typeof a && 1 === a.nodeType && "string" === typeof a.nodeName ? "element" : u(a, "HTMLDocument") || "object" === typeof a && ("defaultView" in a || "parentWindow" in a) ? "document" : a == a.window ? "window" : Object.prototype.toString.call(a).slice(8, -1).toLowerCase()
- }};
- c.extend(c, {addClass: function(a, b) {
- c.hasClass(a, b) || (a.className = (a.className ? a.className + " " : "") + b)
- },attrValues: function(a,
- b, d) {
- return (b = a[b]) ? b.split(d || " ") : []
- },bind: function(a, b) {
- return function() {
- return a.apply(b, arguments)
- }
- },cache: function() {
- var a = {}, b = "vglnk_" + (new Date).getTime(), d = 0;
- return function(f, c, g) {
- if (f) {
- var h = f[b];
- if (h || void 0 !== g)
- return h || (h = ++d), a[h] || (f[b] = h, a[h] = {}), void 0 !== g && (a[h][c] = g), "string" === typeof c ? a[h][c] : a[h]
- }
- }
- }(),canonicalizeHostname: function(a) {
- "string" === typeof a && (a = c.createA(a));
- return a.hostname ? a.hostname.toString().toLowerCase().replace(/^www\./, "").replace(/:.*$/, "") : ""
- },clone: function(a) {
- return c.extend({},
- a)
- },contains: function(a, b) {
- return -1 !== c.indexOf(a, b)
- },context: function(a) {
- "element" === c.type(a) && (a = a.ownerDocument);
- "document" === c.type(a) && (a = a.defaultView || a.parentWindow);
- if ("window" === c.type(a))
- return a
- },containsPII: function(a) {
- return /\b[A-Z0-9._%+-]+(?:%(?:25)*40|@)[A-Z0-9.-]+\.[A-Z]{2,4}\b/i.test(a)
- },contextIsAncestor: function(a, b) {
- for (var d = a.self; d.parent && d.parent !== d; )
- if (d = d.parent, d === b)
- return !0;
- return !1
- },cors: function(a) {
- var b, d = function() {
- eval(b.responseText)
- };
- b = new window.XMLHttpRequest;
- b.onreadystatechange = function() {
- 4 === b.readyState && 200 === b.status && d()
- };
- try {
- b.open("GET", a), b.withCredentials = !0, b.send()
- } catch (f) {
- return !1
- }
- },createA: function(a, b) {
- return c.createEl("a", {href: a,target: b})
- },createEl: function(a, b, d, f) {
- var r;
- a = (f || document).createElement(a);
- b = b || {};
- d = d || {};
- for (r in b)
- void 0 !== b[r] && (a[r] = b[r]);
- c.css(a, d);
- return a
- },css: function(a, b) {
- for (var d in b)
- try {
- a.style[d] = b[d]
- } catch (f) {
- }
- return a
- },destructing: function(a) {
- var b = !1, d;
- return function() {
- b || (d = a.apply(null, arguments),
- b = !0);
- return d
- }
- },escapeRegExp: function() {
- var a;
- return function(b) {
- a = a || RegExp("([.*+?^${}()|[\\]\\\\])", "g");
- return b.replace(a, "\\$1")
- }
- }(),eventLink: function(a) {
- var b, d = a.target || a.srcElement;
- do {
- try {
- b = d.nodeType
- } catch (f) {
- break
- }
- if (1 === b && (a = d.tagName.toUpperCase(), "A" === a || "AREA" === a))
- return d;
- d = d.parentNode
- } while (d)
- },exceptionLogger: function() {
- var a = !1, b = c.noop;
- return function(d, f) {
- if (void 0 !== f)
- a = f, b = d;
- else
- return function() {
- if (a)
- try {
- return d.apply(this, arguments)
- } catch (f) {
- b(f)
- }
- else
- return d.apply(this,
- arguments)
- }
- }
- }(),find: function(a, b) {
- var d;
- c.each(a, function(a, r) {
- if (b(a, r))
- return d = a, c._breaker
- });
- return d
- },generateNodeFilter: function() {
- var a = function(a, f) {
- var c, g;
- f = "," + f.join(",") + ",";
- c = 0;
- for (g = a.length; c < g; c++)
- if (b(a[c], f))
- return !0;
- return !1
- }, b = function(a, b) {
- return -1 !== b.indexOf("," + a + ",")
- };
- return function(d) {
- d = c.extend({custom: null,classes: [],rels: [],tags: []}, d);
- d.tags.length && (d.tags = "," + d.tags.join(",").toLowerCase() + ",");
- return function(f, r) {
- r = c.extend({ancestors: !0,self: !0}, r);
- var g = !0, h =
- !0, va = function(f, r) {
- var h;
- if (h = !(d.tags.length && b(f.nodeName.toLowerCase(), d.tags))) {
- if (h = d.classes.length) {
- h = d.classes;
- var g = c.attrValues(f, "className");
- h = a(h, g)
- }
- if (h = !h) {
- if (h = d.rels.length)
- h = d.rels, g = c.attrValues(f, "rel"), h = b(f.nodeName.toLowerCase(), ",a,") && a(h, g);
- h = !h && !("function" === c.type(d.custom) && d.custom(f, r))
- }
- }
- return h
- }, h = !r.self || va(f, !0);
- if (r.ancestors)
- for (; f.parentNode; )
- if (f = f.parentNode, 1 === f.nodeType && !va(f, !1)) {
- g = !1;
- break
- }
- return h && g
- }
- }
- }(),fromQuery: function(a) {
- "?" === a.substr(0, 1) &&
- (a = a.substr(1));
- a = a.split("\x26");
- var b = {};
- c.each(a, function(a) {
- a = a.split("\x3d");
- b[decodeURIComponent(a[0])] = decodeURIComponent(a[1])
- });
- return b
- },geometry: function() {
- var a, b = arguments.length, d = Infinity, f = Infinity, r = -Infinity, g = -Infinity, h;
- for (a = 0; a < b; a++)
- h = c.position(arguments[a]), d = Math.min(d, h.x), f = Math.min(f, h.y), r = Math.max(r, h.x + arguments[a].offsetWidth), g = Math.max(g, h.y + arguments[a].offsetHeight);
- return {x: d,y: f,w: r - d,h: g - f,x1: d,y1: f,x2: r,y2: g}
- },getActualHref: function(a) {
- return c.cache(a, "href") ||
- a.href
- },hasAttrValue: function(a, b, d, f) {
- return b ? c.contains(c.attrValues(a, b, f), d) : !1
- },hasClass: function(a, b) {
- return c.hasAttrValue(a, "className", b)
- },hasRel: function(a, b) {
- return c.hasAttrValue(a, "rel", b)
- },indexOf: Array.prototype.indexOf ? function(a, b) {
- return Array.prototype.indexOf.call(a, b)
- } : function(a, b) {
- var d, f;
- d = 0;
- for (f = a.length; d < f; d++)
- if (a[d] === b)
- return d;
- return -1
- },isArray: function(a) {
- return "array" === c.type(a)
- },isDefaultPrevented: function(a) {
- return a.isDefaultPrevented && a.isDefaultPrevented() ||
- !1 === a.returnValue || !0 === a.defaultPrevented
- },jsonp: function(a) {
- var b = document.getElementsByTagName("script")[0];
- a = c.createEl("script", {type: "text/javascript",src: a});
- b.parentNode.insertBefore(a, b)
- },map: function(a, b) {
- var d = [];
- c.each(a, function(a, c) {
- void 0 !== a && (d[c] = b(a))
- });
- return d
- },matches: function() {
- try {
- return this.Sizzle.matchesSelector.apply(this.Sizzle, arguments)
- } catch (a) {
- return !0
- }
- },on: function() {
- var a;
- return function(b, d, f) {
- var r, g;
- if (1 === arguments.length)
- a = b;
- else {
- if (2 === arguments.length) {
- if (!a)
- return;
- f = d;
- d = b;
- b = a
- }
- try {
- r = b["on" + d]
- } catch (h) {
- }
- "function" === typeof r && (b["on" + d] = c.bind(function(a) {
- a = a || window.event;
- var d = r.apply(b, arguments);
- this.exceptionLogger(function() {
- return a ? (void 0 !== d && !1 !== a.returnValue && (a.returnValue = d), c.isDefaultPrevented(a) && "function" === c.type(a.preventDefault) && a.preventDefault(), a.returnValue) : d
- })()
- }, this));
- g = c.exceptionLogger(function() {
- if (a.enabled())
- return f.apply(null, arguments)
- });
- b.addEventListener ? b.addEventListener(d, g, !1) : b.attachEvent && b.attachEvent("on" + d,
- g)
- }
- }
- }(),position: function(a) {
- var b, d = 0, f = 0, c = 0, g = 0;
- if (!a.offsetParent)
- return !1;
- b = a;
- do
- d += b.offsetLeft, f += b.offsetTop, b = b.offsetParent;
- while (b);
- b = a;
- do
- c += b.scrollLeft, g += b.scrollTop, b = b.parentNode;
- while (b && b !== document.body);
- return {x: d - c,y: f - g}
- },preventDefault: function(a) {
- a.preventDefault && a.preventDefault();
- return a.returnValue = !1
- },ready: function() {
- var a = !1, b = [], d = !1, f, r, g, h, e;
- document.addEventListener ? g = function() {
- document.removeEventListener("DOMContentLoaded", g, !1);
- e()
- } : document.attachEvent && (h =
- function() {
- "complete" === document.readyState && (document.detachEvent("onreadystatechange", h), e())
- });
- f = function() {
- if (!a) {
- a = !0;
- if ("interactive" === document.readyState || "complete" === document.readyState)
- return e();
- if (document.addEventListener)
- document.addEventListener("DOMContentLoaded", g, !1);
- else if (document.attachEvent) {
- document.attachEvent("onreadystatechange", h);
- var b = !1;
- try {
- b = null === window.frameElement
- } catch (d) {
- }
- document.documentElement.doScroll && b && r()
- }
- c.on(window, "load", e)
- }
- };
- r = function() {
- if (!d) {
- try {
- document.documentElement.doScroll("left")
- } catch (a) {
- setTimeout(c.exceptionLogger(r),
- 1);
- return
- }
- e()
- }
- };
- e = function() {
- if (!d) {
- if (!document.body)
- return setTimeout(c.exceptionLogger(e), 13);
- d = !0;
- b && (c.each(b, function(a) {
- a()
- }), b = null)
- }
- };
- return function(a) {
- f();
- d ? a() : b.push(a)
- }
- }(),reformatKeys: function(a) {
- var b, d, f = function(a) {
- return "_" + a.toLowerCase()
- };
- for (b in a)
- d = b.replace(/([A-Z])/g, f), "object" === c.type(a[b]) && (a[b] = c.reformatKeys(a[b])), d !== b && (a[d] = a[b], delete a[b]);
- return a
- },removeClass: function(a, b) {
- if (c.hasClass(a, b)) {
- var d, f, r = c.attrValues(a, "className");
- d = 0;
- for (f = r.length; d < f; d++)
- r[d] ===
- b && delete r[d];
- a.className = r.join(" ")
- }
- },request: function(a, b, d) {
- var f, r;
- d = c.extend({fn: c.noop,"return": !1,timeout: null}, d);
- "string" === typeof d.fn ? b = c.extend(b, {jsonp: d.fn}) : "function" === typeof d.fn && (f = c.destructing(d.fn), r = c.uniqid("vglnk_jsonp_"), b = c.extend(b, {jsonp: r}), window[r] = c.exceptionLogger(function() {
- f.apply(this, arguments);
- window[r] = void 0
- }), null !== d.timeout && setTimeout(c.exceptionLogger(f), d.timeout));
- b = c.extend({format: "jsonp"}, b);
- b = c.toQuery(b);
- a = a + (b.length ? "?" : "") + b;
- return d["return"] ?
- a : c.traits.cors && !1 !== c.cors(a) ? !0 : c.jsonp(a)
- },select: function() {
- try {
- return this.Sizzle.apply(this.Sizzle, arguments)
- } catch (a) {
- return []
- }
- },toArray: function(a) {
- if (a && void 0 !== a.length)
- try {
- return Array.prototype.slice.call(a, 0)
- } catch (b) {
- var d, f, c = [];
- d = 0;
- for (f = a.length; d < f; d++)
- c[d] = a[d];
- return c
- }
- },toQuery: function(a) {
- var b, d = "";
- for (b in a)
- null !== a[b] && void 0 !== a[b] && (d += "\x26" + encodeURIComponent(b) + "\x3d" + encodeURIComponent(a[b]));
- return d.substr(1)
- },transmitsPII: function(a) {
- return c.containsPII(a + " " +
- document.referrer)
- },updateUrl: function(a, b) {
- return c.extend(c.createA(a), b).href
- },uniqid: function() {
- var a = 0;
- return function(b) {
- return (b || "") + (new Date).getTime() + a++
- }
- }()});
- var p = function() {
- var a = c.find(c.toArray(arguments), function(a) {
- return "function" === c.type(a)
- });
- a && (c.Sizzle = a())
- };
- p.amd = !0;
- var t = window, m = function(a, b, d, f) {
- var c, g, h, e, H;
- (b ? b.ownerDocument || b : x) !== B && O(b);
- b = b || B;
- d = d || [];
- if (!a || "string" !== typeof a)
- return d;
- if (1 !== (e = b.nodeType) && 9 !== e)
- return [];
- if (I && !f) {
- if (c = Ma.exec(a))
- if (h = c[1])
- if (9 ===
- e)
- if ((g = b.getElementById(h)) && g.parentNode) {
- if (g.id === h)
- return d.push(g), d
- } else
- return d;
- else {
- if (b.ownerDocument && (g = b.ownerDocument.getElementById(h)) && ca(b, g) && g.id === h)
- return d.push(g), d
- }
- else {
- if (c[2])
- return P.apply(d, b.getElementsByTagName(a)), d;
- if ((h = c[3]) && l.getElementsByClassName && b.getElementsByClassName)
- return P.apply(d, b.getElementsByClassName(h)), d
- }
- if (l.qsa && (!C || !C.test(a))) {
- g = c = z;
- h = b;
- H = 9 === e && a;
- if (1 === e && "object" !== b.nodeName.toLowerCase()) {
- e = o(a);
- (c = b.getAttribute("id")) ? g = c.replace(Na,
- "\\$\x26") : b.setAttribute("id", g);
- g = "[id\x3d'" + g + "'] ";
- for (h = e.length; h--; )
- e[h] = g + q(e[h]);
- h = na.test(a) && W(b.parentNode) || b;
- H = e.join(",")
- }
- if (H)
- try {
- return P.apply(d, h.querySelectorAll(H)), d
- } catch (i) {
- }finally {
- c || b.removeAttribute("id")
- }
- }
- }
- var j;
- a: {
- a = a.replace(fa, "$1");
- g = o(a);
- if (!f && 1 === g.length) {
- c = g[0] = g[0].slice(0);
- if (2 < c.length && "ID" === (j = c[0]).type && l.getById && 9 === b.nodeType && I && k.relative[c[1].type]) {
- b = (k.find.ID(j.matches[0].replace(Q, R), b) || [])[0];
- if (!b) {
- j = d;
- break a
- }
- a = a.slice(c.shift().value.length)
- }
- for (e =
- ga.needsContext.test(a) ? 0 : c.length; e--; ) {
- j = c[e];
- if (k.relative[h = j.type])
- break;
- if (h = k.find[h])
- if (f = h(j.matches[0].replace(Q, R), na.test(c[0].type) && W(b.parentNode) || b)) {
- c.splice(e, 1);
- a = f.length && q(c);
- if (!a) {
- P.apply(d, f);
- j = d;
- break a
- }
- break
- }
- }
- }
- oa(a, g)(f, b, !I, d, na.test(a) && W(b.parentNode) || b);
- j = d
- }
- return j
- }, s = function() {
- function a(d, f) {
- b.push(d + " ") > k.cacheLength && delete a[b.shift()];
- return a[d + " "] = f
- }
- var b = [];
- return a
- }, v = function(a) {
- a[z] = !0;
- return a
- }, A = function(a) {
- var b = B.createElement("div");
- try {
- return !!a(b)
- } catch (d) {
- return !1
- }finally {
- b.parentNode &&
- b.parentNode.removeChild(b)
- }
- }, X = function(a, b) {
- for (var d = a.split("|"), f = a.length; f--; )
- k.attrHandle[d[f]] = b
- }, E = function(a, b) {
- var d = b && a, f = d && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || wa) - (~a.sourceIndex || wa);
- if (f)
- return f;
- if (d)
- for (; d = d.nextSibling; )
- if (d === b)
- return -1;
- return a ? 1 : -1
- }, Y = function(a) {
- return function(b) {
- return "input" === b.nodeName.toLowerCase() && b.type === a
- }
- }, Z = function(a) {
- return function(b) {
- var d = b.nodeName.toLowerCase();
- return ("input" === d || "button" === d) && b.type === a
- }
- }, D = function(a) {
- return v(function(b) {
- b =
- +b;
- return v(function(d, f) {
- for (var c, g = a([], d.length, b), h = g.length; h--; )
- if (d[c = g[h]])
- d[c] = !(f[c] = d[c])
- })
- })
- }, W = function(a) {
- return a && typeof a.getElementsByTagName !== $ && a
- }, aa = function() {
- }, o = function(a, b) {
- var d, f, c, g, h, e, H;
- if (h = xa[a + " "])
- return b ? 0 : h.slice(0);
- h = a;
- e = [];
- for (H = k.preFilter; h; ) {
- if (!d || (f = Oa.exec(h)))
- f && (h = h.slice(f[0].length) || h), e.push(c = []);
- d = !1;
- if (f = Pa.exec(h))
- d = f.shift(), c.push({value: d,type: f[0].replace(fa, " ")}), h = h.slice(d.length);
- for (g in k.filter)
- if ((f = ga[g].exec(h)) && (!H[g] || (f =
- H[g](f))))
- d = f.shift(), c.push({value: d,type: g,matches: f}), h = h.slice(d.length);
- if (!d)
- break
- }
- return b ? h.length : h ? m.error(a) : xa(a, e).slice(0)
- }, q = function(a) {
- for (var b = 0, d = a.length, f = ""; b < d; b++)
- f += a[b].value;
- return f
- }, L = function(a, b, d) {
- var f = b.dir, c = d && "parentNode" === f, g = Qa++;
- return b.first ? function(b, d, g) {
- for (; b = b[f]; )
- if (1 === b.nodeType || c)
- return a(b, d, g)
- } : function(b, d, e) {
- var o, j, i, s = J + " " + g;
- if (e)
- for (; b = b[f]; ) {
- if ((1 === b.nodeType || c) && a(b, d, e))
- return !0
- }
- else
- for (; b = b[f]; )
- if (1 === b.nodeType || c)
- if (i = b[z] || (b[z] =
- {}), (j = i[f]) && j[0] === s) {
- if (!0 === (o = j[1]) || o === K)
- return !0 === o
- } else if (j = i[f] = [s], j[1] = a(b, d, e) || K, !0 === j[1])
- return !0
- }
- }, n = function(a) {
- return 1 < a.length ? function(b, d, f) {
- for (var c = a.length; c--; )
- if (!a[c](b, d, f))
- return !1;
- return !0
- } : a[0]
- }, ha = function(a, b, d, f, c) {
- for (var g, h = [], e = 0, H = a.length, o = null != b; e < H; e++)
- if (g = a[e])
- if (!d || d(g, f, c))
- h.push(g), o && b.push(e);
- return h
- }, pa = function(a, b, d, f, c, e) {
- f && !f[z] && (f = pa(f));
- c && !c[z] && (c = pa(c, e));
- return v(function(h, e, g, o) {
- var j, i, s = [], q = [], n = e.length, l;
- if (!(l = h)) {
- l = b ||
- "*";
- for (var k = g.nodeType ? [g] : g, p = [], v = 0, t = k.length; v < t; v++)
- m(l, k[v], p);
- l = p
- }
- l = a && (h || !b) ? ha(l, s, a, g, o) : l;
- k = d ? c || (h ? a : n || f) ? [] : e : l;
- d && d(l, k, g, o);
- if (f) {
- j = ha(k, q);
- f(j, [], g, o);
- for (g = j.length; g--; )
- if (i = j[g])
- k[q[g]] = !(l[q[g]] = i)
- }
- if (h) {
- if (c || a) {
- if (c) {
- j = [];
- for (g = k.length; g--; )
- if (i = k[g])
- j.push(l[g] = i);
- c(null, k = [], j, o)
- }
- for (g = k.length; g--; )
- if ((i = k[g]) && -1 < (j = c ? U.call(h, i) : s[g]))
- h[j] = !(e[j] = i)
- }
- } else
- k = ha(k === e ? k.splice(n, k.length) : k), c ? c(null, e, k, o) : P.apply(e, k)
- })
- }, w = function(a) {
- var b, d, c, r = a.length, g = k.relative[a[0].type];
- d = g || k.relative[" "];
- for (var h = g ? 1 : 0, e = L(function(a) {
- return a === b
- }, d, !0), j = L(function(a) {
- return -1 < U.call(b, a)
- }, d, !0), o = [function(a, d, c) {
- return !g && (c || d !== ia) || ((b = d).nodeType ? e(a, d, c) : j(a, d, c))
- }]; h < r; h++)
- if (d = k.relative[a[h].type])
- o = [L(n(o), d)];
- else {
- d = k.filter[a[h].type].apply(null, a[h].matches);
- if (d[z]) {
- for (c = ++h; c < r && !k.relative[a[c].type]; c++)
- ;
- return pa(1 < h && n(o), 1 < h && q(a.slice(0, h - 1).concat({value: " " === a[h - 2].type ? "*" : ""})).replace(fa, "$1"), d, h < c && w(a.slice(h, c)), c < r && w(a = a.slice(c)), c < r && q(a))
- }
- o.push(d)
- }
- return n(o)
- },
- y, l, K, k, ja, M, oa, ia, S, ba, O, B, N, I, C, V, ka, ca, z = "sizzle" + -new Date, x = t.document, J = 0, Qa = 0, ya = s(), xa = s(), za = s(), qa = function(a, b) {
- a === b && (ba = !0);
- return 0
- }, $ = "undefined", wa = -2147483648, Ra = {}.hasOwnProperty, T = [], Sa = T.pop, Ta = T.push, P = T.push, Aa = T.slice, U = T.indexOf || function(a) {
- for (var b = 0, d = this.length; b < d; b++)
- if (this[b] === a)
- return b;
- return -1
- }, Ba = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w", "w#"), Ca = "\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?\x3d)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" +
- Ba + ")|)|)[\\x20\\t\\r\\n\\f]*\\]", ra = ":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + Ca.replace(3, 8) + ")*)|.*)\\)|)", fa = RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$", "g"), Oa = /^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/, Pa = /^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/, Ua = RegExp("\x3d[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]", "g"), Va = RegExp(ra), Wa = RegExp("^" + Ba + "$"), ga = {ID: /^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,
- CLASS: /^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG: RegExp("^(" + "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w", "w*") + ")"),ATTR: RegExp("^" + Ca),PSEUDO: RegExp("^" + ra),CHILD: RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)", "i"),bool: RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$",
- "i"),needsContext: RegExp("^[\\x20\\t\\r\\n\\f]*[\x3e+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?\x3d[^-]|$)", "i")}, Xa = /^(?:input|select|textarea|button)$/i, Ya = /^h\d$/i, da = /^[^{]+\{\s*\[native \w/, Ma = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, na = /[+~]/, Na = /'|\\/g, Q = RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig"), R = function(a, b, d) {
- a = "0x" + b - 65536;
- return a !== a || d ? b : 0 > a ? String.fromCharCode(a + 65536) : String.fromCharCode(a >>
- 10 | 55296, a & 1023 | 56320)
- };
- try {
- P.apply(T = Aa.call(x.childNodes), x.childNodes), T[x.childNodes.length].nodeType
- } catch (hb) {
- P = {apply: T.length ? function(a, b) {
- Ta.apply(a, Aa.call(b))
- } : function(a, b) {
- for (var d = a.length, c = 0; a[d++] = b[c++]; )
- ;
- a.length = d - 1
- }}
- }
- l = m.support = {};
- M = m.isXML = function(a) {
- return (a = a && (a.ownerDocument || a).documentElement) ? "HTML" !== a.nodeName : !1
- };
- O = m.setDocument = function(a) {
- var b = a ? a.ownerDocument || a : x;
- a = b.defaultView;
- if (b === B || 9 !== b.nodeType || !b.documentElement)
- return B;
- B = b;
- N = b.documentElement;
- I = !M(b);
- a && a !== a.top && (a.addEventListener ? a.addEventListener("unload", function() {
- O()
- }, !1) : a.attachEvent && a.attachEvent("onunload", function() {
- O()
- }));
- l.attributes = A(function(a) {
- a.className = "i";
- return !a.getAttribute("className")
- });
- l.getElementsByTagName = A(function(a) {
- a.appendChild(b.createComment(""));
- return !a.getElementsByTagName("*").length
- });
- l.getElementsByClassName = da.test(b.getElementsByClassName) && A(function(a) {
- a.innerHTML = "\x3cdiv class\x3d'a'\x3e\x3c/div\x3e\x3cdiv class\x3d'a i'\x3e\x3c/div\x3e";
- a.firstChild.className = "i";
- return 2 === a.getElementsByClassName("i").length
- });
- l.getById = A(function(a) {
- N.appendChild(a).id = z;
- return !b.getElementsByName || !b.getElementsByName(z).length
- });
- l.getById ? (k.find.ID = function(a, b) {
- if (typeof b.getElementById !== $ && I) {
- var c = b.getElementById(a);
- return c && c.parentNode ? [c] : []
- }
- }, k.filter.ID = function(a) {
- var b = a.replace(Q, R);
- return function(a) {
- return a.getAttribute("id") === b
- }
- }) : (delete k.find.ID, k.filter.ID = function(a) {
- var b = a.replace(Q, R);
- return function(a) {
- return (a =
- typeof a.getAttributeNode !== $ && a.getAttributeNode("id")) && a.value === b
- }
- });
- k.find.TAG = l.getElementsByTagName ? function(a, b) {
- if (typeof b.getElementsByTagName !== $)
- return b.getElementsByTagName(a)
- } : function(a, b) {
- var c, g = [], h = 0, e = b.getElementsByTagName(a);
- if ("*" === a) {
- for (; c = e[h++]; )
- 1 === c.nodeType && g.push(c);
- return g
- }
- return e
- };
- k.find.CLASS = l.getElementsByClassName && function(a, b) {
- if (typeof b.getElementsByClassName !== $ && I)
- return b.getElementsByClassName(a)
- };
- V = [];
- C = [];
- if (l.qsa = da.test(b.querySelectorAll))
- A(function(a) {
- a.innerHTML =
- "\x3cselect t\x3d''\x3e\x3coption selected\x3d''\x3e\x3c/option\x3e\x3c/select\x3e";
- a.querySelectorAll("[t^\x3d'']").length && C.push("[*^$]\x3d[\\x20\\t\\r\\n\\f]*(?:''|\"\")");
- a.querySelectorAll("[selected]").length || C.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
- a.querySelectorAll(":checked").length || C.push(":checked")
- }), A(function(a) {
- var c = b.createElement("input");
- c.setAttribute("type",
- "hidden");
- a.appendChild(c).setAttribute("name", "D");
- a.querySelectorAll("[name\x3dd]").length && C.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?\x3d");
- a.querySelectorAll(":enabled").length || C.push(":enabled", ":disabled");
- a.querySelectorAll("*,:x");
- C.push(",.*:")
- });
- (l.matchesSelector = da.test(ka = N.webkitMatchesSelector || N.mozMatchesSelector || N.oMatchesSelector || N.msMatchesSelector)) && A(function(a) {
- l.disconnectedMatch = ka.call(a, "div");
- ka.call(a, "[s!\x3d'']:x");
- V.push("!\x3d", ra)
- });
- C = C.length && RegExp(C.join("|"));
- V = V.length && RegExp(V.join("|"));
- ca = (a = da.test(N.compareDocumentPosition)) || da.test(N.contains) ? function(a, b) {
- var c = 9 === a.nodeType ? a.documentElement : a, g = b && b.parentNode;
- return a === g || !(!g || !(1 === g.nodeType && (c.contains ? c.contains(g) : a.compareDocumentPosition && a.compareDocumentPosition(g) & 16)))
- } : function(a, b) {
- if (b)
- for (; b = b.parentNode; )
- if (b === a)
- return !0;
- return !1
- };
- qa = a ? function(a, c) {
- if (a === c)
- return ba = !0, 0;
- var e = !a.compareDocumentPosition - !c.compareDocumentPosition;
- if (e)
- return e;
- e = (a.ownerDocument || a) ===
- (c.ownerDocument || c) ? a.compareDocumentPosition(c) : 1;
- return e & 1 || !l.sortDetached && c.compareDocumentPosition(a) === e ? a === b || a.ownerDocument === x && ca(x, a) ? -1 : c === b || c.ownerDocument === x && ca(x, c) ? 1 : S ? U.call(S, a) - U.call(S, c) : 0 : e & 4 ? -1 : 1
- } : function(a, c) {
- if (a === c)
- return ba = !0, 0;
- var e, g = 0;
- e = a.parentNode;
- var h = c.parentNode, o = [a], j = [c];
- if (!e || !h)
- return a === b ? -1 : c === b ? 1 : e ? -1 : h ? 1 : S ? U.call(S, a) - U.call(S, c) : 0;
- if (e === h)
- return E(a, c);
- for (e = a; e = e.parentNode; )
- o.unshift(e);
- for (e = c; e = e.parentNode; )
- j.unshift(e);
- for (; o[g] ===
- j[g]; )
- g++;
- return g ? E(o[g], j[g]) : o[g] === x ? -1 : j[g] === x ? 1 : 0
- };
- return b
- };
- m.matches = function(a, b) {
- return m(a, null, null, b)
- };
- m.matchesSelector = function(a, b) {
- (a.ownerDocument || a) !== B && O(a);
- b = b.replace(Ua, "\x3d'$1']");
- if (l.matchesSelector && I && (!V || !V.test(b)) && (!C || !C.test(b)))
- try {
- var d = ka.call(a, b);
- if (d || l.disconnectedMatch || a.document && 11 !== a.document.nodeType)
- return d
- } catch (c) {
- }
- return 0 < m(b, B, null, [a]).length
- };
- m.contains = function(a, b) {
- (a.ownerDocument || a) !== B && O(a);
- return ca(a, b)
- };
- m.attr = function(a, b) {
- (a.ownerDocument ||
- a) !== B && O(a);
- var d = k.attrHandle[b.toLowerCase()], d = d && Ra.call(k.attrHandle, b.toLowerCase()) ? d(a, b, !I) : void 0;
- return void 0 !== d ? d : l.attributes || !I ? a.getAttribute(b) : (d = a.getAttributeNode(b)) && d.specified ? d.value : null
- };
- m.error = function(a) {
- throw Error("Syntax error, unrecognized expression: " + a);
- };
- m.uniqueSort = function(a) {
- var b, d = [], c = 0, e = 0;
- ba = !l.detectDuplicates;
- S = !l.sortStable && a.slice(0);
- a.sort(qa);
- if (ba) {
- for (; b = a[e++]; )
- b === a[e] && (c = d.push(e));
- for (; c--; )
- a.splice(d[c], 1)
- }
- S = null;
- return a
- };
- ja = m.getText =
- function(a) {
- var b, d = "", c = 0;
- if (b = a.nodeType)
- if (1 === b || 9 === b || 11 === b) {
- if ("string" === typeof a.textContent)
- return a.textContent;
- for (a = a.firstChild; a; a = a.nextSibling)
- d += ja(a)
- } else {
- if (3 === b || 4 === b)
- return a.nodeValue
- }
- else
- for (; b = a[c++]; )
- d += ja(b);
- return d
- };
- k = m.selectors = {cacheLength: 50,createPseudo: v,match: ga,attrHandle: {},find: {},relative: {"\x3e": {dir: "parentNode",first: !0}," ": {dir: "parentNode"},"+": {dir: "previousSibling",first: !0},"~": {dir: "previousSibling"}},preFilter: {ATTR: function(a) {
- a[1] = a[1].replace(Q,
- R);
- a[3] = (a[4] || a[5] || "").replace(Q, R);
- "~\x3d" === a[2] && (a[3] = " " + a[3] + " ");
- return a.slice(0, 4)
- },CHILD: function(a) {
- a[1] = a[1].toLowerCase();
- "nth" === a[1].slice(0, 3) ? (a[3] || m.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && m.error(a[0]);
- return a
- },PSEUDO: function(a) {
- var b, d = !a[5] && a[2];
- if (ga.CHILD.test(a[0]))
- return null;
- if (a[3] && void 0 !== a[4])
- a[2] = a[4];
- else if (d && Va.test(d) && (b = o(d, !0)) && (b = d.indexOf(")", d.length - b) - d.length))
- a[0] = a[0].slice(0,
- b), a[2] = d.slice(0, b);
- return a.slice(0, 3)
- }},filter: {TAG: function(a) {
- var b = a.replace(Q, R).toLowerCase();
- return "*" === a ? function() {
- return !0
- } : function(a) {
- return a.nodeName && a.nodeName.toLowerCase() === b
- }
- },CLASS: function(a) {
- var b = ya[a + " "];
- return b || (b = RegExp("(^|[\\x20\\t\\r\\n\\f])" + a + "([\\x20\\t\\r\\n\\f]|$)")) && ya(a, function(a) {
- return b.test("string" === typeof a.className && a.className || typeof a.getAttribute !== $ && a.getAttribute("class") || "")
- })
- },ATTR: function(a, b, d) {
- return function(c) {
- c = m.attr(c, a);
- if (null ==
- c)
- return "!\x3d" === b;
- if (!b)
- return !0;
- c += "";
- return "\x3d" === b ? c === d : "!\x3d" === b ? c !== d : "^\x3d" === b ? d && 0 === c.indexOf(d) : "*\x3d" === b ? d && -1 < c.indexOf(d) : "$\x3d" === b ? d && c.slice(-d.length) === d : "~\x3d" === b ? -1 < (" " + c + " ").indexOf(d) : "|\x3d" === b ? c === d || c.slice(0, d.length + 1) === d + "-" : !1
- }
- },CHILD: function(a, b, d, c, e) {
- var g = "nth" !== a.slice(0, 3), h = "last" !== a.slice(-4), o = "of-type" === b;
- return 1 === c && 0 === e ? function(a) {
- return !!a.parentNode
- } : function(b, d, j) {
- var i, k, l, s, q;
- d = g !== h ? "nextSibling" : "previousSibling";
- var n = b.parentNode,
- m = o && b.nodeName.toLowerCase();
- j = !j && !o;
- if (n) {
- if (g) {
- for (; d; ) {
- for (k = b; k = k[d]; )
- if (o ? k.nodeName.toLowerCase() === m : 1 === k.nodeType)
- return !1;
- q = d = "only" === a && !q && "nextSibling"
- }
- return !0
- }
- q = [h ? n.firstChild : n.lastChild];
- if (h && j) {
- j = n[z] || (n[z] = {});
- i = j[a] || [];
- s = i[0] === J && i[1];
- l = i[0] === J && i[2];
- for (k = s && n.childNodes[s]; k = ++s && k && k[d] || (l = s = 0) || q.pop(); )
- if (1 === k.nodeType && ++l && k === b) {
- j[a] = [J, s, l];
- break
- }
- } else if (j && (i = (b[z] || (b[z] = {}))[a]) && i[0] === J)
- l = i[1];
- else
- for (; k = ++s && k && k[d] || (l = s = 0) || q.pop(); )
- if ((o ? k.nodeName.toLowerCase() ===
- m : 1 === k.nodeType) && ++l)
- if (j && ((k[z] || (k[z] = {}))[a] = [J, l]), k === b)
- break;
- l -= e;
- return l === c || 0 === l % c && 0 <= l / c
- }
- }
- },PSEUDO: function(a, b) {
- var d, c = k.pseudos[a] || k.setFilters[a.toLowerCase()] || m.error("unsupported pseudo: " + a);
- return c[z] ? c(b) : 1 < c.length ? (d = [a, a, "", b], k.setFilters.hasOwnProperty(a.toLowerCase()) ? v(function(a, d) {
- for (var e, j = c(a, b), o = j.length; o--; )
- e = U.call(a, j[o]), a[e] = !(d[e] = j[o])
- }) : function(a) {
- return c(a, 0, d)
- }) : c
- }},pseudos: {not: v(function(a) {
- var b = [], d = [], c = oa(a.replace(fa, "$1"));
- return c[z] ?
- v(function(a, b, d, e) {
- e = c(a, null, e, []);
- for (var j = a.length; j--; )
- if (d = e[j])
- a[j] = !(b[j] = d)
- }) : function(a, e, h) {
- b[0] = a;
- c(b, null, h, d);
- return !d.pop()
- }
- }),has: v(function(a) {
- return function(b) {
- return 0 < m(a, b).length
- }
- }),contains: v(function(a) {
- return function(b) {
- return -1 < (b.textContent || b.innerText || ja(b)).indexOf(a)
- }
- }),lang: v(function(a) {
- Wa.test(a || "") || m.error("unsupported lang: " + a);
- a = a.replace(Q, R).toLowerCase();
- return function(b) {
- var d;
- do
- if (d = I ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang"))
- return d =
- d.toLowerCase(), d === a || 0 === d.indexOf(a + "-");
- while ((b = b.parentNode) && 1 === b.nodeType);
- return !1
- }
- }),target: function(a) {
- var b = t.location && t.location.hash;
- return b && b.slice(1) === a.id
- },root: function(a) {
- return a === N
- },focus: function(a) {
- return a === B.activeElement && (!B.hasFocus || B.hasFocus()) && !(!a.type && !a.href && !~a.tabIndex)
- },enabled: function(a) {
- return !1 === a.disabled
- },disabled: function(a) {
- return !0 === a.disabled
- },checked: function(a) {
- var b = a.nodeName.toLowerCase();
- return "input" === b && !!a.checked || "option" === b &&
- !!a.selected
- },selected: function(a) {
- a.parentNode && a.parentNode.selectedIndex;
- return !0 === a.selected
- },empty: function(a) {
- for (a = a.firstChild; a; a = a.nextSibling)
- if (6 > a.nodeType)
- return !1;
- return !0
- },parent: function(a) {
- return !k.pseudos.empty(a)
- },header: function(a) {
- return Ya.test(a.nodeName)
- },input: function(a) {
- return Xa.test(a.nodeName)
- },button: function(a) {
- var b = a.nodeName.toLowerCase();
- return "input" === b && "button" === a.type || "button" === b
- },text: function(a) {
- var b;
- return "input" === a.nodeName.toLowerCase() && "text" ===
- a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase())
- },first: D(function() {
- return [0]
- }),last: D(function(a, b) {
- return [b - 1]
- }),eq: D(function(a, b, d) {
- return [0 > d ? d + b : d]
- }),even: D(function(a, b) {
- for (var d = 0; d < b; d += 2)
- a.push(d);
- return a
- }),odd: D(function(a, b) {
- for (var d = 1; d < b; d += 2)
- a.push(d);
- return a
- }),lt: D(function(a, b, d) {
- for (b = 0 > d ? d + b : d; 0 <= --b; )
- a.push(b);
- return a
- }),gt: D(function(a, b, d) {
- for (d = 0 > d ? d + b : d; ++d < b; )
- a.push(d);
- return a
- })}};
- k.pseudos.nth = k.pseudos.eq;
- for (y in {radio: !0,checkbox: !0,file: !0,password: !0,
- image: !0})
- k.pseudos[y] = Y(y);
- for (y in {submit: !0,reset: !0})
- k.pseudos[y] = Z(y);
- aa.prototype = k.filters = k.pseudos;
- k.setFilters = new aa;
- oa = m.compile = function(a, b) {
- var d, c = [], e = [], g = za[a + " "];
- if (!g) {
- b || (b = o(a));
- for (d = b.length; d--; )
- g = w(b[d]), g[z] ? c.push(g) : e.push(g);
- var h = 0, j = 0 < c.length, i = 0 < e.length;
- d = function(a, b, d, g, o) {
- var l, s, q, n = 0, p = "0", v = a && [], t = [], x = ia, L = a || i && k.find.TAG("*", o), w = J += null == x ? 1 : Math.random() || 0.1, z = L.length;
- o && (ia = b !== B && b, K = h);
- for (; p !== z && null != (l = L[p]); p++) {
- if (i && l) {
- for (s = 0; q = e[s++]; )
- if (q(l,
- b, d)) {
- g.push(l);
- break
- }
- o && (J = w, K = ++h)
- }
- j && ((l = !q && l) && n--, a && v.push(l))
- }
- n += p;
- if (j && p !== n) {
- for (s = 0; q = c[s++]; )
- q(v, t, b, d);
- if (a) {
- if (0 < n)
- for (; p--; )
- !v[p] && !t[p] && (t[p] = Sa.call(g));
- t = ha(t)
- }
- P.apply(g, t);
- o && (!a && 0 < t.length && 1 < n + c.length) && m.uniqueSort(g)
- }
- o && (J = w, ia = x);
- return v
- };
- d = j ? v(d) : d;
- g = za(a, d)
- }
- return g
- };
- l.sortStable = z.split("").sort(qa).join("") === z;
- l.detectDuplicates = !!ba;
- O();
- l.sortDetached = A(function(a) {
- return a.compareDocumentPosition(B.createElement("div")) & 1
- });
- A(function(a) {
- a.innerHTML = "\x3ca href\x3d'#'\x3e\x3c/a\x3e";
- return "#" === a.firstChild.getAttribute("href")
- }) || X("type|href|height|width", function(a, b, c) {
- if (!c)
- return a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2)
- });
- (!l.attributes || !A(function(a) {
- a.innerHTML = "\x3cinput/\x3e";
- a.firstChild.setAttribute("value", "");
- return "" === a.firstChild.getAttribute("value")
- })) && X("value", function(a, b, c) {
- if (!c && "input" === a.nodeName.toLowerCase())
- return a.defaultValue
- });
- A(function(a) {
- return null == a.getAttribute("disabled")
- }) || X("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
- function(a, b, c) {
- var f;
- if (!c)
- return !0 === a[b] ? b.toLowerCase() : (f = a.getAttributeNode(b)) && f.specified ? f.value : null
- });
- "function" === typeof p && p.amd ? p(function() {
- return m
- }) : "undefined" !== typeof module && module.exports ? module.exports = m : t.Sizzle = m;
- var Za = c, Da, la, F = {}, $a = navigator.userAgent.toLowerCase().replace(/\s*[()]\s*/g, "; ").replace(/(\/[\w.]+)\s+/g, "$1; ").replace(/\;\s*$/, "").split(/;\s*/);
- c.each($a, function(a) {
- la = (/[\/ :]([^\/ :]+)$/.exec(a) || [])[1];
- F[la ? a.substr(0, a.length - la.length - 1).replace(/\d*$/,
- "") : a] = la || !0
- });
- Da = {aol: F.aol,blackberry: F.blackberry,ie: F.msie,ios: F.mobile && F.safari,opera: F.opera,playstation: F.playstation,version: parseFloat(F.version || F.crios || F.msie) || !1};
- Za.browser = Da;
- var ab = {bbp: {id_finder: ["div", /^post-(\d+)$/],scope: "li .post"},hdlr: {id_finder: ["div", /^post_(\d+)$/],scope: ".post-content-area"},ipb: {id_finder: ["div", /^post_id_(\d+)$/],scope: ".post_body .post"},phpb: {id_finder: ["div.post", /^p(\d+)$/],scope: ".postbody .content,.postbody .signature"},ubb: {id_finder: ["a", /^Post(\d+)$/,
- "name"],scope: ".post_inner *[id^\x3d'body'],.post_inner .signature"},vb3: {id_finder: ["div[id], table[id]", /^post(\d+)$/],scope: "td[id^\x3d'td_post_'] div[id^\x3d'post_message_'],td[id^\x3d'td_post_'] div[id^\x3d'post_message_'] ~ div:not([class])"},vb4: {id_finder: ["li", /^post_(\d+)$/],scope: ".post-content,.postbody .content,.postbody .signature,ul.conversation-list .list-item-body"},wppr: {id_finder: ["div", /^post-(\d+)$/],scope: null}};
- c.platforms = function(a) {
- return c.extend(ab[a] || {}, {getPostIDs: function() {
- var a =
- [], d = this.id_finder;
- d && c.each(c.select(d[0]), function(c) {
- var e = d[2] || "id";
- (c = c[e] ? c[e].match(d[1]) : null) && a.push(c[1])
- });
- return a.length ? a : null
- }})
- };
- c.traits = {basicCompatibility: !(c.browser.blackberry || c.browser.playstation),cors: window.XMLHttpRequest && void 0 !== (new window.XMLHttpRequest).withCredentials,crossWindowCommunication: !c.browser.ios,jsRedirectSetsReferrer: c.browser.aol || !(c.browser.ie || c.browser.opera),quirksMode: !Boolean(window.addEventListener),windowLevelHandlers: Boolean(window.addEventListener)};
- var j, ea, G, bb = function(a) {
- var b = a.previousSibling, d = a.nextSibling, f = ["", a.textContent, ""], j = function(a, b) {
- for (var c = a, d = c.data; (c = c[b + "Sibling"]) && 3 === c.nodeType; )
- d += c.data;
- return d
- }, g = function(a, b, c) {
- a = a.replace(/\s+/g, " ");
- b = b.replace(/\s+/g, " ");
- c = c.replace(/\s+/g, " ");
- a = a.replace(/^\s+/, "");
- " " === b.substr(0, 1) && (b = b.substr(1), a += " " !== a.substr(a.length - 1, 1) ? " " : "");
- " " === b.substr(b.length - 1, 1) && (b = b.substr(0, b.length - 1), c = (" " !== c.substr(0, 1) ? " " : "") + c);
- c = c.replace(/\s+$/, "");
- return [a, b, c]
- };
- void 0 !==
- f[1] && (f[0] = b && 3 === b.nodeType ? j(b, "previous") : "", f[2] = d && 3 === d.nodeType ? j(d, "next") : "", f = g.apply(this, f), "" !== f[0] && "" !== f[2] && (f[0] = f[0].split(" ").reverse().slice(0, 10 + (" " === f[0].substr(f[0].length - 1, 1) ? 1 : 0)).reverse().join(" "), f[2] = f[2].split(" ").slice(0, 10).join(" "), a = {type: "context",itype: (c.cache(a, "params") || {}).type,before: f[0],after: f[2],txt: f[1],loc: location.href,out: c.getActualHref(a),v: 2}, e.log("info", c.toQuery(a))))
- }, Ea = {};
- c.harmony = {UNSAFE_QUIRKSMODE_HANDLERS: 0,LINK_LEVEL_EVENTS: -1};
- var cb = c.exceptionLogger(function() {
- var a = !0 === window.document.__v5k;
- window.document.__v5k = !0;
- a || (this.initLibEvents(), this.initNamespace(), this.initOptions(), c.exceptionLogger(c.bind(this.logException, this), !j.dev), this.initProcessors(), this.initDRApi(), this.initApi(), this.enabled() && (this.initLegacyCallbacks(), this.ping()))
- }), sa = [], ta, Fa = 1, ma = {}, db = {product_widget: "spotlight"}, ua = function() {
- var a = !1, b = {}, d = function(a) {
- return function() {
- if (a) {
- var b = c.toArray(arguments);
- b.unshift("custom", a);
- e.log.apply(this,
- b)
- }
- }
- };
- ta = null;
- c.each(ma, function(f, j) {
- j = db[j] || j;
- f.setup = f.setup || window.vglnk && window.vglnk[j + "_plugin"];
- f.setup ? (!f.run && "function" === c.type(f.setup) && (f.run = f.setup(f.opts, c.clone(c), G, d(f.opts.key)) || c.noop), f.opts.mode === e.PLUGIN_MANUAL ? b[j] = f : f.run()) : (a = !0, b[j] = f)
- });
- ma = b;
- a && (ta = setTimeout(c.exceptionLogger(ua), Math.min(Math.max(Math.pow(2, ++Fa), 100), 5E3)))
- }, eb = function(a) {
- return function() {
- delete ma[a].opts.mode;
- Fa = 1;
- clearTimeout(ta);
- ua()
- }
- }, fb = c.canonicalizeHostname(document.location), gb = c.generateNodeFilter({rels: ["norewrite",
- "noskim"],custom: function(a) {
- var b, d = "";
- try {
- b = a.hostname, d = a.protocol, b.charAt(0)
- } catch (f) {
- return !0
- }
- "" !== b && (b = c.canonicalizeHostname(a));
- return "" === b || fb === b || !d.match(/^https?:$/i) || j.norewrite[b] || !(j.rewrite_original || c.cache(a, "type"))
- }}), Ga, Ha = !1, Ia = {}, Ja = !1, Ka = [], La = function(a) {
- if (void 0 === a)
- return Ka;
- "function" === c.type(a) && (Ka.push({id: c.uniqid(),fn: a}), Ja && this.initLinks())
- };
- La(function() {
- Ja = !0
- });
- e = {PLUGIN_MANUAL: 1,api: function(a, b, d) {
- a = j.api_url + "/" + a;
- b = c.extend({cuid: j.cuid,key: j.key,
- drKey: j.key ? null : j.dr_key,loc: location.href,subId: j.sub_id,v: 1}, b);
- b.subId && b.key !== j.key && (b.subId = null);
- return c.request(a, b, d)
- },addEventListener: function(a, b) {
- this.fire(a, b)
- },click: function(a, b) {
- var d, f, e, g, h = c.context(a) || window;
- b = a.target || b;
- b = !b || b === h.name || "_top" === b && h.top === h || "_parent" === b && h.parent === h ? "_self" : b;
- "_self" === b ? e = h : c.traits.crossWindowCommunication && c.traits.jsRedirectSetsReferrer ? (f = h.open("", b), f.focus(), e = f) : e = void 0;
- if ("_self" !== b && (!c.traits.crossWindowCommunication ||
- !c.traits.jsRedirectSetsReferrer))
- g = "go";
- else
- try {
- if (void 0 === e.document)
- throw !0;
- g = "jsonp"
- } catch (o) {
- g = "go"
- }
- d = c.destructing(c.bind(function() {
- j.time_click && arguments.length && this.logTime("clk");
- var d = c.toArray(arguments);
- d.unshift(a, e, b);
- this.onApiClick.apply(this, d)
- }, this));
- c.cache(this, "link", "string" === typeof a ? a : c.getActualHref(a));
- if ("string" === typeof a && (a = c.createA(a, b), !this.processLink(a)) || !j.enabled)
- return d();
- f = this.clickParams(a, g);
- this.logTime();
- j.log_context && bb(a);
- if ("go" === g)
- this.redirect(this.api("click",
- f, {"return": !0}), h, e, b);
- else if (e === h)
- this.api("click", f, {fn: d,timeout: j.click_timeout});
- else {
- if (c.contextIsAncestor(h, e))
- return this.redirect(c.getActualHref(a), h, e, b);
- d = c.exceptionLogger(d);
- setTimeout(function() {
- d()
- }, j.click_timeout);
- e.document.open();
- e.callback = d;
- e.document.write("\x3chtml\x3e\x3chead\x3e\x3ctitle\x3e" + c.getActualHref(a) + '\x3c/title\x3e\x3cscript type\x3d"text/javascript" src\x3d"' + this.api("click", f, {fn: "callback","return": !0}) + '"\x3e\x3c/script\x3e\x3c/head\x3e\x3c/html\x3e');
- e.document.close()
- }
- },clickParams: function(a, b) {
- var d = c.extend(c.cache(a, "params"), {format: b,libId: j.library_id,out: c.getActualHref(a),ref: window.document.referrer || null,reaf: j.reaffiliate || null,title: window.document.title,txt: a.innerHTML});
- 128 < d.txt.length && (d.txt = d.txt.replace(/<[^>]+>/g, ""), d.txt = 128 < d.txt.length ? d.txt.substr(0, 125) + "..." : d.txt);
- return d
- },enabled: function() {
- if (j.enabled && ea !== window && window.vglnk && (window.vglnk.key || "function" === typeof window.vglnk))
- j.enabled = !1;
- return j.enabled
- },
- expose: function(a, b) {
- if (b = b || this[a])
- "function" === typeof b ? b = c.exceptionLogger(c.bind(b, this)) : "object" === typeof b && (b = c.clone(b)), G[a] || (G[a] = b)
- },fire: function(a, b) {
- a = a.toLowerCase();
- var d = Ea[a] || {fired: !1,listeners: []};
- "function" === typeof b ? d.fired ? b({type: a}) : d.listeners.push(b) : (d.fired = !0, c.each(d.listeners, function(b) {
- "function" === typeof b && b({type: a})
- }), d.listeners = []);
- Ea[a] = d
- },handleRightClick: function(a, b) {
- if (j.rewrite_modified && a && b)
- switch (b) {
- case "setup":
- c.cache(a, "href") || c.cache(a, "href",
- a.href);
- a.href = this.api("click", this.clickParams(a, "go"), {"return": !0});
- setTimeout(c.exceptionLogger(c.bind(function() {
- this.handleRightClick(a, "teardown")
- }, this)), 0);
- break;
- case "teardown":
- a.href = c.cache(a, "href"), c.cache(a, "href", null)
- }
- },harmony: function(a) {
- return j.harmony_level <= a
- },init: cb,initApi: function() {
- var a, b = {};
- if (window.vglnk)
- for (a in window.vglnk)
- "_plugin" === a.substr(-7) && (b[a] = window.vglnk[a]);
- G = ea[i] = c.noop;
- this.expose("click");
- this.expose("link", c.bind(function(a) {
- "element" === c.type(a) &&
- a.href && (this.initContext(c.context(a)), this.processLink(a))
- }, this));
- this.expose("open", c.bind(this.click, this));
- this.expose("$", c.clone(c));
- this.expose("api");
- this.expose("opt");
- this.expose("registerProcessor", function() {
- if (0 < arguments.length)
- return e.registerProcessor.apply(e, arguments)
- });
- c.extend(G, G === window.vglnk ? b : {})
- },initContext: function(a) {
- if (void 0 === a)
- return sa;
- a && !c.contains(sa, a) && (sa.push(a), this.initLinks(a), this.initEvents(a))
- },initDRApi: function() {
- var a = !1;
- window.DrivingRevenue = c.exceptionLogger(c.destructing(c.bind(function() {
- a =
- !0;
- j.dr_key = window.DR_id;
- this.enabled() && this.ping()
- }, this)));
- c.on("DOMReady", function() {
- if (!a)
- try {
- delete window.DrivingRevenue
- } catch (b) {
- window.DrivingRevenue = void 0
- }
- })
- },initEvents: function(a) {
- var b = {left: e.onClick,right: e.onContextmenu}, d = {left: c.noop,right: c.noop}, f = c.traits.windowLevelHandlers ? a : a.document, j = function(f) {
- f = f || a.event;
- if ((f = c.eventLink(f)) && !c.cache(f, "evented"))
- g(f, e.harmony(c.harmony.LINK_LEVEL_EVENTS) ? b : d), c.cache(f, "evented", !0)
- }, g = function(a, b) {
- c.on(a, "click", c.bind(b.left,
- e));
- c.on(a, "contextmenu", c.bind(b.right, e))
- };
- c.on(f, "copy", c.bind(e.onCopy, e));
- c.on(f, "mousedown", j);
- if (e.harmony(c.harmony.LINK_LEVEL_EVENTS))
- c.on("DOMReady", function() {
- c.each(a.document.links, function(a) {
- c.on(a, "mousedown", j)
- })
- });
- (!c.traits.quirksMode || e.harmony(c.harmony.UNSAFE_QUIRKSMODE_HANDLERS)) && g(f, b)
- },initLegacyOptions: function() {
- var a, b = {DR_id: "dr_key",vglnk_api_key: "key",vglnk_cuid: "cuid",vglnk_domain: "api_url",vglnk_reaf: "reaffiliate",vglnk_subid: "sub_id"};
- for (a in b)
- void 0 !== window[a] &&
- (G[b[a]] = window[a], "vglnk_domain" === a && (G[b[a]] += "/api"))
- },initLegacyCallbacks: function() {
- var a, b = {vl_cB: c.bind(this.onApiClick, this),vl_disable: function() {
- j.enabled = !1
- }};
- for (a in b)
- window[a] = b[a]
- },initLibEvents: function() {
- c.on(e);
- c.ready(c.bind(function() {
- this.fire("DOMReady")
- }, this))
- },initLinks: function(a) {
- var b = c.bind(function(a) {
- c.each(c.toArray(a.document.links), c.bind(this.processLink, this))
- }, this);
- void 0 === a ? c.each(this.initContext(), b) : b(a)
- },initNamespace: function() {
- window.vglnk && window.vglnk.key &&
- (i = "vglnk");
- var a = window, b = i.split("."), c;
- for (i = b.pop(); 0 < b.length; )
- c = b.shift(), a[c] = a[c] || {}, a = a[c];
- ea = a;
- G = ea[i] = ea[i] || {}
- },initOptions: function() {
- var a;
- this.initLegacyOptions();
- j = c.extend(this.publicOptions({api_url: "//api.viglink.com/api",asset_url: "//cdn.viglink.com/api",cuid: null,dev: !1,dr_key: null,enabled: c.traits.basicCompatibility,key: null,partner: null,sub_id: null,reaffiliate: !1,harmony_level: 0,rewrite_original: !0,rewrite_modified: !1}), j, G, {click_timeout: 1E3,hop_timeout: 2E3,debug: !1,library_id: null,
- log_context: !0,nofollow: {},norewrite: {},plugins: {link_affiliation: {},modified_clicks: {},partner_integration: {}},time_click: !1,time_ping: !1,testing_js: []});
- for (a in j)
- "_plugin" === a.substr(-7) && delete j[a]
- },initPlugins: function(a) {
- for (var b in a)
- "object" === typeof a[b] && !1 !== a[b].enabled && (ma[b] = {opts: a[b]}, a[b].mode === this.PLUGIN_MANUAL && this.expose("init_" + b, eb(b)));
- ua()
- },initProcessors: function() {
- this.registerProcessor(function(a) {
- var b;
- b = c.createA(j.api_url);
- if ("/api/click" === a.pathname && (a.hostname ===
- b.hostname || a.hostname.match(/(^|\.)(api|cdn|apicdn)\.viglink\.com$/)))
- b = c.fromQuery(a.search), void 0 !== b.out && (a.href = b.out, delete b.out, c.cache(a, "params", b))
- });
- this.registerProcessor(function(a) {
- j.nofollow[a.href] && !c.hasRel(a, "nofollow") && (a.rel = (a.rel ? a.rel + " " : "") + "nofollow")
- });
- this.registerProcessor(function(a) {
- window.IPBoard && (window.IPBoard.prototype && window.IPBoard.prototype.delegate && c.hasRel(a, "external")) && (a.rel = a.rel.replace(/(^| )external( |$)/, ""), a.target = "_blank")
- })
- },isRewritable: function(a) {
- return gb(a,
- {ancestors: !1})
- },log: function(a, b, d, f) {
- var e, g = c.toQuery({nocache: c.uniqid()});
- e = "pixel.gif";
- if ("custom" === a)
- g += "\x26" + c.toQuery({key: b,type: d}), c.each("array" === c.type(f) ? f : [f], function(a) {
- c.each(["e", "i", "o"], function(b) {
- delete a[b]
- });
- g += "\x26" + c.toQuery(a)
- });
- else {
- g += "\x26" + c.toQuery({key: j.key,drKey: j.key ? null : j.dr_key});
- if ("time" === a)
- e = "time.gif", a = {libId: j.library_id,time: d,type: b};
- else if ("exception" === a)
- a = {e: b,o: d};
- else if ("info" === a)
- a = {i: b};
- else
- return;
- g += "\x26" + c.toQuery(a)
- }
- e = j.api_url + "/" +
- e + "?" + g;
- c.transmitsPII(e) || (c.createEl("img").src = e)
- },logException: function(a) {
- if (j.debug) {
- var b = {link: c.cache(this, "link"),loc: document.location.href,UA: navigator.userAgent};
- "string" === typeof a ? b.message = a : b = c.extend(b, a);
- this.log("exception", a, c.toQuery(b))
- }
- },logTime: function(a) {
- 0 === arguments.length ? Ga = (new Date).getTime() : this.log("time", a, (new Date).getTime() - Ga)
- },onApiClick: function(a, b, d, e, o) {
- var g = e || c.getActualHref(a), h = c.bind(function() {
- this.redirect(g, c.context(a), b, d)
- }, this);
- "object" ===
- typeof o && (o.tracking || o.image) ? (e = c.createEl(o.tracking ? "iframe" : "img", {src: o.tracking || o.image}, {height: 0,width: 0,visibility: "hidden"}), document.body.appendChild(e), setTimeout(c.exceptionLogger(h), o.timeout || j.hop_timeout)) : h()
- },onApiPing: function(a, b, d, f, o, g) {
- j.rewrite_original = !1;
- o = c.reformatKeys(o || {});
- var h, i;
- f = function(a) {
- var b = {}, d = function(a) {
- c.isArray(a) ? b[a[0]] = a[1] : b[a] = 1
- };
- c.isArray(a) && c.each(a, d);
- return b
- };
- i = c.extend(j.plugins, o.plugins);
- j = c.extend(j, o);
- delete j.plugins;
- j.library_id =
- a;
- j.click_timeout = b;
- j.time_ping && this.logTime("png");
- "array" === c.type(j.testing_js) && 0 < j.testing_js.length && c.each(j.testing_js, function(a) {
- c.jsonp(a)
- });
- c.extend(j.norewrite, f(d));
- c.extend(j.nofollow, f(g));
- for (h in j)
- "on" === h.toLowerCase().substr(0, 2) && (2 < h.length && "function" === c.type(j[h])) && (c.on(e, h.toLowerCase().substr(2), c.bind(j[h], window)), delete j[h]);
- this.initPlugins(i);
- this.initContext(window);
- this.fire("libready")
- },onClick: function(a) {
- a = a || window.event;
- var b = a.ctrlKey || a.metaKey || a.altKey ||
- a.shiftKey, d = a.which && 1 === a.which || 0 === a.button, e = c.eventLink(a);
- if (e && this.isRewritable(e) && !b && d && !c.isDefaultPrevented(a))
- return this.click(e), c.preventDefault(a)
- },onContextmenu: function(a) {
- (a = c.eventLink(a || window.event)) && this.isRewritable(a) && this.handleRightClick(a, "setup")
- },onCopy: function() {
- var a, b, d, f, j = [];
- if (window.getSelection) {
- d = window.getSelection();
- a = 0;
- for (b = d.rangeCount; a < b; a++) {
- try {
- f = d.getRangeAt(a).toString().replace(/((^)\s+|\s+$|\r)/g, "").replace(/\s*\n\s*/g, "\n")
- } catch (g) {
- }
- 0 <
- f.length && 128 >= f.length && j.push(f)
- }
- }
- c.each(j, function(a) {
- e.log("info", c.toQuery({type: "selection",txt: a,loc: location.href}))
- })
- },opt: function(a, b) {
- void 0 !== b && void 0 !== this.publicOptions()[a] && (j[a] = b);
- return j[a]
- },ping: function() {
- if (!Ha && (j.key || j.dr_key)) {
- var a = {ref: document.referrer || null};
- Ha = !0;
- c.transmitsPII(this.api("ping", a, {"return": !0})) || (this.logTime(), this.api("ping", a, {fn: c.bind(this.onApiPing, this)}))
- }
- },processLink: function(a) {
- if (this.isRewritable(a)) {
- var b = c.cache(a, "processors") || {};
- c.each(this.registerProcessor(), function(c) {
- b[c.id] || c.fn(a);
- b[c.id] = !0
- });
- c.cache(a, "processors", b);
- return a
- }
- },publicOptions: function(a) {
- "object" === c.type(a) && (Ia = a);
- return c.extend({}, Ia)
- },redirect: function(a, b, d, e) {
- !c.traits.crossWindowCommunication && !d ? (e = b.open(a, e), e.focus()) : c.traits.jsRedirectSetsReferrer ? setTimeout(c.exceptionLogger(function() {
- !d || d === b ? b.location = a : c.contextIsAncestor(b, d) ? d.location = a : d.location.replace(a)
- }), 0) : ("_blank" === e && (e = c.uniqid("win_")), e = c.createA(a, e), e.rel =
- "norewrite", b.document.body.appendChild(e), e.click(), e.parentNode.removeChild(e))
- },registerProcessor: La};
- e.init();
- try {
- delete window.vglnk_self
- } catch (ib) {
- }
- })("undefined" === typeof vglnk_self ? "vglnk" : vglnk_self);
- window.vglnk = window.vglnk || {};
- window.vglnk.link_affiliation_plugin = function(i, e, u) {
- return function() {
- u.opt("rewrite_original", !0)
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.modified_clicks_plugin = function(i, e, u) {
- return function() {
- u.opt("rewrite_modified", !0)
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.partner_integration_plugin = function(i, e) {
- var u = "https:" === document.location.protocol, c = {setup: function() {
- window._comscore = window._comscore || []
- },run: function() {
- var c = window._comscore;
- c && "function" === e.type(c.push) && (c.push({c1: 8,c2: 17570528,c3: 1}), e.jsonp("//" + (u ? "sb" : "b") + ".scorecardresearch.com/beacon.js"))
- }};
- c.setup();
- return function() {
- c.run()
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.dr_search_box_plugin = function(i, e, u) {
- i = e.extend({key: null}, i);
- var c = {init: function() {
- e.each(this.getDRSearchForms(), function(i) {
- if (!e.cache(i, "evented")) {
- var t = c.getInput(i), m = function() {
- t.value || e.css(t, {"background-image": "url(http://cdn.viglink.com/images/ebay_watermark.gif)"})
- };
- e.cache(i, "evented", !0);
- i.onsubmit = null;
- t.onfocus = null;
- t.onblur = null;
- e.on(t, "focus", function() {
- e.css(t, {"background-image": "none"})
- });
- e.on(t, "blur", m);
- m();
- e.on(i, "submit", function(e) {
- c.onSubmit(e, i)
- })
- }
- })
- },
- getDRSearchForms: function() {
- var i = [];
- e.each(document.getElementsByTagName("form"), function(e) {
- c.getInput(e) && e.id.match(/^DR-ebay-search(CSS|2)?$/i) && i.push(e)
- });
- return i
- },getInput: function(c) {
- return c.p || c.q2
- },onSubmit: function(p, t) {
- p = p || window.event;
- var m = "http://shop.ebay.com/i.html?" + e.toQuery({_nkw: c.getInput(t).value}), m = e.createA(m, "_blank");
- e.cache(m, "params", {key: i.key});
- u.click(m);
- return e.preventDefault(p)
- }};
- return function() {
- i.key && (c.init(), e.on("DOMReady", e.bind(c.init, c)))
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.link_optimization_plugin = function(i, e, u) {
- var c, p = {};
- i = e.extend({platform: null}, i);
- var t = e.generateNodeFilter({classes: ["nooptimize"],rels: ["nooptimize"],custom: function(c, i) {
- if (i)
- return Boolean(e.cache(c, "type"))
- }}), m = {data: !1,timing: !1};
- c = {getLinks: function() {
- var s = e.platforms(i.platform).getPostIDs();
- u.api("optimize", {pt: i.platform,i: s ? s.join("|") : null,u: location.href}, {fn: e.bind(c.onOptimizeApi, c)})
- },onOptimizeApi: function(c) {
- "object" === e.type(c) && "object" === e.type(c.optLinks) && (p =
- c.optLinks, this.optimizeLinks({data: !0}))
- },optimizeLink: function(c) {
- var i, m, u = p[c.href];
- if (u && t(c)) {
- m = c.href;
- var E = c.textContent || c.innerText;
- if (!(i = m === E))
- i = e.canonicalizeHostname(c), e.canonicalizeHostname(e.createEl("a", {href: E})) === i ? (i = e.fromQuery(c.search), i = e.find(i, function(c) {
- return c === E
- })) : i = !1;
- var Y = e.canonicalizeHostname(c);
- m = RegExp("\\b" + e.escapeRegExp(Y) + "\\b", "i").test(E) || -1 !== E.indexOf(m);
- if (i) {
- for (m = u.optLink; i = c.firstChild; )
- c.removeChild(i);
- c.appendChild(document.createTextNode(m))
- } else if (m)
- return;
- e.cache(c, "params", {type: "LO",origOutId: u.pcid + ":" + u.linkId});
- c.href = u.optLink
- }
- },optimizeLinks: function(i) {
- m = e.extend(m, i);
- m.timing && (m.data && p) && u.registerProcessor(e.bind(this.optimizeLink, c))
- },setup: function() {
- if (!i.platform || "full" === i.platform)
- this.getLinks();
- else
- e.on("DOMReady", e.bind(this.getLinks, this))
- }};
- c.setup();
- return function() {
- e.on("DOMReady", function() {
- c.optimizeLinks({timing: !0})
- })
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.page_harmony_plugin = function(i, e, u) {
- i = e.extend({level: null}, i);
- return function() {
- var c = parseInt(i.level, 10);
- isFinite(c) && u.opt("harmony_level", c)
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.product_linker_plugin = function(i, e, u, c) {
- var p, t, m = null, s = {}, v, A = 0, X = 0, E = 0, Y = 0;
- i = e.extend({cat: null,platform: null,key: null,link_phrases: !0,link_urls: !0,link_target: null,per_page: null,per_phrase: 5,product_source: null,proximity: null,same_proximity: 100,scope: null,type: null,ui: !0}, i);
- if (i.key) {
- p = e.platforms(i.platform);
- var Z = {data: i.link_phrases ? !1 : i.link_urls,timing: !1}, D = function(c) {
- var q = !1, m = c.parentNode;
- c.data && (q = v.test(c.data.replace(/\s+/, " ")));
- if (q)
- for (var n = c, p, u, w, q = function(c,
- o) {
- var k, l, q, n, m, p, t, u, v, w, L = function(e) {
- v.parentNode.insertBefore(c, v);
- v.parentNode.removeChild(v);
- return e
- };
- v = e.createEl("span");
- c.parentNode.insertBefore(v, c);
- v.appendChild(c);
- w = e.geometry(v);
- if (i.proximity || i.same_proximity)
- for (p in s)
- if ((t = s[p].links) && !(s[p] === o && !i.same_proximity || s[p] !== o && !i.proximity)) {
- u = s[p] === o ? Math.max(i.same_proximity, i.proximity) : i.proximity;
- k = 0;
- for (l = t.length; k < l; k++) {
- m = t[k].segments;
- q = 0;
- for (n = m.length; q < n; q++) {
- var x = m[q].geometry, y = w, A = u, x = e.extend({}, x);
- x.x1 -= A;
- x.y1 -= A;
- x.x2 += A;
- x.y2 += A;
- if (x.x1 < y.x2 && x.x2 > y.x1 && x.y1 < y.y2 && x.y2 > y.y1)
- return L(!1)
- }
- }
- }
- return L(!0)
- }; n && n.data && (Boolean(u = n.data.match(/^\s+/)) || Boolean(u = n.data.match(v))); ) {
- p = u[0];
- w = u.slice(1).join("");
- c = s[w.toLowerCase()];
- p = n.data.indexOf(p) + p.length - w.length;
- 0 < p && (n = n.splitText(p));
- p = n.length <= w.length ? null : n.splitText(w.length);
- w && !c && (c = {url: w.match(/^https?:\/\//i) ? w : "http://" + w,type: "U"});
- var y;
- if (y = w) {
- var l = y = void 0;
- y = !c || !i.per_phrase || !c.count || c.count < i.per_phrase;
- l = !i.per_page || A < i.per_page;
- y = y && l && q(n, c)
- }
- if (y && (y = c, l = void 0, l = e.createEl("a"), l.innerHTML = w.replace(/([a-z0-9]+ *|[^a-z0-9]+)/ig, "\x3cspan\x3e$1\x3c/span\x3e"), l.className = "vglnk", e.cache(l, "type", "inserted"), e.cache(l, "phrase", w), i.ui && (l.title = "Link added by VigLink"), t.initLink(l, y), w = l, !e.cache(w, "unlinked"))) {
- "U" === c.type ? Y++ : "L" === c.type.toUpperCase() ? X++ : E++;
- m.insertBefore(w, n);
- m.removeChild(n);
- var n = c, K = l = y = void 0, k = void 0, D = {el: w,segments: []};
- w = w.getElementsByTagName("span");
- var M = {els: []};
- y = 0;
- for (l = w.length; y < l; y++)
- K =
- w[y], void 0 === k || K.offsetTop === k.offsetTop ? M.els.push(K) : (D.segments.push(M), M = {els: [K]}), k = K;
- M.geometry = e.geometry.apply(e, M.els);
- D.segments.push(M);
- n.links = n.links || [];
- n.links.push(D);
- c.count++;
- A++
- }
- n = p
- }
- }, W = e.generateNodeFilter({classes: ["nolinks", "atma-nolink", "atma-nolinks"],tags: "applet embed object head img input link map meta param select button iframe option script style svg textarea title".split(" "),custom: function(c) {
- return e.matches(c, "a[href]")
- }}), aa = function(c) {
- var q;
- if (c) {
- if (W(c, {ancestors: !1,
- self: !0}))
- for (q = c.firstChild; q; )
- c = q.nextSibling, 1 === q.nodeType ? aa(q) : 3 === q.nodeType && D(q), q = c
- } else
- e.each(e.select(i.scope), function(c) {
- W(c, {ancestors: !0,self: !1}) && aa(c)
- })
- };
- t = {addPhrasesToMatcher: function(c) {
- var i = "";
- "regexp" === e.type(c) ? i = c.source : "array" === e.type(c) && (i = "(?:^|[\\s\"'\\(])(" + e.map(c, e.escapeRegExp).join("|") + ")(?\x3d\\s|\\W*$|\\W{2})");
- "" !== i && (v = RegExp(v ? "(?:" + i + "|" + v.source + ")" : i, "i"))
- },focusLink: function(c) {
- c.id || (c.id = e.uniqid("vl-link-"));
- location.href.hash = "#" + c.id;
- window.scrollBy(0,
- -150)
- },getPhrases: function() {
- var c = p.getPostIDs();
- u.api("insert", e.extend(t.getPartnerParams(), {cat: i.cat,mode: i.mode,pt: i.platform,ps: i.product_source,i: c ? c.join("|") : null,u: location.href,type: i.type}), {fn: e.bind(t.onInsertApi, t)})
- },getPartnerParams: function() {
- var c, e, i = u.opt("partner"), n = {};
- for (c in i)
- break;
- if (c)
- for (e in i[c])
- n[c + "_" + e] = i[c][e];
- return n
- },initLink: function(c, q, p) {
- if (p = i.link_target || p)
- c.target = p;
- c.rel = "nofollow";
- c.href || (c.href = q.url);
- e.cache(c, "params", {exp: m,key: i.key,mid: q.mid,
- type: q.type || null});
- e.cache(c, "href", c.href);
- u.link(c)
- },insertLinks: function(c) {
- Z = e.extend(Z, c);
- Z.timing && (Z.data && v) && (aa(), t.log())
- },loadPhrases: function(c) {
- var e, i, n, m = [];
- e = 0;
- for (i = c.length; e < i; e++)
- n = c[e], n.phrase && n.url && (n.phrase = n.phrase.toLowerCase(), s[n.phrase] || (m.push(n.phrase), s[n.phrase] = {count: s[n.phrase] ? s[n.phrase].count : 0,phrase: n.phrase,mid: n.mid,url: n.url,type: n.type || ""}));
- 0 < m.length && this.addPhrasesToMatcher(m);
- this.insertLinks({data: !0})
- },log: function() {
- var e, i, p = {heavy: [],lite: []},
- n = function(c, e) {
- return e.split(",")[0] - c.split(",")[0]
- };
- for (e in s)
- i = parseInt(s[e].count, 10), 0 < i && (i = [i, e.replace(/\|/g, "%7C")].join(), p["L" === s[e].type.toUpperCase() ? "lite" : "heavy"].push(i));
- p.lite.sort(n);
- p.heavy.sort(n);
- c("insert", [{ct: A,cl: X,ch: E,cu: Y,exp: m}, {pl: p.lite.join("|")}, {ph: p.heavy.join("|")}])
- },onInsertApi: function(c) {
- "object" === e.type(c) && (m = c.exp, c.results && this.loadPhrases(c.results))
- },setup: function() {
- i.scope = i.scope || p.scope || "body";
- i.link_urls && this.addPhrasesToMatcher(RegExp("(?:(?:\\b(https?://)|(?:^|\\s)\\W*(www\\d{0,3}\\.|(?:[a-z0-9-]+\\.)+[a-z]{2,4}/))((?:[^\\s()\x3c\x3e]+|\\((?:[^\\s()\x3c\x3e]|(?:\\([^\\s()\x3c\x3e]+\\)))*\\))+(?:\\((?:[^\\s()\x3c\x3e]|(?:\\([^\\s()\x3c\x3e]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,\x3c\x3e?\u00ab\u00bb\u201c\u201d\u2018\u2019]))|(?:^|\\s)\\W*((?:[a-z0-9-]+\\.)+com(?:/|\\b)))",
- "i"));
- if (i.link_phrases)
- if (!i.platform || "full" === i.platform)
- this.getPhrases();
- else
- e.on("DOMReady", e.bind(this.getPhrases, this))
- }};
- t.setup();
- return function() {
- e.on("DOMReady", function() {
- t.insertLinks({timing: !0})
- })
- }
- }
- };
- window.vglnk = window.vglnk || {};
- window.vglnk.spotlight_plugin = function(i, e, u) {
- window.vglnk.spotlight_plugin.exports = {$: e,opts: i,vglnk: u};
- return function() {
- (!e.browser.ie || 6 < e.browser.version) && e.jsonp(u.opt("asset_url") + "/spotlight.js")
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement