if (typeof YAHOO == "undefined" || !YAHOO) { var YAHOO = {} } YAHOO.namespace = function () { var A = arguments, E = null, C, B, D; for (C = 0; C < A.length; C = C + 1) { D = A[C].split("."); E = YAHOO; for (B = (D[0] == "YAHOO") ? 1 : 0; B < D.length; B = B + 1) { E[D[B]] = E[D[B]] || {}; E = E[D[B]] } } return E }; YAHOO.log = function (D, A, C) { var B = YAHOO.widget.Logger; if (B && B.log) { return B.log(D, A, C) } else { return false } }; YAHOO.register = function (A, E, D) { var I = YAHOO.env.modules; if (!I[A]) { I[A] = { versions: [], builds: []} } var B = I[A], H = D.version, G = D.build, F = YAHOO.env.listeners; B.name = A; B.version = H; B.build = G; B.versions.push(H); B.builds.push(G); B.mainClass = E; for (var C = 0; C < F.length; C = C + 1) { F[C](B) } if (E) { E.VERSION = H; E.BUILD = G } else { YAHOO.log("mainClass is undefined for module " + A, "warn") } }; YAHOO.env = YAHOO.env || { modules: [], listeners: [] }; YAHOO.env.getVersion = function (A) { return YAHOO.env.modules[A] || null }; YAHOO.env.ua = function () { var C = { ie: 0, opera: 0, gecko: 0, webkit: 0, mobile: null, air: 0 }; var B = navigator.userAgent, A; if ((/KHTML/).test(B)) { C.webkit = 1 } A = B.match(/AppleWebKit\/([^\s]*)/); if (A && A[1]) { C.webkit = parseFloat(A[1]); if (/ Mobile\//.test(B)) { C.mobile = "Apple" } else { A = B.match(/NokiaN[^\/]*/); if (A) { C.mobile = A[0] } } A = B.match(/AdobeAIR\/([^\s]*)/); if (A) { C.air = A[0] } } if (!C.webkit) { A = B.match(/Opera[\s\/]([^\s]*)/); if (A && A[1]) { C.opera = parseFloat(A[1]); A = B.match(/Opera Mini[^;]*/); if (A) { C.mobile = A[0] } } else { A = B.match(/MSIE\s([^;]*)/); if (A && A[1]) { C.ie = parseFloat(A[1]) } else { A = B.match(/Gecko\/([^\s]*)/); if (A) { C.gecko = 1; A = B.match(/rv:([^\s\)]*)/); if (A && A[1]) { C.gecko = parseFloat(A[1]) } } } } } return C } (); (function () { YAHOO.namespace("util", "widget", "example"); if ("undefined" !== typeof YAHOO_config) { var B = YAHOO_config.listener, A = YAHOO.env.listeners, D = true, C; if (B) { for (C = 0; C < A.length; C = C + 1) { if (A[C] == B) { D = false; break } } if (D) { A.push(B) } } } })(); YAHOO.lang = YAHOO.lang || {}; (function () { var A = YAHOO.lang, C = ["toString", "valueOf"], B = { isArray: function (D) { if (D) { return A.isNumber(D.length) && A.isFunction(D.splice) } return false }, isBoolean: function (D) { return typeof D === "boolean" }, isFunction: function (D) { return typeof D === "function" }, isNull: function (D) { return D === null }, isNumber: function (D) { return typeof D === "number" && isFinite(D) }, isObject: function (D) { return (D && (typeof D === "object" || A.isFunction(D))) || false }, isString: function (D) { return typeof D === "string" }, isUndefined: function (D) { return typeof D === "undefined" }, _IEEnumFix: (YAHOO.env.ua.ie) ? function (F, E) { for (var D = 0; D < C.length; D = D + 1) { var H = C[D], G = E[H]; if (A.isFunction(G) && G != Object.prototype[H]) { F[H] = G } } } : function () { }, extend: function (H, I, G) { if (!I || !H) { throw new Error("extend failed, please check that all dependencies are included.") } var E = function () { }; E.prototype = I.prototype; H.prototype = new E(); H.prototype.constructor = H; H.superclass = I.prototype; if (I.prototype.constructor == Object.prototype.constructor) { I.prototype.constructor = I } if (G) { for (var D in G) { if (A.hasOwnProperty(G, D)) { H.prototype[D] = G[D] } } A._IEEnumFix(H.prototype, G) } }, augmentObject: function (H, G) { if (!G || !H) { throw new Error("Absorb failed, verify dependencies.") } var D = arguments, F, I, E = D[2]; if (E && E !== true) { for (F = 2; F < D.length; F = F + 1) { H[D[F]] = G[D[F]] } } else { for (I in G) { if (E || !(I in H)) { H[I] = G[I] } } A._IEEnumFix(H, G) } }, augmentProto: function (G, F) { if (!F || !G) { throw new Error("Augment failed, verify dependencies.") } var D = [G.prototype, F.prototype]; for (var E = 2; E < arguments.length; E = E + 1) { D.push(arguments[E]) } A.augmentObject.apply(this, D) }, dump: function (D, I) { var F, H, K = [], L = "{...}", E = "f(){...}", J = ", ", G = " => "; if (!A.isObject(D)) { return D + "" } else { if (D instanceof Date || ("nodeType" in D && "tagName" in D)) { return D } else { if (A.isFunction(D)) { return E } } } I = (A.isNumber(I)) ? I : 3; if (A.isArray(D)) { K.push("["); for (F = 0, H = D.length; F < H; F = F + 1) { if (A.isObject(D[F])) { K.push((I > 0) ? A.dump(D[F], I - 1) : L) } else { K.push(D[F]) } K.push(J) } if (K.length > 1) { K.pop() } K.push("]") } else { K.push("{"); for (F in D) { if (A.hasOwnProperty(D, F)) { K.push(F + G); if (A.isObject(D[F])) { K.push((I > 0) ? A.dump(D[F], I - 1) : L) } else { K.push(D[F]) } K.push(J) } } if (K.length > 1) { K.pop() } K.push("}") } return K.join("") }, substitute: function (S, E, L) { var I, H, G, O, P, R, N = [], F, J = "dump", M = " ", D = "{", Q = "}"; for (; ; ) { I = S.lastIndexOf(D); if (I < 0) { break } H = S.indexOf(Q, I); if (I + 1 >= H) { break } F = S.substring(I + 1, H); O = F; R = null; G = O.indexOf(M); if (G > -1) { R = O.substring(G + 1); O = O.substring(0, G) } P = E[O]; if (L) { P = L(O, P, R) } if (A.isObject(P)) { if (A.isArray(P)) { P = A.dump(P, parseInt(R, 10)) } else { R = R || ""; var K = R.indexOf(J); if (K > -1) { R = R.substring(4) } if (P.toString === Object.prototype.toString || K > -1) { P = A.dump(P, parseInt(R, 10)) } else { P = P.toString() } } } else { if (!A.isString(P) && !A.isNumber(P)) { P = "~-" + N.length + "-~"; N[N.length] = F } } S = S.substring(0, I) + P + S.substring(H + 1) } for (I = N.length - 1; I >= 0; I = I - 1) { S = S.replace(new RegExp("~-" + I + "-~"), "{" + N[I] + "}", "g") } return S }, trim: function (D) { try { return D.replace(/^\s+|\s+$/g, "") } catch (E) { return D } }, merge: function () { var G = {}, E = arguments; for (var F = 0, D = E.length; F < D; F = F + 1) { A.augmentObject(G, E[F], true) } return G }, later: function (K, E, L, G, H) { K = K || 0; E = E || {}; var F = L, J = G, I, D; if (A.isString(L)) { F = E[L] } if (!F) { throw new TypeError("method undefined") } if (!A.isArray(J)) { J = [G] } I = function () { F.apply(E, J) }; D = (H) ? setInterval(I, K) : setTimeout(I, K); return { interval: H, cancel: function () { if (this.interval) { clearInterval(D) } else { clearTimeout(D) } } } }, isValue: function (D) { return (A.isObject(D) || A.isString(D) || A.isNumber(D) || A.isBoolean(D)) } }; A.hasOwnProperty = (Object.prototype.hasOwnProperty) ? function (D, E) { return D && D.hasOwnProperty(E) } : function (D, E) { return !A.isUndefined(D[E]) && D.constructor.prototype[E] !== D[E] }; B.augmentObject(A, B, true); YAHOO.util.Lang = A; A.augment = A.augmentProto; YAHOO.augment = A.augmentProto; YAHOO.extend = A.extend })(); YAHOO.register("yahoo", YAHOO, { version: "2.5.2", build: "1076" }); (function () { var B = YAHOO.util, K, I, J = {}, F = {}, M = window.document; YAHOO.env._id_counter = YAHOO.env._id_counter || 0; var C = YAHOO.env.ua.opera, L = YAHOO.env.ua.webkit, A = YAHOO.env.ua.gecko, G = YAHOO.env.ua.ie; var E = { HYPHEN: /(-[a-z])/i, ROOT_TAG: /^body|html$/i, OP_SCROLL: /^(?:inline|table-row)$/i }; var N = function (P) { if (!E.HYPHEN.test(P)) { return P } if (J[P]) { return J[P] } var Q = P; while (E.HYPHEN.exec(Q)) { Q = Q.replace(RegExp.$1, RegExp.$1.substr(1).toUpperCase()) } J[P] = Q; return Q }; var O = function (Q) { var P = F[Q]; if (!P) { P = new RegExp("(?:^|\\s+)" + Q + "(?:\\s+|$)"); F[Q] = P } return P }; if (M.defaultView && M.defaultView.getComputedStyle) { K = function (P, S) { var R = null; if (S == "float") { S = "cssFloat" } var Q = P.ownerDocument.defaultView.getComputedStyle(P, ""); if (Q) { R = Q[N(S)] } return P.style[S] || R } } else { if (M.documentElement.currentStyle && G) { K = function (P, R) { switch (N(R)) { case "opacity": var T = 100; try { T = P.filters["DXImageTransform.Microsoft.Alpha"].opacity } catch (S) { try { T = P.filters("alpha").opacity } catch (S) { } } return T / 100; case "float": R = "styleFloat"; default: var Q = P.currentStyle ? P.currentStyle[R] : null; return (P.style[R] || Q) } } } else { K = function (P, Q) { return P.style[Q] } } } if (G) { I = function (P, Q, R) { switch (Q) { case "opacity": if (YAHOO.lang.isString(P.style.filter)) { P.style.filter = "alpha(opacity=" + R * 100 + ")"; if (!P.currentStyle || !P.currentStyle.hasLayout) { P.style.zoom = 1 } } break; case "float": Q = "styleFloat"; default: P.style[Q] = R } } } else { I = function (P, Q, R) { if (Q == "float") { Q = "cssFloat" } P.style[Q] = R } } var D = function (P, Q) { return P && P.nodeType == 1 && (!Q || Q(P)) }; YAHOO.util.Dom = { get: function (R) { if (R && (R.nodeType || R.item)) { return R } if (YAHOO.lang.isString(R) || !R) { return M.getElementById(R) } if (R.length !== undefined) { var S = []; for (var Q = 0, P = R.length; Q < P; ++Q) { S[S.length] = B.Dom.get(R[Q]) } return S } return R }, getStyle: function (P, R) { R = N(R); var Q = function (S) { return K(S, R) }; return B.Dom.batch(P, Q, B.Dom, true) }, setStyle: function (P, R, S) { R = N(R); var Q = function (T) { I(T, R, S) }; B.Dom.batch(P, Q, B.Dom, true) }, getXY: function (P) { var Q = function (R) { if ((R.parentNode === null || R.offsetParent === null || this.getStyle(R, "display") == "none") && R != R.ownerDocument.body) { return false } return H(R) }; return B.Dom.batch(P, Q, B.Dom, true) }, getX: function (P) { var Q = function (R) { return B.Dom.getXY(R)[0] }; return B.Dom.batch(P, Q, B.Dom, true) }, getY: function (P) { var Q = function (R) { return B.Dom.getXY(R)[1] }; return B.Dom.batch(P, Q, B.Dom, true) }, setXY: function (P, S, R) { var Q = function (V) { var U = this.getStyle(V, "position"); if (U == "static") { this.setStyle(V, "position", "relative"); U = "relative" } var X = this.getXY(V); if (X === false) { return false } var W = [parseInt(this.getStyle(V, "left"), 10), parseInt(this.getStyle(V, "top"), 10)]; if (isNaN(W[0])) { W[0] = (U == "relative") ? 0 : V.offsetLeft } if (isNaN(W[1])) { W[1] = (U == "relative") ? 0 : V.offsetTop } if (S[0] !== null) { V.style.left = S[0] - X[0] + W[0] + "px" } if (S[1] !== null) { V.style.top = S[1] - X[1] + W[1] + "px" } if (!R) { var T = this.getXY(V); if ((S[0] !== null && T[0] != S[0]) || (S[1] !== null && T[1] != S[1])) { this.setXY(V, S, true) } } }; B.Dom.batch(P, Q, B.Dom, true) }, setX: function (Q, P) { B.Dom.setXY(Q, [P, null]) }, setY: function (P, Q) { B.Dom.setXY(P, [null, Q]) }, getRegion: function (P) { var Q = function (R) { if ((R.parentNode === null || R.offsetParent === null || this.getStyle(R, "display") == "none") && R != R.ownerDocument.body) { return false } var S = B.Region.getRegion(R); return S }; return B.Dom.batch(P, Q, B.Dom, true) }, getClientWidth: function () { return B.Dom.getViewportWidth() }, getClientHeight: function () { return B.Dom.getViewportHeight() }, getElementsByClassName: function (T, X, U, V) { X = X || "*"; U = (U) ? B.Dom.get(U) : null || M; if (!U) { return [] } var Q = [], P = U.getElementsByTagName(X), W = O(T); for (var R = 0, S = P.length; R < S; ++R) { if (W.test(P[R].className)) { Q[Q.length] = P[R]; if (V) { V.call(P[R], P[R]) } } } return Q }, hasClass: function (R, Q) { var P = O(Q); var S = function (T) { return P.test(T.className) }; return B.Dom.batch(R, S, B.Dom, true) }, addClass: function (Q, P) { var R = function (S) { if (this.hasClass(S, P)) { return false } S.className = YAHOO.lang.trim([S.className, P].join(" ")); return true }; return B.Dom.batch(Q, R, B.Dom, true) }, removeClass: function (R, Q) { var P = O(Q); var S = function (T) { if (!Q || !this.hasClass(T, Q)) { return false } var U = T.className; T.className = U.replace(P, " "); if (this.hasClass(T, Q)) { this.removeClass(T, Q) } T.className = YAHOO.lang.trim(T.className); return true }; return B.Dom.batch(R, S, B.Dom, true) }, replaceClass: function (S, Q, P) { if (!P || Q === P) { return false } var R = O(Q); var T = function (U) { if (!this.hasClass(U, Q)) { this.addClass(U, P); return true } U.className = U.className.replace(R, " " + P + " "); if (this.hasClass(U, Q)) { this.replaceClass(U, Q, P) } U.className = YAHOO.lang.trim(U.className); return true }; return B.Dom.batch(S, T, B.Dom, true) }, generateId: function (P, R) { R = R || "yui-gen"; var Q = function (S) { if (S && S.id) { return S.id } var T = R + YAHOO.env._id_counter++; if (S) { S.id = T } return T }; return B.Dom.batch(P, Q, B.Dom, true) || Q.apply(B.Dom, arguments) }, isAncestor: function (P, Q) { P = B.Dom.get(P); Q = B.Dom.get(Q); if (!P || !Q) { return false } if (P.contains && Q.nodeType && !L) { return P.contains(Q) } else { if (P.compareDocumentPosition && Q.nodeType) { return !!(P.compareDocumentPosition(Q) & 16) } else { if (Q.nodeType) { return !!this.getAncestorBy(Q, function (R) { return R == P }) } } } return false }, inDocument: function (P) { return this.isAncestor(M.documentElement, P) }, getElementsBy: function (W, Q, R, T) { Q = Q || "*"; R = (R) ? B.Dom.get(R) : null || M; if (!R) { return [] } var S = [], V = R.getElementsByTagName(Q); for (var U = 0, P = V.length; U < P; ++U) { if (W(V[U])) { S[S.length] = V[U]; if (T) { T(V[U]) } } } return S }, batch: function (T, W, V, R) { T = (T && (T.tagName || T.item)) ? T : B.Dom.get(T); if (!T || !W) { return false } var S = (R) ? V : window; if (T.tagName || T.length === undefined) { return W.call(S, T, V) } var U = []; for (var Q = 0, P = T.length; Q < P; ++Q) { U[U.length] = W.call(S, T[Q], V) } return U }, getDocumentHeight: function () { var Q = (M.compatMode != "CSS1Compat") ? M.body.scrollHeight : M.documentElement.scrollHeight; var P = Math.max(Q, B.Dom.getViewportHeight()); return P }, getDocumentWidth: function () { var Q = (M.compatMode != "CSS1Compat") ? M.body.scrollWidth : M.documentElement.scrollWidth; var P = Math.max(Q, B.Dom.getViewportWidth()); return P }, getViewportHeight: function () { var P = self.innerHeight; var Q = M.compatMode; if ((Q || G) && !C) { P = (Q == "CSS1Compat") ? M.documentElement.clientHeight : M.body.clientHeight } return P }, getViewportWidth: function () { var P = self.innerWidth; var Q = M.compatMode; if (Q || G) { P = (Q == "CSS1Compat") ? M.documentElement.clientWidth : M.body.clientWidth } return P }, getAncestorBy: function (P, Q) { while (P = P.parentNode) { if (D(P, Q)) { return P } } return null }, getAncestorByClassName: function (Q, P) { Q = B.Dom.get(Q); if (!Q) { return null } var R = function (S) { return B.Dom.hasClass(S, P) }; return B.Dom.getAncestorBy(Q, R) }, getAncestorByTagName: function (Q, P) { Q = B.Dom.get(Q); if (!Q) { return null } var R = function (S) { return S.tagName && S.tagName.toUpperCase() == P.toUpperCase() }; return B.Dom.getAncestorBy(Q, R) }, getPreviousSiblingBy: function (P, Q) { while (P) { P = P.previousSibling; if (D(P, Q)) { return P } } return null }, getPreviousSibling: function (P) { P = B.Dom.get(P); if (!P) { return null } return B.Dom.getPreviousSiblingBy(P) }, getNextSiblingBy: function (P, Q) { while (P) { P = P.nextSibling; if (D(P, Q)) { return P } } return null }, getNextSibling: function (P) { P = B.Dom.get(P); if (!P) { return null } return B.Dom.getNextSiblingBy(P) }, getFirstChildBy: function (P, R) { var Q = (D(P.firstChild, R)) ? P.firstChild : null; return Q || B.Dom.getNextSiblingBy(P.firstChild, R) }, getFirstChild: function (P, Q) { P = B.Dom.get(P); if (!P) { return null } return B.Dom.getFirstChildBy(P) }, getLastChildBy: function (P, R) { if (!P) { return null } var Q = (D(P.lastChild, R)) ? P.lastChild : null; return Q || B.Dom.getPreviousSiblingBy(P.lastChild, R) }, getLastChild: function (P) { P = B.Dom.get(P); return B.Dom.getLastChildBy(P) }, getChildrenBy: function (Q, S) { var R = B.Dom.getFirstChildBy(Q, S); var P = R ? [R] : []; B.Dom.getNextSiblingBy(R, function (T) { if (!S || S(T)) { P[P.length] = T } return false }); return P }, getChildren: function (P) { P = B.Dom.get(P); if (!P) { } return B.Dom.getChildrenBy(P) }, getDocumentScrollLeft: function (P) { P = P || M; return Math.max(P.documentElement.scrollLeft, P.body.scrollLeft) }, getDocumentScrollTop: function (P) { P = P || M; return Math.max(P.documentElement.scrollTop, P.body.scrollTop) }, insertBefore: function (Q, P) { Q = B.Dom.get(Q); P = B.Dom.get(P); if (!Q || !P || !P.parentNode) { return null } return P.parentNode.insertBefore(Q, P) }, insertAfter: function (Q, P) { Q = B.Dom.get(Q); P = B.Dom.get(P); if (!Q || !P || !P.parentNode) { return null } if (P.nextSibling) { return P.parentNode.insertBefore(Q, P.nextSibling) } else { return P.parentNode.appendChild(Q) } }, getClientRegion: function () { var R = B.Dom.getDocumentScrollTop(), Q = B.Dom.getDocumentScrollLeft(), S = B.Dom.getViewportWidth() + Q, P = B.Dom.getViewportHeight() + R; return new B.Region(R, S, P, Q) } }; var H = function () { if (M.documentElement.getBoundingClientRect) { return function (Q) { var R = Q.getBoundingClientRect(); var P = Q.ownerDocument; return [R.left + B.Dom.getDocumentScrollLeft(P), R.top + B.Dom.getDocumentScrollTop(P)] } } else { return function (R) { var S = [R.offsetLeft, R.offsetTop]; var Q = R.offsetParent; var P = (L && B.Dom.getStyle(R, "position") == "absolute" && R.offsetParent == R.ownerDocument.body); if (Q != R) { while (Q) { S[0] += Q.offsetLeft; S[1] += Q.offsetTop; if (!P && L && B.Dom.getStyle(Q, "position") == "absolute") { P = true } Q = Q.offsetParent } } if (P) { S[0] -= R.ownerDocument.body.offsetLeft; S[1] -= R.ownerDocument.body.offsetTop } Q = R.parentNode; while (Q.tagName && !E.ROOT_TAG.test(Q.tagName)) { if (Q.scrollTop || Q.scrollLeft) { if (!E.OP_SCROLL.test(B.Dom.getStyle(Q, "display"))) { if (!C || B.Dom.getStyle(Q, "overflow") !== "visible") { S[0] -= Q.scrollLeft; S[1] -= Q.scrollTop } } } Q = Q.parentNode } return S } } } () })(); YAHOO.util.Region = function (C, D, A, B) { this.top = C; this[1] = C; this.right = D; this.bottom = A; this.left = B; this[0] = B }; YAHOO.util.Region.prototype.contains = function (A) { return (A.left >= this.left && A.right <= this.right && A.top >= this.top && A.bottom <= this.bottom) }; YAHOO.util.Region.prototype.getArea = function () { return ((this.bottom - this.top) * (this.right - this.left)) }; YAHOO.util.Region.prototype.intersect = function (E) { var C = Math.max(this.top, E.top); var D = Math.min(this.right, E.right); var A = Math.min(this.bottom, E.bottom); var B = Math.max(this.left, E.left); if (A >= C && D >= B) { return new YAHOO.util.Region(C, D, A, B) } else { return null } }; YAHOO.util.Region.prototype.union = function (E) { var C = Math.min(this.top, E.top); var D = Math.max(this.right, E.right); var A = Math.max(this.bottom, E.bottom); var B = Math.min(this.left, E.left); return new YAHOO.util.Region(C, D, A, B) }; YAHOO.util.Region.prototype.toString = function () { return ("Region {top: " + this.top + ", right: " + this.right + ", bottom: " + this.bottom + ", left: " + this.left + "}") }; YAHOO.util.Region.getRegion = function (D) { var F = YAHOO.util.Dom.getXY(D); var C = F[1]; var E = F[0] + D.offsetWidth; var A = F[1] + D.offsetHeight; var B = F[0]; return new YAHOO.util.Region(C, E, A, B) }; YAHOO.util.Point = function (A, B) { if (YAHOO.lang.isArray(A)) { B = A[1]; A = A[0] } this.x = this.right = this.left = this[0] = A; this.y = this.top = this.bottom = this[1] = B }; YAHOO.util.Point.prototype = new YAHOO.util.Region(); YAHOO.register("dom", YAHOO.util.Dom, { version: "2.5.2", build: "1076" }); YAHOO.util.CustomEvent = function (D, B, C, A) { this.type = D; this.scope = B || window; this.silent = C; this.signature = A || YAHOO.util.CustomEvent.LIST; this.subscribers = []; if (!this.silent) { } var E = "_YUICEOnSubscribe"; if (D !== E) { this.subscribeEvent = new YAHOO.util.CustomEvent(E, this, true) } this.lastError = null }; YAHOO.util.CustomEvent.LIST = 0; YAHOO.util.CustomEvent.FLAT = 1; YAHOO.util.CustomEvent.prototype = { subscribe: function (B, C, A) { if (!B) { throw new Error("Invalid callback for subscriber to '" + this.type + "'") } if (this.subscribeEvent) { this.subscribeEvent.fire(B, C, A) } this.subscribers.push(new YAHOO.util.Subscriber(B, C, A)) }, unsubscribe: function (D, F) { if (!D) { return this.unsubscribeAll() } var E = false; for (var B = 0, A = this.subscribers.length; B < A; ++B) { var C = this.subscribers[B]; if (C && C.contains(D, F)) { this._delete(B); E = true } } return E }, fire: function () { this.lastError = null; var K = [], E = this.subscribers.length; if (!E && this.silent) { return true } var I = [].slice.call(arguments, 0), G = true, D, J = false; if (!this.silent) { } var C = this.subscribers.slice(), A = YAHOO.util.Event.throwErrors; for (D = 0; D < E; ++D) { var M = C[D]; if (!M) { J = true } else { if (!this.silent) { } var L = M.getScope(this.scope); if (this.signature == YAHOO.util.CustomEvent.FLAT) { var B = null; if (I.length > 0) { B = I[0] } try { G = M.fn.call(L, B, M.obj) } catch (F) { this.lastError = F; if (A) { throw F } } } else { try { G = M.fn.call(L, this.type, I, M.obj) } catch (H) { this.lastError = H; if (A) { throw H } } } if (false === G) { if (!this.silent) { } break } } } return (G !== false) }, unsubscribeAll: function () { for (var A = this.subscribers.length - 1; A > -1; A--) { this._delete(A) } this.subscribers = []; return A }, _delete: function (A) { var B = this.subscribers[A]; if (B) { delete B.fn; delete B.obj } this.subscribers.splice(A, 1) }, toString: function () { return "CustomEvent: '" + this.type + "', scope: " + this.scope } }; YAHOO.util.Subscriber = function (B, C, A) { this.fn = B; this.obj = YAHOO.lang.isUndefined(C) ? null : C; this.override = A }; YAHOO.util.Subscriber.prototype.getScope = function (A) { if (this.override) { if (this.override === true) { return this.obj } else { return this.override } } return A }; YAHOO.util.Subscriber.prototype.contains = function (A, B) { if (B) { return (this.fn == A && this.obj == B) } else { return (this.fn == A) } }; YAHOO.util.Subscriber.prototype.toString = function () { return "Subscriber { obj: " + this.obj + ", override: " + (this.override || "no") + " }" }; if (!YAHOO.util.Event) { YAHOO.util.Event = function () { var H = false; var I = []; var J = []; var G = []; var E = []; var C = 0; var F = []; var B = []; var A = 0; var D = { 63232: 38, 63233: 40, 63234: 37, 63235: 39, 63276: 33, 63277: 34, 25: 9 }; return { POLL_RETRYS: 2000, POLL_INTERVAL: 20, EL: 0, TYPE: 1, FN: 2, WFN: 3, UNLOAD_OBJ: 3, ADJ_SCOPE: 4, OBJ: 5, OVERRIDE: 6, lastError: null, isSafari: YAHOO.env.ua.webkit, webkit: YAHOO.env.ua.webkit, isIE: YAHOO.env.ua.ie, _interval: null, _dri: null, DOMReady: false, throwErrors: false, startInterval: function () { if (!this._interval) { var K = this; var L = function () { K._tryPreloadAttach() }; this._interval = setInterval(L, this.POLL_INTERVAL) } }, onAvailable: function (P, M, Q, O, N) { var K = (YAHOO.lang.isString(P)) ? [P] : P; for (var L = 0; L < K.length; L = L + 1) { F.push({ id: K[L], fn: M, obj: Q, override: O, checkReady: N }) } C = this.POLL_RETRYS; this.startInterval() }, onContentReady: function (M, K, N, L) { this.onAvailable(M, K, N, L, true) }, onDOMReady: function (K, M, L) { if (this.DOMReady) { setTimeout(function () { var N = window; if (L) { if (L === true) { N = M } else { N = L } } K.call(N, "DOMReady", [], M) }, 0) } else { this.DOMReadyEvent.subscribe(K, M, L) } }, addListener: function (M, K, V, Q, L) { if (!V || !V.call) { return false } if (this._isValidCollection(M)) { var W = true; for (var R = 0, T = M.length; R < T; ++R) { W = this.on(M[R], K, V, Q, L) && W } return W } else { if (YAHOO.lang.isString(M)) { var P = this.getEl(M); if (P) { M = P } else { this.onAvailable(M, function () { YAHOO.util.Event.on(M, K, V, Q, L) }); return true } } } if (!M) { return false } if ("unload" == K && Q !== this) { J[J.length] = [M, K, V, Q, L]; return true } var Y = M; if (L) { if (L === true) { Y = Q } else { Y = L } } var N = function (Z) { return V.call(Y, YAHOO.util.Event.getEvent(Z, M), Q) }; var X = [M, K, V, N, Y, Q, L]; var S = I.length; I[S] = X; if (this.useLegacyEvent(M, K)) { var O = this.getLegacyIndex(M, K); if (O == -1 || M != G[O][0]) { O = G.length; B[M.id + K] = O; G[O] = [M, K, M["on" + K]]; E[O] = []; M["on" + K] = function (Z) { YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z), O) } } E[O].push(X) } else { try { this._simpleAdd(M, K, N, false) } catch (U) { this.lastError = U; this.removeListener(M, K, V); return false } } return true }, fireLegacyEvent: function (O, M) { var Q = true, K, S, R, T, P; S = E[M].slice(); for (var L = 0, N = S.length; L < N; ++L) { R = S[L]; if (R && R[this.WFN]) { T = R[this.ADJ_SCOPE]; P = R[this.WFN].call(T, O); Q = (Q && P) } } K = G[M]; if (K && K[2]) { K[2](O) } return Q }, getLegacyIndex: function (L, M) { var K = this.generateId(L) + M; if (typeof B[K] == "undefined") { return -1 } else { return B[K] } }, useLegacyEvent: function (L, M) { if (this.webkit && ("click" == M || "dblclick" == M)) { var K = parseInt(this.webkit, 10); if (!isNaN(K) && K < 418) { return true } } return false }, removeListener: function (L, K, T) { var O, R, V; if (typeof L == "string") { L = this.getEl(L) } else { if (this._isValidCollection(L)) { var U = true; for (O = L.length - 1; O > -1; O--) { U = (this.removeListener(L[O], K, T) && U) } return U } } if (!T || !T.call) { return this.purgeElement(L, false, K) } if ("unload" == K) { for (O = J.length - 1; O > -1; O--) { V = J[O]; if (V && V[0] == L && V[1] == K && V[2] == T) { J.splice(O, 1); return true } } return false } var P = null; var Q = arguments[3]; if ("undefined" === typeof Q) { Q = this._getCacheIndex(L, K, T) } if (Q >= 0) { P = I[Q] } if (!L || !P) { return false } if (this.useLegacyEvent(L, K)) { var N = this.getLegacyIndex(L, K); var M = E[N]; if (M) { for (O = 0, R = M.length; O < R; ++O) { V = M[O]; if (V && V[this.EL] == L && V[this.TYPE] == K && V[this.FN] == T) { M.splice(O, 1); break } } } } else { try { this._simpleRemove(L, K, P[this.WFN], false) } catch (S) { this.lastError = S; return false } } delete I[Q][this.WFN]; delete I[Q][this.FN]; I.splice(Q, 1); return true }, getTarget: function (M, L) { var K = M.target || M.srcElement; return this.resolveTextNode(K) }, resolveTextNode: function (L) { try { if (L && 3 == L.nodeType) { return L.parentNode } } catch (K) { } return L }, getPageX: function (L) { var K = L.pageX; if (!K && 0 !== K) { K = L.clientX || 0; if (this.isIE) { K += this._getScrollLeft() } } return K }, getPageY: function (K) { var L = K.pageY; if (!L && 0 !== L) { L = K.clientY || 0; if (this.isIE) { L += this._getScrollTop() } } return L }, getXY: function (K) { return [this.getPageX(K), this.getPageY(K)] }, getRelatedTarget: function (L) { var K = L.relatedTarget; if (!K) { if (L.type == "mouseout") { K = L.toElement } else { if (L.type == "mouseover") { K = L.fromElement } } } return this.resolveTextNode(K) }, getTime: function (M) { if (!M.time) { var L = new Date().getTime(); try { M.time = L } catch (K) { this.lastError = K; return L } } return M.time }, stopEvent: function (K) { this.stopPropagation(K); this.preventDefault(K) }, stopPropagation: function (K) { if (K.stopPropagation) { K.stopPropagation() } else { K.cancelBubble = true } }, preventDefault: function (K) { if (K.preventDefault) { K.preventDefault() } else { K.returnValue = false } }, getEvent: function (M, K) { var L = M || window.event; if (!L) { var N = this.getEvent.caller; while (N) { L = N.arguments[0]; if (L && Event == L.constructor) { break } N = N.caller } } return L }, getCharCode: function (L) { var K = L.keyCode || L.charCode || 0; if (YAHOO.env.ua.webkit && (K in D)) { K = D[K] } return K }, _getCacheIndex: function (O, P, N) { for (var M = 0, L = I.length; M < L; M = M + 1) { var K = I[M]; if (K && K[this.FN] == N && K[this.EL] == O && K[this.TYPE] == P) { return M } } return -1 }, generateId: function (K) { var L = K.id; if (!L) { L = "yuievtautoid-" + A; ++A; K.id = L } return L }, _isValidCollection: function (L) { try { return (L && typeof L !== "string" && L.length && !L.tagName && !L.alert && typeof L[0] !== "undefined") } catch (K) { return false } }, elCache: {}, getEl: function (K) { return (typeof K === "string") ? document.getElementById(K) : K }, clearCache: function () { }, DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", this), _load: function (L) { if (!H) { H = true; var K = YAHOO.util.Event; K._ready(); K._tryPreloadAttach() } }, _ready: function (L) { var K = YAHOO.util.Event; if (!K.DOMReady) { K.DOMReady = true; K.DOMReadyEvent.fire(); K._simpleRemove(document, "DOMContentLoaded", K._ready) } }, _tryPreloadAttach: function () { if (F.length === 0) { C = 0; clearInterval(this._interval); this._interval = null; return } if (this.locked) { return } if (this.isIE) { if (!this.DOMReady) { this.startInterval(); return } } this.locked = true; var Q = !H; if (!Q) { Q = (C > 0 && F.length > 0) } var P = []; var R = function (T, U) { var S = T; if (U.override) { if (U.override === true) { S = U.obj } else { S = U.override } } U.fn.call(S, U.obj) }; var L, K, O, N, M = []; for (L = 0, K = F.length; L < K; L = L + 1) { O = F[L]; if (O) { N = this.getEl(O.id); if (N) { if (O.checkReady) { if (H || N.nextSibling || !Q) { M.push(O); F[L] = null } } else { R(N, O); F[L] = null } } else { P.push(O) } } } for (L = 0, K = M.length; L < K; L = L + 1) { O = M[L]; R(this.getEl(O.id), O) } C--; if (Q) { for (L = F.length - 1; L > -1; L--) { O = F[L]; if (!O || !O.id) { F.splice(L, 1) } } this.startInterval() } else { clearInterval(this._interval); this._interval = null } this.locked = false }, purgeElement: function (O, P, R) { var M = (YAHOO.lang.isString(O)) ? this.getEl(O) : O; var Q = this.getListeners(M, R), N, K; if (Q) { for (N = Q.length - 1; N > -1; N--) { var L = Q[N]; this.removeListener(M, L.type, L.fn) } } if (P && M && M.childNodes) { for (N = 0, K = M.childNodes.length; N < K; ++N) { this.purgeElement(M.childNodes[N], P, R) } } }, getListeners: function (M, K) { var P = [], L; if (!K) { L = [I, J] } else { if (K === "unload") { L = [J] } else { L = [I] } } var R = (YAHOO.lang.isString(M)) ? this.getEl(M) : M; for (var O = 0; O < L.length; O = O + 1) { var T = L[O]; if (T) { for (var Q = 0, S = T.length; Q < S; ++Q) { var N = T[Q]; if (N && N[this.EL] === R && (!K || K === N[this.TYPE])) { P.push({ type: N[this.TYPE], fn: N[this.FN], obj: N[this.OBJ], adjust: N[this.OVERRIDE], scope: N[this.ADJ_SCOPE], index: Q }) } } } } return (P.length) ? P : null }, _unload: function (Q) { var K = YAHOO.util.Event, N, M, L, P, O, R = J.slice(); for (N = 0, P = J.length; N < P; ++N) { L = R[N]; if (L) { var S = window; if (L[K.ADJ_SCOPE]) { if (L[K.ADJ_SCOPE] === true) { S = L[K.UNLOAD_OBJ] } else { S = L[K.ADJ_SCOPE] } } L[K.FN].call(S, K.getEvent(Q, L[K.EL]), L[K.UNLOAD_OBJ]); R[N] = null; L = null; S = null } } J = null; if (I) { for (M = I.length - 1; M > -1; M--) { L = I[M]; if (L) { K.removeListener(L[K.EL], L[K.TYPE], L[K.FN], M) } } L = null } G = null; K._simpleRemove(window, "unload", K._unload) }, _getScrollLeft: function () { return this._getScroll()[1] }, _getScrollTop: function () { return this._getScroll()[0] }, _getScroll: function () { var K = document.documentElement, L = document.body; if (K && (K.scrollTop || K.scrollLeft)) { return [K.scrollTop, K.scrollLeft] } else { if (L) { return [L.scrollTop, L.scrollLeft] } else { return [0, 0] } } }, regCE: function () { }, _simpleAdd: function () { if (window.addEventListener) { return function (M, N, L, K) { M.addEventListener(N, L, (K)) } } else { if (window.attachEvent) { return function (M, N, L, K) { M.attachEvent("on" + N, L) } } else { return function () { } } } } (), _simpleRemove: function () { if (window.removeEventListener) { return function (M, N, L, K) { M.removeEventListener(N, L, (K)) } } else { if (window.detachEvent) { return function (L, M, K) { L.detachEvent("on" + M, K) } } else { return function () { } } } } ()} } (); (function () { var EU = YAHOO.util.Event; EU.on = EU.addListener; if (EU.isIE) { YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach, YAHOO.util.Event, true); var n = document.createElement("p"); EU._dri = setInterval(function () { try { n.doScroll("left"); clearInterval(EU._dri); EU._dri = null; EU._ready(); n = null } catch (ex) { } }, EU.POLL_INTERVAL) } else { if (EU.webkit && EU.webkit < 525) { EU._dri = setInterval(function () { var rs = document.readyState; if ("loaded" == rs || "complete" == rs) { clearInterval(EU._dri); EU._dri = null; EU._ready() } }, EU.POLL_INTERVAL) } else { EU._simpleAdd(document, "DOMContentLoaded", EU._ready) } } EU._simpleAdd(window, "load", EU._load); EU._simpleAdd(window, "unload", EU._unload); EU._tryPreloadAttach() })() } YAHOO.util.EventProvider = function () { }; YAHOO.util.EventProvider.prototype = { __yui_events: null, __yui_subscribers: null, subscribe: function (A, C, F, E) { this.__yui_events = this.__yui_events || {}; var D = this.__yui_events[A]; if (D) { D.subscribe(C, F, E) } else { this.__yui_subscribers = this.__yui_subscribers || {}; var B = this.__yui_subscribers; if (!B[A]) { B[A] = [] } B[A].push({ fn: C, obj: F, override: E }) } }, unsubscribe: function (C, E, G) { this.__yui_events = this.__yui_events || {}; var A = this.__yui_events; if (C) { var F = A[C]; if (F) { return F.unsubscribe(E, G) } } else { var B = true; for (var D in A) { if (YAHOO.lang.hasOwnProperty(A, D)) { B = B && A[D].unsubscribe(E, G) } } return B } return false }, unsubscribeAll: function (A) { return this.unsubscribe(A) }, createEvent: function (G, D) { this.__yui_events = this.__yui_events || {}; var A = D || {}; var I = this.__yui_events; if (I[G]) { } else { var H = A.scope || this; var E = (A.silent); var B = new YAHOO.util.CustomEvent(G, H, E, YAHOO.util.CustomEvent.FLAT); I[G] = B; if (A.onSubscribeCallback) { B.subscribeEvent.subscribe(A.onSubscribeCallback) } this.__yui_subscribers = this.__yui_subscribers || {}; var F = this.__yui_subscribers[G]; if (F) { for (var C = 0; C < F.length; ++C) { B.subscribe(F[C].fn, F[C].obj, F[C].override) } } } return I[G] }, fireEvent: function (E, D, A, C) { this.__yui_events = this.__yui_events || {}; var G = this.__yui_events[E]; if (!G) { return null } var B = []; for (var F = 1; F < arguments.length; ++F) { B.push(arguments[F]) } return G.fire.apply(G, B) }, hasEvent: function (A) { if (this.__yui_events) { if (this.__yui_events[A]) { return true } } return false } }; YAHOO.util.KeyListener = function (A, F, B, C) { if (!A) { } else { if (!F) { } else { if (!B) { } } } if (!C) { C = YAHOO.util.KeyListener.KEYDOWN } var D = new YAHOO.util.CustomEvent("keyPressed"); this.enabledEvent = new YAHOO.util.CustomEvent("enabled"); this.disabledEvent = new YAHOO.util.CustomEvent("disabled"); if (typeof A == "string") { A = document.getElementById(A) } if (typeof B == "function") { D.subscribe(B) } else { D.subscribe(B.fn, B.scope, B.correctScope) } function E(J, I) { if (!F.shift) { F.shift = false } if (!F.alt) { F.alt = false } if (!F.ctrl) { F.ctrl = false } if (J.shiftKey == F.shift && J.altKey == F.alt && J.ctrlKey == F.ctrl) { var G; if (F.keys instanceof Array) { for (var H = 0; H < F.keys.length; H++) { G = F.keys[H]; if (G == J.charCode) { D.fire(J.charCode, J); break } else { if (G == J.keyCode) { D.fire(J.keyCode, J); break } } } } else { G = F.keys; if (G == J.charCode) { D.fire(J.charCode, J) } else { if (G == J.keyCode) { D.fire(J.keyCode, J) } } } } } this.enable = function () { if (!this.enabled) { YAHOO.util.Event.addListener(A, C, E); this.enabledEvent.fire(F) } this.enabled = true }; this.disable = function () { if (this.enabled) { YAHOO.util.Event.removeListener(A, C, E); this.disabledEvent.fire(F) } this.enabled = false }; this.toString = function () { return "KeyListener [" + F.keys + "] " + A.tagName + (A.id ? "[" + A.id + "]" : "") } }; YAHOO.util.KeyListener.KEYDOWN = "keydown"; YAHOO.util.KeyListener.KEYUP = "keyup"; YAHOO.util.KeyListener.KEY = { ALT: 18, BACK_SPACE: 8, CAPS_LOCK: 20, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, META: 224, NUM_LOCK: 144, PAGE_DOWN: 34, PAGE_UP: 33, PAUSE: 19, PRINTSCREEN: 44, RIGHT: 39, SCROLL_LOCK: 145, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38 }; YAHOO.register("event", YAHOO.util.Event, { version: "2.5.2", build: "1076" }); YAHOO.register("yahoo-dom-event", YAHOO, { version: "2.5.2", build: "1076" });

function html_esc(str) { var entity = { "'": "&apos;", '"': "&quot;", "<": "&lt;", ">": "&gt;" }; for (var e in entity) { str = str.replace(new RegExp(e, "g"), entity[e]) } return str } function esc_length_ok(str, len) { return (html_esc(str).length <= len) } function checkEmail(email) { if (!email) { return true } if (email.value == "") { alert("Please enter your email address."); email.focus() } else { if (/^\w+([\.-]\w+)*@\w+([\.-]\w+)*\.\w{2,}$/.test(email.value)) { return true } else { alert("Please enter a valid email address."); email.focus() } } return false } function amz_js_PopWin(url, name, options) { var winHelp = window.open(url, name, options); if (winHelp) { winHelp.opener = this; winHelp.focus() } };

function setDomain() { try { if (document.domain.match("corp.outreach.com")) { document.domain = "outreach.com" } else { if (document.domain.match("outreach.com")) { document.domain = "outreach.com" } } } catch (e) { } } setDomain();

var outreach = window.target || {}; outreach.ui = outreach.ui || {}; outreach.ui.gn = outreach.ui.gn || {}; outreach.ui.gn.data = outreach.ui.gn.data || {};

outreach.ui.gn.RefTag = { defaultRefFormat: "@_#c", getRefTag: function getRefTag(format, data) { var ref = ""; format = format || this.defaultRefFormat; data = data || {}; var c = ((typeof data.childOrder == "undefined") ? 0 : data.childOrder); var m = ((typeof data.menuOrder == "undefined") ? 0 : data.menuOrder); var f = ((typeof data.flyoutNumber == "undefined") ? 0 : data.flyoutNumber); var p = ((typeof data.parentRefTag == "undefined") ? "" : data.parentRefTag); try { ref = format; ref = ref.replace("#c", c, "g"); ref = ref.replace("#m", m, "g"); ref = ref.replace("#f", f, "g"); ref = ref.replace("#p", p, "g") } catch (e) { ref = "" } return ref } };

outreach.ui.gn.Node = function Node_Ctor(nodeData, paramsObject) {
    if (!nodeData)
    { return null }
    paramsObject = paramsObject || {};
    var recurse = paramsObject.recurse || 0;
    this.parentNode = paramsObject.parentNode || null;
    this.siblingNumber = paramsObject.siblingNumber || null;
    this.refValues = paramsObject.refValues || {};
    this.flyoutNumber = paramsObject.flyoutNumber || 0;
    this.addedUrlParams = paramsObject.addedUrlParams || "";
    if (!this.flyoutNumber && this.parentNode) {
        this.flyoutNumber = this.parentNode.flyoutNumber
    }
    var menuOrderCounter = paramsObject.menuOrder;
    if (menuOrderCounter) {
        this.menuOrder = menuOrderCounter.counter;
        if (nodeData.location) {
            menuOrderCounter.counter++
        }
    }
    this.secure = nodeData.secure && nodeData.secure == "true";
    this.text = nodeData.text || "";
    this.title = (typeof nodeData.title == "string" ? nodeData.title : this.text);
    this.name = nodeData.name || "";
    this.location = nodeData.location || "";
    this.children = nodeData.children || [];
    this.sessionId = window.sessionID || "";
    this.icnTag = nodeData.icnTag || "";
    this.style = nodeData.style || "";
    this.childNodes = [];
    this.refFormat = nodeData.ref_format || "";
    this.forceIncat = nodeData.forceIncat || "";
    this.desc = nodeData.desc || "";
    var self = this;
    this.getDomTemplate = function getDomTemplate_Node(className) {
        var href = self.getHref();
        if (href != "") {
            var style = self.style;

            if (style != "") {
                self.domTemplate = { tagName: "a", href: href, title: self.title, childNodes: [{ tagName: "span", style: style, innerHTML: self.text}] }
            }
            else {
                self.domTemplate = { tagName: "a", href: href, title: self.title, childNodes: [{ tagName: "span", innerHTML: self.text}] }
            }
        }
        else {
            if (className) {
                className += " nolink"
            }
            self.domTemplate = { tagName: "span", className: "nolink", childNodes: [{ tagName: "span", innerHTML: self.text}] }
        }
        if (className) {
            self.domTemplate.className = className
        } return self.domTemplate
    };
    this.getHtml = function () { }; this.isParent = function isParent() { return (!!self.children && self.children.length > 0) }; this.isLink = function isLink() { return (!!self.location) }; this.getParent = function getParent() { return self.parentNode }; this.isBrowseNode = function isBrowseNode() { return (!isNaN(self.location)) }; this.getRefFormat = function getRefFormat() { if (!self.refFormat) { var n = self; while (n = n.parentNode) { if (n.refFormat) { self.refFormat = n.refFormat; break } } } return self.refFormat }; this.getForceIncat = function getForceIncat() { if (!self.forceIncat) { var n = self.parentNode; while (n) { if (n.forceIncat) { self.forceIncat = n.forceIncat; break } n = n.parentNode } } if (self.forceIncat == "none") { self.forceIncat = "" } return self.forceIncat }; this.getRefTag = function getRefTag() { if (!self.refTag) { if (typeof nodeData.ref == "string") { self.refTag = nodeData.ref } else { var format = self.getRefFormat(); var refValues = self.refValues; refValues.childOrder = self.siblingNumber; refValues.menuOrder = self.menuOrder; refValues.flyoutNumber = self.flyoutNumber; refValues.parentRefTag = self.parentNode.refTag; self.refTag = outreach.ui.gn.RefTag.getRefTag(format, refValues) } } return self.refTag }; this.getHref = function getHref() { if (!self.href) { if (!self.location) { self.href = ""; return self.href } var refString = self.getRefTag(); var incatString = self.getForceIncat(); if (incatString) { incatString = "forceIncat=" + incatString } var sessionIdString = (self.sessionId ? "/" + self.sessionId : ""); var location = self.location; var description = self.desc; var server = self.secure ? outreach.ui.gn.secureserver : outreach.ui.gn.nonsecureserver; server = server || ""; var moreParams = self.addedUrlParams; var urlParamDelimiter = "&"; if (location.indexOf("?") == -1) { urlParamDelimiter = "?" } if (location.indexOf("/") == 0) { if (refString) { refString = ""; urlParamDelimiter = "&" } if (incatString) { incatString = urlParamDelimiter + incatString; urlParamDelimiter = "&" } if (moreParams) { moreParams = urlParamDelimiter + moreParams } self.href = server + location + refString + incatString + moreParams } else { if (location.indexOf("#") == 0) { self.href = location } else { if (self.isBrowseNode()) { if (refString) { refString = "/ref=" + refString } if (incatString) { incatString = "&" + incatString } if (moreParams) { moreParams = "&" + moreParams } if (description) { description = "/" + description } self.href = server + description + "/b" + refString + "?ie=UTF8&node=" + location + incatString + moreParams } else { if (refString) { refString = encodeURIComponent(refString); refString = refString.replace("_", "%5F", "g"); refString = "" } var redirect = "/gp/redirect.html"; if (outreach.ui.gn.isRainier) { redirect = "/gp/preview/redirect.html" } var destination = location; self.href = destination } } } } return self.href }; this.buildRecursive = function buildRecursive() { for (var i = 0, len = self.children.length; i < len; i++) { self.childNodes.push(new outreach.ui.gn.Node(self.children[i], { parentNode: self, siblingNumber: i + 1, menuOrder: menuOrderCounter, recurse: recurse - 1, addedUrlParams: self.addedUrlParams })) } }; if (recurse) { this.buildRecursive() } return this
};

outreach.ui.gn.Flyout =
function Flyout_Ctor(rootElement, structure, index, type) {
    var self = this;
    this.rootElement = rootElement;
    this.structure = structure;
    if (structure && structure.counts) {
        this.counts = structure.counts
    }
    else {
        this.counts = []
    }
    this.flyoutNumber = index + 1;
    this.type = type || "";
    var domAttachmentPoint;
    this.refValues = { childOrder: 0, menuOrder: 0, flyoutNumber: this.flyoutNumber, parentRefTag: "" };
    self.refValues.menuOrder++;
    this.getDomTemplate = function getDomTemplate_Flyout() {
        if (!self.domTemplate) {
            if (this.structure && this.counts.length) {
                var tabTmpl = self.rootElement.getDomTemplate();
                var cols = self.getColumns();
                self.domTemplate = self.wrapFlyoutContent(cols, tabTmpl)
            }
        }
        return self.domTemplate
    };
    this.createDomElements = function createDomElements_Flyout() {
        domAttachmentPoint = jQuery(document.createElement("DIV"));
        domAttachmentPoint.appendDom(self.getDomTemplate())
    };
    this.getDomElements = function getDomElements_Flyout() {
        if (!domAttachmentPoint) {
            self.createDomElements()
        }
        return (domAttachmentPoint.get(0))
    };
    this.getLinkGroupTemplates = function getLinkGroupTemplates() {

        var flyoutChildren = self.rootElement.childNodes;
        var linkGroups = [], linkGroupTemplate;
        for (var i = 0, len = flyoutChildren.length; i < len; i++) {
            var linkGroupData = flyoutChildren[i];
            var headerNode = linkGroupData;
            if (headerNode.isLink()) {
                self.refValues.menuOrder++
            }
            var childLinkTemplates = [];

            for (var j = 0, len2 = headerNode.childNodes.length; j < len2; j++) {
                var childNode = headerNode.childNodes[j];

                if (childNode.isLink()) {
                    self.refValues.menuOrder++
                }
                childLinkTemplates.push({ tagName: "li", childNodes: [childNode.getDomTemplate()] })
            }
            var treeStatus = "leaf";
            if (childLinkTemplates.length > 0) {
                linkGroupTemplate = [headerNode.getDomTemplate("parent")];
                treeStatus = "branch";
                linkGroupTemplate.push({ tagName: "ul", className: "children", childNodes: childLinkTemplates })
            }
            else {
                linkGroupTemplate = [headerNode.getDomTemplate()]
            }
            linkGroups.push({ tagName: "li", className: treeStatus, childNodes: linkGroupTemplate })
        }
        return linkGroups
    };
    this.getColumns = function getColumns() {
        var columns = [];
        var linkGroups = self.getLinkGroupTemplates();
        var start = 0, end;
        var columnCounts = this.counts;
        var columnClasses = this.structure.columnClasses || [];
        for (var i = 0, len = columnCounts.length; i < len; i++) {
            var end = start + columnCounts[i];
            var columnClass = columnClasses[i];
            var divClass = "gn_col";
            if (columnClass) {
                divClass = columnClass
            }
            if (i == len - 1) {
                divClass += " last-child"
            }
            columns.push({ tagName: "div", className: divClass, childNodes: [{ tagName: "ul", childNodes: linkGroups.slice(start, end)}] });
            start = end
        }
        return columns
    };
    this.wrapFlyoutContent = function wrapFlyoutContent(flybodyContent, flytabContent) {
        var flyoutType = self.type;
        var flyoutClass = this.structure.flyoverClass || "";
        if (flybodyContent.length > 1 && !flyoutClass.match("col")) {
            flyoutClass += " col" + flybodyContent.length
        }
        flytabContent = [flytabContent];
        var shadowInnerHtml = '<div class="gn_tl"></div><div class="gn_tr"></div><div class="gn_bl"></div><div class="gn_br"></div>';
        flybodyContent.unshift({ tagName: "div", className: "gn_shadow", innerHTML: shadowInnerHtml });
        flytabContent.unshift({ tagName: "div", className: "gn_shadow", innerHTML: shadowInnerHtml });
        var flyoutDomStructure = { tagName: "div", id: "gn_" + flyoutType + "fly_" + this.flyoutNumber, className: "gn_fly " + flyoutType + " " + flyoutClass, childNodes: [{ tagName: "div", className: "gn_flytab", childNodes: flytabContent }, { tagName: "div", className: "gn_flybody", childNodes: flybodyContent}] };
        return flyoutDomStructure
    };
    this.getColumnsC = function getColumnsC() {
        var columns = [];
        var columnCounts = self.counts;
        var columnClasses = self.structure.columnClasses || [];
        var linkGroups = self.getLinkGroupTemplates();
        var start = 0, end;
        for (var i = 0; i < columnCounts.length; i++) {
            var end = start + columnCounts[i];
            var columnClass = columnClasses[i];
            var divClass, ulClass = "menu";
            if (columnClass) {
                divClass = ulClass = columnClass
            }
            columns.push({ tagName: "ul", className: ulClass, childNodes: linkGroups.slice(start, end) });
            start = end
        }
        return columns
    };
    this.wrapFlyoutContentC = function wrapFlyoutContentC(content) {
        var columnCount = self.counts.length;
        var cardinals = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"];
        var flyoutClass = "dd_" + cardinals[columnCount] + "_column";
        var baseId = "sc_tab" + (self.flyoutNumber);
        var flyoutTopDom = { tagName: "div", className: "round_top", id: baseId + "_top", childNodes: [{ tagName: "div", className: "dd_shim", id: baseId + "_split"}] };
        var flyoutBottomDom = { tagName: "div", className: "round_footer", id: baseId + "_footer" };
        var flyoutInnerDiv = { tagName: "div", className: "flyoutInnerDiv", childNodes: content };
        var flyoutDomStructure = { tagName: "div", className: flyoutClass, id: baseId, childNodes: [flyoutTopDom, { tagName: "div", className: "container", id: baseId + "_container", childNodes: [flyoutInnerDiv] }, flyoutBottomDom] };
        return flyoutDomStructure
    };
    return this
};

jQuery.fn.appendDom = function (template) { return this.each(function () { for (element in template) { var el = (typeof (template[element].tagName) === "string") ? document.createElement(template[element].tagName) : document.createTextNode(""); delete template[element].tagName; for (attrib in template[element]) { if (attrib == "className") { jQuery(el).addClass(template[element][attrib]); delete template[element].className } switch (typeof (template[element][attrib])) { case "string": if (typeof (el[attrib]) === "string") { el[attrib] = template[element][attrib] } else { el.setAttribute(attrib, template[element][attrib]) } break; case "function": el[attrib] = template[element][attrib]; break; case "object": if (attrib === "childNodes") { jQuery(el).appendDom(template[element][attrib]) } break } } this.appendChild(el) } }) };

(function ($) { jQuery.fn.accessibleClick = function (functionToCall, options) { if (this.length > 1) { for (var i = 0; i < this.length; i++) { $(this[i]).accessibleClick(functionToCall, options) } return this } if (this.length < 1) { return this } var enableKeyDown = (options) ? options.disableKeyDown || false : false; var accessibleClick = this; this.data("active", false); this.initialize = function () { this.hover(function () { accessibleClick.data("active", true) }, function () { accessibleClick.data("active", false) }).keydown(function () { if (enableKeyDown) { accessibleClick.data("active", true) } }).keyup(function () { window.setTimeout(function () { if (enableKeyDown) { accessibleClick.data("active", false) } }, 1) }).click(function (event, data) { var isUserClick = data && (typeof data.isUserClick == "boolean") ? data.isUserClick : true; if (isUserClick && accessibleClick.data("active") != true) { return true } if (typeof functionToCall == "function") { functionToCall.apply(accessibleClick, arguments) } return false }) }; return this.initialize() } })(jQuery);

YAHOO.env.ua = function () { var o = { ie: 0, opera: 0, gecko: 0, webkit: 0, mobile: null, air: 0, caja: 0 }, ua = navigator.userAgent, m; if ((/KHTML/).test(ua)) { o.webkit = 1 } m = ua.match(/AppleWebKit\/([^\s]*)/); if (m && m[1]) { o.webkit = parseFloat(m[1]); if (/ Mobile\//.test(ua)) { o.mobile = "Apple" } else { m = ua.match(/NokiaN[^\/]*/); if (m) { o.mobile = m[0] } } m = ua.match(/AdobeAIR\/([^\s]*)/); if (m) { o.air = m[0] } } if (!o.webkit) { m = ua.match(/Opera[\s\/]([^\s]*)/); if (m && m[1]) { o.opera = parseFloat(m[1]); m = ua.match(/Opera Mini[^;]*/); if (m) { o.mobile = m[0] } } else { m = ua.match(/MSIE\s([^;]*)/); if (m && m[1]) { o.ie = parseFloat(m[1]) } else { m = ua.match(/Gecko\/([^\s]*)/); if (m) { o.gecko = 1; m = ua.match(/rv:([^\s\)]*)/); if (m && m[1]) { o.gecko = parseFloat(m[1]) } } } } } m = ua.match(/Caja\/([^\s]*)/); if (m && m[1]) { o.caja = parseFloat(m[1]) } return o } ();

/*
* outreach.textResizeDetector
* @fileoverview Rewritten text resize detector to remove jQuery dependency.
* Doesn't work in Opera.
* @usage 
* 
* 		outreach.textResizeDetector.init("id-of-dom-element", function(event, initialSize) {
* 			event.subscribe(textSizeChangeHandler);	
*		});
* 
* Previous license:
* 
* Copyright (c) 2008 Tom Deater (http://www.tomdeater.com)
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* Renamed to "onTextResize" for a more descriptive name
* Modified to check if the browser either zooms or text-resizes
* (Does not fire if browser uses zoom)
*
* uses an iframe, sized in ems, to detect text size changes then trigger a "textresize" event
* heavily based on code by Hedger Wang: http://www.hedgerwow.com/360/dhtml/js-onfontresize.html
*
* "textresize" event is triggered on the document object
* subscribe to event using: $(document).bind("textresize", function (event, data) {});
* "data" contains the current size of 1 em unit (in pixels)
* 
*/
window.target = window.target || {}; outreach.textResizeDetector = function () { var Y = YAHOO, E = Y.util.Event, UA = Y.env.ua; if (UA.opera) { return null } var fontSizeChangeEvent = new YAHOO.util.CustomEvent("fontsizechange"); var eventPath = "outreach.textResizeDetector.event"; var iframe; var size = {}; var sizePath = "outreach.textResizeDetector.setSize"; function init(container, callback) { createIframe(container); addBehavior(); callback(fontSizeChangeEvent, size) } function createIframe(container) { iframe = document.createElement("iframe"); iframe.src = "/iframe.html"; iframe.id = "frame-onTextResize" + new Date().getTime(); iframe.title = "empty"; iframe.frameborder = 0; var style = { width: "100em", height: "10px", position: "absolute", borderWidth: 0, top: "-9999px", left: "-9999px" }; for (var prop in style) { iframe.style[prop] = style[prop] } container.appendChild(iframe) } function addBehavior() { if (UA.ie) { E.on(iframe, "resize", onFontSizeChange) } else { var doc = iframe.contentWindow || iframe.contentDocument || iframe.document; doc = doc.document || doc; var iwindow = iframe.contentWindow; var s = 'style="width:100%;height:100%;padding:0;margin:0;overflow:hidden;"'; doc.open(); doc.write("<html " + s + "><body " + s + "></body></html>"); doc.close(); E.on(iwindow, "resize", onFontSizeChange) } size = iframe.offsetWidth / 100 } function onFontSizeChange() { size = iframe.offsetWidth / 100; fontSizeChangeEvent.fire(size) } return { init: function (id, callback) { E.onAvailable(id, function () { init(document.getElementById(id), callback) }) }, event: fontSizeChangeEvent, getSize: function () { return size }, setSize: function (newSize) { size = newSize } } } ();

target = window.target || {}; outreach.NAV = outreach.NAV || {}; outreach.NAV.Flyouts = outreach.NAV.Flyouts || {}; (function () { var Y = YAHOO, D = Y.util.Dom, E = Y.util.Event, UA = Y.env.ua, Flyouts = outreach.NAV.Flyouts; var positionParent; var timeout; var PX = "px"; Flyouts.create = function (parent, type, fontSize, topPaddingFix) { positionParent = positionParent || document.getElementById("globalheader"); type = type ? type : "Main"; var instance = new Flyouts[type](parent, fontSize, topPaddingFix); if (!instance.invalid) { return instance } }; Flyouts.Main = function (parent, fontSize, topPaddingFix) { var split = parent.id.split("_"); var index = split[2] - 1; outreach.ui.gn.flyoutsController.buildFlyout("Main", index); this.parent = parent; this.el = document.getElementById(parent.id.replace("main", "mainfly")); this.fontSize = fontSize; this.topPaddingFix = topPaddingFix; if (this.el) { if (window.sc && sc.incat && sc.incat.url) { jQuery("a", this.el).each(function () { sc.sellerCentralLinks(this) }) } } else { this.invalid = true; return } this.setup() }; Flyouts.Main.prototype = { setup: function () { this.label = this.el.getElementsByTagName("div")[0]; this.body = D.getElementsByClassName("gn_flybody", "div", this.el)[0]; this.fixSize(); this.addBehavior() }, setPosition: function () { showShim(this); D.setXY(this.el, [this.xPos, this.yPos]) }, fixSize: function () { this.labelWidth = this.parent.offsetWidth + this.options.labelWidthAdjust; this.label.style.width = this.labelWidth + PX; this.labelHeight = this.parent.offsetHeight + this.options.labelHeightAdjust; this.label.style.height = this.labelHeight + PX; this.label.style.top = -this.labelHeight + this.options.labelTopAdjust + PX; if (this.fontSize) { this.label.getElementsByTagName("a")[0].style.fontSize = this.fontSize + PX } if (this.topPaddingFix) { this.label.getElementsByTagName("a")[0].style.paddingTop = this.topPaddingFix + PX } if (this.labelWidth >= this.body.offsetWidth) { this.body.style.width = this.labelWidth + 5 + PX } }, options: { xOffset: 0, yOffset: 0, labelWidthAdjust: 0, labelHeightAdjust: 0, labelTopAdjust: 0, labelLeftAdjust: 0 }, addBehavior: function () { E.on(this.el, "mouseover", onMouseOver, this); E.on(this.el, "mouseout", onMouseLeave, this) }, getPosition: function () { var p = D.getXY(this.parent); this.xPos = p[0] + this.options.xOffset; this.yPos = p[1] + this.options.yOffset + this.label.offsetHeight }, fixFlyout: function () { flip(this); if (!this.fixed) { this.fixed = true; columnHeightFix(this); ieShadows(this) } }, show: function () { clearTimeout(timeout); if (this.el) { this.getPosition(); this.fixFlyout(this); this.setPosition() } }, hide: function () { clearTimeout(timeout); if (this.el) { this.el.style.left = "-9999px"; this.el.style.top = "-9999px"; hideShim() } }, focus: function () { this.label.getElementsByTagName("a")[0].focus() }, reset: function () { this.label.setAttribute("style", ""); D.removeClass(this.el, "right"); D.removeClass(this.el, "middle"); resetColumnHeights(this) } }; Flyouts.Sub = function (parent) { var split = parent.id.split("_"); var index = split[2] - 1; outreach.ui.gn.flyoutsController.buildFlyout("Sub", index); this.parent = parent; this.el = document.getElementById(parent.id.replace("sub", "subfly")); if (this.el) { if (window.sc && sc.incat && sc.incat.url) { jQuery("a", this.el).each(function () { sc.sellerCentralLinks(this) }) } } else { this.invalid = true; return } this.setup() }; Flyouts.Sub.prototype = {}; Y.extend(Flyouts.Sub, Flyouts.Main, { options: { xOffset: 0, yOffset: 0, labelWidthAdjust: 0, labelHeightAdjust: -5, labelTopAdjust: 4, labelLeftAdjust: 0 }, fixFlyout: function () { reposition(this); if (!this.fixed) { this.fixed = true; columnHeightFix(this); ieShadows(this) } } }); Flyouts.Special = function (parent) { this.parent = parent; this.el = document.getElementById(parent.id.replace("l2", "l2dd")); this.link = this.parent.getElementsByTagName("a"); if (this.link.length) { this.link = this.link[0]; this.offsets = this.link.rel.split("x"); this.offsets[0] = parseInt(this.offsets[0], 10); this.offsets[1] = parseInt(this.offsets[1], 10) } if (this.el) { if (window.sc && sc.incat && sc.incat.url) { jQuery("a", this.el).each(function () { sc.sellerCentralLinks(this) }) } } else { this.invalid = true; return } this.setup() }; Flyouts.Special.prototype = { setup: function () { E.on(this.el, "mouseover", onMouseOver, this); E.on(this.el, "mouseout", onMouseLeave, this) }, show: function () { if (this.el) { D.addClass(this.el, "show"); D.addClass(this.parent, "gn_over"); this.getPosition(); this.addLabelShim(); this.setPosition(); showShim(this) } }, hide: function () { if (this.el) { D.removeClass(this.el, "show"); D.removeClass(this.parent, "gn_over"); hideShim(this) } }, getPosition: function () { var p = D.getXY(this.parent); this.xPos = p[0] + this.offsets[0]; this.yPos = p[1] + this.offsets[1] }, setPosition: function () { this.el.style.left = this.xPos + PX; this.el.style.top = this.yPos + PX }, addLabelShim: function () { if (!this.labelShim) { var shim = document.createElement("a"); shim.href = this.parent.getElementsByTagName("a")[0].href; shim.className = "gn_special_shim"; shim.style.width = this.parent.offsetWidth + PX; shim.style.height = this.parent.offsetHeight + 6 + PX; shim.style.top = -this.parent.offsetHeight - 6 + PX; shim.style.left = D.getX(this.parent) - this.xPos + PX; this.el.appendChild(shim); this.labelShim = true } }, reset: function () { } }; function onMouseOver(e, flyout) { clearTimeout(timeout) } function onMouseLeave(e, flyout) { var parent = E.getRelatedTarget(e); while (parent && parent != this) { parent = parent.parentNode } if (parent != this) { timeout = setTimeout(function () { flyout.hide() }, 250) } } function maximumRight() { return D.getXY(positionParent)[0] + positionParent.offsetWidth } function flip(flyout) { var width = flyout.body.offsetWidth; if (flyout.xPos + width > maximumRight()) { setTabPosition(flyout, "right") } } function reposition(flyout) { var width = flyout.el.offsetWidth; var max = maximumRight(); if (flyout.xPos + width > max) { setTabPosition(flyout, flyout.xPos + width - max) } } function setTabPosition(flyout, position) { var moveTabLeftBy = 0, rightAligned = flyout.el.offsetWidth - flyout.label.offsetWidth, alignment; if (position === "right" || position >= rightAligned - 5) { moveTabLeftBy = rightAligned; alignment = "right" } else { if (position > 0) { alignment = "middle"; moveTabLeftBy = position } else { return } } D.addClass(flyout.el, alignment); flyout.label.style.left = moveTabLeftBy + "px"; flyout.xPos -= moveTabLeftBy } function columnHeightFix(flyout) { findColumns(flyout); if (flyout.moreCol && flyout.moreCol.offsetHeight < flyout.tallest) { var h = flyout.tallest + "px"; for (var i = -1, node; node = flyout.columns[++i]; ) { node.style.height = h } } } function findColumns(flyout) { if (flyout.columns) { return } var cols = [], tallest, moreCol, child; child = flyout.body.firstChild; tallest = 0; do { if (child.nodeType === 1 && child.className.indexOf("gn_col") > -1) { cols[cols.length] = child; if (child.className.indexOf("gn_more") > -1) { moreCol = child } else { if (child.offsetHeight >= tallest) { tallest = child.offsetHeight } } } } while (child = child.nextSibling); flyout.columns = cols; flyout.tallest = tallest; flyout.moreCol = moreCol } function resetColumnHeights(flyout) { if (flyout.columns) { for (var i = -1, node; node = flyout.columns[++i]; ) { node.style.height = "auto" } } } function ieShadows(flyout) { if (!UA.ie) { return } var body = flyout.body, label = flyout.label, bodyShadow = D.getElementsByClassName("gn_shadow", "div", body)[0], tabShadow = D.getElementsByClassName("gn_shadow", "div", label)[0]; if (UA.ie > 6 || document.compatMode == "CSS1Compat") { oddNumberedSizing(bodyShadow, body.offsetWidth, body.offsetHeight); oddNumberedSizing(tabShadow, label.offsetWidth, label.offsetHeight); var bodyEven = body.offsetWidth % 2 === 0, labelEven = label.offsetWidth % 2 === 0; if (D.hasClass(flyout.el, "right")) { if (bodyEven && labelEven) { } else { if (bodyEven) { body.style.left = -1 + PX } else { if (labelEven) { body.style.left = 1 + PX } } } } } else { bodyShadow.style.width = body.offsetWidth + 11 + PX; bodyShadow.style.height = body.offsetHeight + 10 + PX; tabShadow.style.width = label.offsetWidth + 11 + PX; tabShadow.style.height = label.offsetHeight + 10 + PX; if (D.hasClass(flyout.el, "right")) { var bodyEven = body.offsetWidth % 2 === 0, labelEven = label.offsetWidth % 2 === 0; if (bodyEven && labelEven) { } else { if (bodyEven) { body.style.left = 1 + PX } else { if (labelEven) { body.style.left = -1 + PX } } } } } } function oddNumberedSizing(el, w, h) { el.style.width = (w % 2 ? w - 1 : w) + PX; el.style.height = (h % 2 ? h - 1 : h) + PX } var iframe, K = function () { }, ie6 = (UA.ie && UA.ie < 7); function ieSupport() { iframe = document.createElement("iframe"); iframe.className = "gn_shim"; iframe.src = "/iframe.html"; iframe.title = "empty"; iframe.border = 0; document.body.appendChild(iframe) } Flyouts.ieSupport = ie6 ? ieSupport : K; var showShim = ie6 ? function (flyout) { D.setXY(iframe, [flyout.xPos, flyout.yPos]); iframe.style.width = flyout.el.offsetWidth + PX; iframe.style.height = flyout.el.offsetHeight + PX } : K; var hideShim = ie6 ? function (flyout) { iframe.style.left = "-9999px"; iframe.style.top = "-9999px" } : K } ());

jQuery(document).ready(

function call_FlyoutsController_build() {
    var controller = outreach.ui.gn.flyoutsController;
    controller.build.call(controller);
    //alert("build complete");

}
);

outreach.ui.gn.flyoutsController =
{
    flyoutsAttachmentPoint: {},
    incatsRootNode: {},
    supercatsRootNode: {},
    checkDependencies: true,
    initialized: false,
    globalUrlParams: "",
    init: function init_flyoutsController() { if (this.initialized !== true) { if (this.checkDependencies && !this.dependenciesOk()) { return false } } this.initialized = true; return this.initialized },
    build: function build_flyoutsController() {
        try {
            var initOk = this.init();
            if (initOk === false)
            { return }

            var cfg =
            {
                flyoutsAttachmentPointSelector: "#gn_fly",
                supercatsTabsSelector: "#gn_main li",
                supercatsTabsHighlightClass: "gn_active",
                incatsRowSelector: "#gn_sub",
                preserveParams: { releaseID: 1, customerID: 1, sc_server_name: 1, weblab: 1 },
                searchCategorySelector: "gn_search_scope"
            };
            if (!outreach.ui.gn.data) {
                if (window.console && console.error) {
                    console.error("can't find menu data")
                }
                return
            }
            var addedParams = [];
            if (window.location.search) {
                var searchString = "";
                if (window.location.search.charAt(0) == "?") {
                    searchString = window.location.search.substring(1, window.location.search.length)
                }
                else {
                    searchString = window.location.search
                }
                if (searchString && searchString.length > 0) {
                    var keyValues = searchString.split("&");
                    if (keyValues.length > 0) {
                        for (var i = 0; i < keyValues.length; i++) {
                            var kvPair = keyValues[i].split("=");
                            if (kvPair.length == 2) {
                                if (cfg.preserveParams[kvPair[0]]) {
                                    addedParams.push(keyValues[i])
                                }
                            }
                        }
                    }
                }
            }

            this.globalUrlParams = addedParams.join("&");
            this.setDefaultSearch(cfg.searchCategorySelector);
            var supercats = outreach.ui.gn.data.supercats;
            if (supercats) {
                this.supercatsRootNode = new outreach.ui.gn.Node(supercats.data, { recurse: 1, addedUrlParams: this.globalUrlParams });

                this.highlightSupercatTab(this.supercatsRootNode, cfg.supercatsTabsSelector, cfg.supercatsTabsHighlightClass)
            }

            var incat = outreach.ui.gn.incat;
            if (incat) {
                var incatObject = outreach.ui.gn.data.incat;
                if (incatObject) {
                    this.incatsRootNode = new outreach.ui.gn.Node(incatObject.data, { recurse: 1, addedUrlParams: this.globalUrlParams }, incat);
                    this.populateIncatsRow(this.incatsRootNode, cfg.incatsRowSelector);
                    outreach.NAV.initFlyouts()
                }
            }

            if (typeof (cfg.flyoutsAttachmentPointSelector) != "undefined") {
                this.flyoutsAttachmentPoint = jQuery(cfg.flyoutsAttachmentPointSelector)
            }
            if (this.flyoutsAttachmentPoint.length == 0) {
                var newElement = document.createElement("div");
                newElement.setAttribute("id", "gn_fly");
                jQuery("body").append(newElement);
                this.flyoutsAttachmentPoint = jQuery(newElement)
            }
        }
        catch (e) {
            if (window.console && console.error) {
                console.error("could not build global nav flyouts: ", e)
            }
        }
    },
    buildFlyout: function buildSingleFlyout(type, index) {
        var rootNode;
        var dataSource;
        if (type == "Main") {
            dataSource = outreach.ui.gn.data.supercats;
            rootNode = this.supercatsRootNode;
            type = "main"
        }
        else {
            var incat = outreach.ui.gn.incat;
            var incatObject = outreach.ui.gn.data.incat;
            if (incatObject) {
                dataSource = incatObject;
                rootNode = this.incatsRootNode;
                type = "sub"
            }
        }
        if (dataSource && rootNode) {
            var data = dataSource.data.children[index];
            var structure = dataSource.structure[index];
            var node = new outreach.ui.gn.Node(data, { parentNode: rootNode, siblingNumber: index + 1, flyoutNumber: index + 1, menuOrder: { counter: 0 }, recurse: 10, addedUrlParams: this.globalUrlParams });
            var flyout = new outreach.ui.gn.Flyout(node, structure, index, type);
            if (flyout && flyout.getDomTemplate) {
                var domTemplate = flyout.getDomTemplate();
                if (domTemplate) {
                    this.flyoutsAttachmentPoint.appendDom([domTemplate])
                }
            }
        }
    },
    highlightSupercatTab: function highlightSupercatTab(root, tabsSelector, highlightClass) {
        incat = outreach.ui.gn.incat;
        if (!root || !incat) {
            return
        }
        var childNodes = root.childNodes;
        for (var i = 0, len = childNodes.length; i < len; i++) {
            if (incat == "icn_" + childNodes[i].location) {
                jQuery(tabsSelector).eq(i).addClass(highlightClass).prepend("<span></span>");
                return
            }
        }
    },
    setDefaultSearch: function setDefaultSearch(categorySelector) {
        outreach.NAV.initSearch(); incat = outreach.ui.gn.incat;
        if (!categorySelector || !incat) { return }
        var categoryObject = document.getElementById(categorySelector);
        var selectedCategory = categoryObject.options[categoryObject.selectedIndex];
        var selectedNodeId = selectedCategory.value;
        if (selectedNodeId == "1038576|1287991011") {
            $("#" + categorySelector + "> option").each(function (index) {
                if ("icn_" + $(this).attr("value") == incat) {
                    categoryObject.setIndex(index)
                }
            })
        }
    },
    populateIncatsRow: function populateIncatsRow(root, rowSelector) {
        if (!root)
        { return }
        var childTemplates = [];
        var childNodes = root.childNodes;
        var itemId, itemClass;
        for (var i = 0, len = childNodes.length; i < len; i++) {
            var child = childNodes[i];
            child.flyoutNumber = i + 1;
            var linkTmpl = child.getDomTemplate();
            itemClass = "";
            if (child.isParent()) {
                itemId = "gn_sub_" + (i + 1)
            }
            else {
                itemClass = "noFlyout ";
                itemId = ""
            }
            if (i == 0) {
                itemClass += "first-child"
            }
            else {
                if (i == len - 1) {
                    itemClass += "last-child"
                }
            }
            childTemplates.push({ tagName: "li", id: itemId, className: itemClass, childNodes: [linkTmpl] })
        }
        var template = [{ tagName: "ul", childNodes: childTemplates}];
        jQuery(rowSelector).appendDom(template)
    },
    dependenciesOk: function dependenciesOk() {
        try {
            return (document && document.getElementById && jQuery && jQuery.fn.appendDom)
        }
        catch (e)
        { return false }
    }
};

target = window.target || {};
outreach.NAV = outreach.NAV || {};
(function () {
    var Y = YAHOO, D = Y.util.Dom, E = Y.util.Event, UA = Y.env.ua, Flyouts = outreach.NAV.Flyouts, ComboBox = outreach.NAV.ComboBox;
    outreach.NAV.ARIA = (UA.gecko && UA.gecko >= 1.9) || (UA.ie && UA.ie >= 8);
    var FOCUS = UA.ie ? "focusin" : "focus", BLUR = UA.ie ? "focusout" : "blur";
    E.onAvailable("gn_search_scope", initSearch);
    E.onAvailable("gn_main_fix", updateNav);
    E.onDOMReady(initFlyouts);
    var main, mainItems, sub, subItems, lists, listsItems, combobox, searchInput;
    var newFontSize = false, topPaddingFix, baseFontSize = 1.2, fontSizeFactor = 30, defaultPadding = 10;
    var flyouts = {};
    function initSearch() {
        if (typeof (initSearch.called) != "undefined")
        { return }
        initSearch.called = true;
        combobox = document.getElementById("gn_search_scope");
        if (combobox) {
            ComboBox.create(combobox, hideFlyouts, document.getElementById("globalheader"));
            searchInput = document.getElementById("gn_search_input");
            if (D.hasClass(searchInput.form.parentNode, "gn_below")) {
                outreach.NAV.InlineLabel.apply(searchInput)
            }
        }
    }
    outreach.NAV.initSearch = initSearch;
    function initFlyouts() {
        if (findElements()) {
            redrawSupercats();
            resizeDetector();
            addBehavior()
        }
        else {
            setTimeout(initFlyouts, 1000)
        }
    }
    outreach.NAV.initFlyouts = initFlyouts;
    function findElements() {
        main = document.getElementById("gn_main");
        if (!main) { return false }
        mainItems = main.getElementsByTagName("a");
        sub = document.getElementById("gn_sub");
        if (sub) {
            subItems = sub.getElementsByTagName("li")
        }
        lists = document.getElementById("gn_lists");
        if (lists) {
            listsItems = lists.getElementsByTagName("li")
        }
        return true
    }
    function addBehavior() {
        Flyouts.ieSupport();
        E.on(mainItems, "mouseover", onMouseOver, "Main");
        E.on(mainItems, "mouseout", killDelay);
        if (subItems && subItems.length > 0) {
            E.on(subItems, "mouseover", onMouseOver, "Sub");
            E.on(subItems, "mouseout", killDelay)
        }
        if (listsItems && listsItems.length > 0) {
            E.on(listsItems, "mouseover", onMouseOver, "Special");
            E.on(listsItems, "mouseout", killDelay)
        }
        E.on(document.body, "click", clickBody)
    }
    var delay;
    function onMouseOver(e, type) {
        clearTimeout(delay);
        var trigger = this;
        openFunc = function () {
            if (trigger.nodeName.toLowerCase() === "a") {
                trigger = trigger.parentNode
            }
            showFlyout(trigger, type)
        };
        delay = setTimeout(openFunc, 50)
    }
    function killDelay() {
        clearTimeout(delay)
    }
    function showFlyout(item, type, focusAfterShow) {
        hideFlyouts();
        if (D.hasClass(item, "gn_active"))
        { return }
        if (!flyouts[item.id]) {
            flyouts[item.id] = Flyouts.create(item, type, newFontSize, topPaddingFix)
        }
        if (flyouts[item.id]) {
            flyouts[item.id].show();
            if (focusAfterShow) {
                flyouts[item.id].focus()
            }
        }
    }
    function hideFlyouts() {
        for (var id in flyouts) {
            if (flyouts.hasOwnProperty(id) && flyouts[id]) {
                flyouts[id].hide()
            }
        }
    }
    function clickBody(e) {
        var trigger = E.getTarget(e);
        while (trigger.parentNode) {
            if (trigger.id == "gn_fly" || trigger.id == "l2dd_giftfinder" || trigger.id == "l2dd_registry")
            { return }
            trigger = trigger.parentNode
        }
        hideFlyouts()
    }
    var baseSize = 10, currentSize;
    function resizeDetector(callback) {
        if (outreach.textResizeDetector) {
            outreach.textResizeDetector.init("globalheader", function (event, size) {
                currentSize = size;
                outreach.textResizeDetector.event.subscribe(onTextResize);
                reformatMainNav()
            })
        }
    }
    function onTextResize() {
        var newSize = outreach.textResizeDetector.getSize();
        if (currentSize !== newSize) {
            for (var id in flyouts) {
                if (flyouts.hasOwnProperty(id)) {
                    flyouts[id].reset();
                    flyouts[id] = null
                }
            }
            flyouts = {}
        }
        currentSize = newSize;
        reformatMainNav()
    }
    function reformatMainNav() {
        if (currentSize > baseSize) {
            D.addClass(main, "tooBig")
        }
        else {
            D.removeClass(main, "tooBig")
        }
    }
    function updateNav() {
        redrawSupercats();
        navWidths()
    }
    function redrawSupercats() {
        if (!outreach.ui.gn.redrawSupercats)
        { return }
        if (typeof (redrawSupercats.called) == "undefined") {
            redrawSupercats.called = true
        }
        else
        { return }
        if (outreach.ui.gn.data.supercats) {
            var supercats = outreach.ui.gn.data.supercats.data;
            var supercatsDiv = document.getElementById("gn_main");
            var incat = outreach.ui.gn.incat;
            var newList = document.createElement("ul");
            for (var i = 0; i < supercats.children.length; i++) {
                var linkNum = i + 1;
                var child = supercats.children[i];
                var newItem = document.createElement("li");
                newItem.setAttribute("id", "gn_main_" + linkNum);
                var className = "";
                if (i == 0) {
                    className += " first-child"
                }
                if (i == supercats.children.length - 1) {
                    className += " last-child"
                }
                if (incat == "icn_" + child.location) {
                    var emptySpan = document.createElement("span");
                    newItem.appendChild(emptySpan); className += " gn_active"
                }

                if (className) {
                    newItem.setAttribute("class", className);
                    newItem.setAttribute("className", className)
                }

                //if (child.style) { newItem.setAttribute("style", child.style); } //rrw

                var newLink = document.createElement("a");
                newLink.setAttribute("href", outreach.ui.gn.nonsecureserver + "/b/ref=nav_t_spc_" + linkNum + "_0?ie=UTF8&node=" + child.location);
                if (child.title) {
                    newLink.setAttribute("title", child.title)
                }
                newLink.innerHTML = child.text;
                newItem.appendChild(newLink);
                newList.appendChild(newItem)
            }
            var list = supercatsDiv.getElementsByTagName("ul")[0];
            supercatsDiv.insertBefore(newList, list);
            supercatsDiv.removeChild(list)
        }
    }
    function navWidths() {
        var main = document.getElementById("gn_main"), maxWidth = main.offsetWidth, lis = main.getElementsByTagName("li"), links = main.getElementsByTagName("a"), count = lis.length;
        measureAndFix();
        function measureAndFix(bypassfont) {
            var widths = [], totalWidth = 0;
            for (var i = -1, node, width; node = lis[++i]; ) {
                width = node.offsetWidth - defaultPadding;
                widths[widths.length] = width; totalWidth += width
            }
            var padding = (maxWidth - totalWidth) / count, usablePadding = Math.floor(padding), extra = Math.floor(((padding * count) - (usablePadding * count)) / 2);
            if (!bypassfont) {
                newFontSize = usablePadding > fontSizeFactor ? (baseFontSize + (usablePadding - fontSizeFactor) / fontSizeFactor) * 10 : false;
                if (newFontSize) {
                    if (newFontSize >= 13) {
                        if (newFontSize > 20) {
                            newFontSize = 20
                        }
                        switch (Math.floor(newFontSize)) {
                            case 13:
                                topPaddingFix = 11;
                                break;
                            case 14:
                                topPaddingFix = 10;
                                break;
                            case 15:
                                topPaddingFix = 9;
                                break;
                            case 16: topPaddingFix = 9;
                                break;
                            case 17: topPaddingFix = 8;
                                break;
                            default: topPaddingFix = 7
                        }
                        $("#gn_main li a,#gn_main li span.nolink").css("padding-top", topPaddingFix)
                    }
                    for (var i = -1, link; link = links[++i]; ) {
                        link.style.fontSize = newFontSize + "px"
                    }
                    measureAndFix(true)
                }
                else {
                    resize(widths, extra, usablePadding)
                }
            }
            else {
                resize(widths, extra, usablePadding)
            }
        }
        function resize(widths, extra, usablePadding) { widths[0] += extra; widths[count - 1] += extra; var newTotal = 0; for (var i = -1, link, style; link = links[++i]; ) { D.addClass(link, "fixed"); style = link.style; if (widths[i]) { newTotal += widths[i] + usablePadding; style.width = widths[i] + usablePadding + "px" } } if (newTotal < maxWidth) { links[links.length - 1].style.width = widths[widths.length - 1] + usablePadding + Math.floor(maxWidth - newTotal) } } 
    } 
} ());

function clearDefaultText(e) { var target = window.event ? window.event.srcElement : e ? e.target : null; if (!target) return; if (target.value == target.defaultText) { target.value = ''; } };

function css_browser_selector(u) { var ua = u.toLowerCase(), is = function (t) { return ua.indexOf(t) > -1 }, g = 'gecko', w = 'webkit', s = 'safari', o = 'opera', m = 'mobile', h = document.documentElement, b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('msie ie ie' + RegExp.$1) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3.6') ? g + ' ff3 ff3_6' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g + ' ff4' : is('firefox/4') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.$1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.$2 : '')) : is('konqueror') ? 'konqueror' : is('blackberry') ? m + ' blackberry' : is('android') ? m + ' android' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.$1 : '') : is('mozilla/') ? g : '', is('j2me') ? m + ' j2me' : is('iphone') ? m + ' iphone' : is('ipod') ? m + ' ipod' : is('ipad') ? m + ' ipad' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' + (is('windows nt 6.0') ? ' vista' : '') : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js']; c = b.join(' '); h.className += ' ' + c; return c; }; css_browser_selector(navigator.userAgent);

jQuery.cookie = function (name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options.expires = -1 } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)) } else { date = options.expires } expires = '; expires=' + date.toUTCString() } var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('') } else { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break } } } return cookieValue } };

(function ($) { $.fn.toggleFade = function (settings) { if (settings == undefined) { settings = { speedIn: 'slow'} } settings = jQuery.extend({ speedIn: "normal", speedOut: settings.speedIn }, settings); return this.each(function () { var isHidden = jQuery(this).is(":hidden"); jQuery(this)[isHidden ? "fadeIn" : "fadeOut"](isHidden ? settings.speedIn : settings.speedOut) }) } })(jQuery);
(function ($) { $.fn.toggleSlide = function (settings) { if (settings == undefined) { settings = { speedIn: 'slow'} } settings = jQuery.extend({ speedIn: "normal", speedOut: settings.speedIn }, settings); return this.each(function () { var isHidden = jQuery(this).is(":hidden"); jQuery(this)[isHidden ? "slideDown" : "slideUp"](isHidden ? settings.speedIn : settings.speedOut) }) } })(jQuery);

var FORMALIZE = (function ($, window, undefined) { var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input'); var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input'); var IE6 = !!($.browser.msie && parseInt($.browser.version, 10) === 6); var IE7 = !!($.browser.msie && parseInt($.browser.version, 10) === 7); return { go: function () { for (var i in FORMALIZE.init) { FORMALIZE.init[i]() } }, init: { full_input_size: function () { if (!(IE6 || IE7) || !$('textarea, input.input_full').length) { return } $('textarea, input.input_full').wrap('<span class="input_full_wrap"></span>') }, ie6_skin_inputs: function () { if (!IE6 || !$('input, select, textarea').length) { return } var button_regex = /button|submit|reset/; var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/; $('input').each(function () { var el = $(this); if (this.type.match(button_regex)) { el.addClass('ie6_button'); if (this.disabled) { el.addClass('ie6_button_disabled') } } else if (this.type.match(type_regex)) { el.addClass('ie6_input'); if (this.disabled) { el.addClass('ie6_input_disabled') } } }); $('textarea, select').each(function () { if (this.disabled) { $(this).addClass('ie6_input_disabled') } }) }, placeholder: function () { if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) { return } $(':input[placeholder]').each(function () { var el = $(this); var text = el.attr('placeholder'); function add_placeholder() { if (!el.val() || el.val() === text) { el.val(text).addClass('placeholder_text') } } add_placeholder(); el.focus(function () { if (el.val() === text) { el.val('').removeClass('placeholder_text') } }).blur(function () { if (!el.val()) { el.val(text).addClass('placeholder_text') } }); el.closest('form').submit(function () { if (el.val() === text) { el.val('') } }).bind('reset', function () { setTimeout(add_placeholder, 50) }) }) }, autofocus: function () { if (AUTOFOCUS_SUPPORTED || !$(':input[autofocus]').length) { return } $(':input[autofocus]:visible:first').select() } }} })(jQuery, this);

jQuery.fn.shake = function (intShakes, intDistance, intDuration) { this.each(function () { $(this).css({ position: 'relative' }); for (var x = 1; x <= intShakes; x++) { $(this).animate({ left: (intDistance * -1) }, (((intDuration / intShakes) / 4))).animate({ left: intDistance }, ((intDuration / intShakes) / 2)).animate({ left: 0 }, (((intDuration / intShakes) / 4))) } }); return this };

(function ($) {
    $.fn.placeHoldize = (function () {
        var supportsPlaceholder = (function (elem) { return !!(elem.placeholder === '') && !!(elem.placeholder !== undefined); })(document.createElement('input')); function _placeHoldize(force) {
            var $this = $(this); if (!force && (supportsPlaceholder || !$this.attr('placeholder')) && !$this.is('textarea')) { return; } var placeHolder = $this.attr('placeholder'); if ($this.val().length <= 0 || $this.val() == placeHolder) { $this.val(''); $this.removeAttr('placeholder').addClass('placeholder-visible'); $this.val(placeHolder); } else
            { $this.removeClass('placeholder-visible').addClass('placeholder-hidden'); } $this.addClass('placeholdized'); $this.focus(function () { var $this = $(this); if ($this.val() === placeHolder) { $this.val(''); $this.removeClass('placeholder-visible').addClass('placeholder-hidden'); } }); $this.blur(function () {
                var $this = $(this); if ($this.val() === '') { $this.val(placeHolder); $this.removeClass('placeholder-hidden').addClass('placeholder-visible'); } else
                { $this.removeClass('placeholder-visible').addClass('placeholder-hidden'); } 
            });
        } function _emptyFormOnSubmit($elements) { var $forms = $elements.closest('form'); $forms.submit(function () { var $this = $(this); if ($this.data('placeHoldize.submitHandlerCalled')) { return; } $this.find('.placeholder-visible').val('').data('placeHoldize.submitHandlerCalled', true); }); return true; } return function (force) { this.each(function () { _placeHoldize.call(this, force); }); _emptyFormOnSubmit(this); return this; };
    })();
})(jQuery);

(function ($) { $.fn.tipTip = function (options) { var defaults = { activation: "hover", keepAlive: false, maxWidth: "200px", edgeOffset: 3, defaultPosition: "bottom", delay: 400, fadeIn: 200, fadeOut: 200, attribute: "title", content: false, enter: function () { }, exit: function () { } }; var opts = $.extend(defaults, options); if ($("#tiptip_holder").length <= 0) { var tiptip_holder = $('<div id="tiptip_holder" style="max-width:' + opts.maxWidth + ';"></div>'); var tiptip_content = $('<div id="tiptip_content"></div>'); var tiptip_arrow = $('<div id="tiptip_arrow"></div>'); $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>'))) } else { var tiptip_holder = $("#tiptip_holder"); var tiptip_content = $("#tiptip_content"); var tiptip_arrow = $("#tiptip_arrow") } return this.each(function () { var org_elem = $(this); if (opts.content) { var org_title = opts.content } else { var org_title = org_elem.attr(opts.attribute) } if (org_title != "") { if (!opts.content) { org_elem.removeAttr(opts.attribute) } var timeout = false; if (opts.activation == "hover") { org_elem.hover(function () { active_tiptip() }, function () { if (!opts.keepAlive) { deactive_tiptip() } }); if (opts.keepAlive) { tiptip_holder.hover(function () { }, function () { deactive_tiptip() }) } } else if (opts.activation == "focus") { org_elem.focus(function () { active_tiptip() }).blur(function () { deactive_tiptip() }) } else if (opts.activation == "click") { org_elem.click(function () { active_tiptip(); return false }).hover(function () { }, function () { if (!opts.keepAlive) { deactive_tiptip() } }); if (opts.keepAlive) { tiptip_holder.hover(function () { }, function () { deactive_tiptip() }) } } function active_tiptip() { opts.enter.call(this); tiptip_content.html(org_title); tiptip_holder.hide().removeAttr("class").css("margin", "0"); tiptip_arrow.removeAttr("style"); var top = parseInt(org_elem.offset()['top']); var left = parseInt(org_elem.offset()['left']); var org_width = parseInt(org_elem.outerWidth()); var org_height = parseInt(org_elem.outerHeight()); var tip_w = tiptip_holder.outerWidth(); var tip_h = tiptip_holder.outerHeight(); var w_compare = Math.round((org_width - tip_w) / 2); var h_compare = Math.round((org_height - tip_h) / 2); var marg_left = Math.round(left + w_compare); var marg_top = Math.round(top + org_height + opts.edgeOffset); var t_class = ""; var arrow_top = ""; var arrow_left = Math.round(tip_w - 12) / 2; if (opts.defaultPosition == "bottom") { t_class = "_bottom" } else if (opts.defaultPosition == "top") { t_class = "_top" } else if (opts.defaultPosition == "left") { t_class = "_left" } else if (opts.defaultPosition == "right") { t_class = "_right" } var right_compare = (w_compare + left) < parseInt($(window).scrollLeft()); var left_compare = (tip_w + left) > parseInt($(window).width()); if ((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))) { t_class = "_right"; arrow_top = Math.round(tip_h - 13) / 2; arrow_left = -12; marg_left = Math.round(left + org_width + opts.edgeOffset); marg_top = Math.round(top + h_compare) } else if ((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)) { t_class = "_left"; arrow_top = Math.round(tip_h - 13) / 2; arrow_left = Math.round(tip_w); marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5)); marg_top = Math.round(top + h_compare) } var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop()); var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0; if (top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)) { if (t_class == "_top" || t_class == "_bottom") { t_class = "_top" } else { t_class = t_class + "_top" } arrow_top = tip_h; marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset)) } else if (bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)) { if (t_class == "_top" || t_class == "_bottom") { t_class = "_bottom" } else { t_class = t_class + "_bottom" } arrow_top = -12; marg_top = Math.round(top + org_height + opts.edgeOffset) } if (t_class == "_right_top" || t_class == "_left_top") { marg_top = marg_top + 5 } else if (t_class == "_right_bottom" || t_class == "_left_bottom") { marg_top = marg_top - 5 } if (t_class == "_left_top" || t_class == "_left_bottom") { marg_left = marg_left + 5 } tiptip_arrow.css({ "margin-left": arrow_left + "px", "margin-top": arrow_top + "px" }); tiptip_holder.css({ "margin-left": marg_left + "px", "margin-top": marg_top + "px" }).attr("class", "tip" + t_class); if (timeout) { clearTimeout(timeout) } timeout = setTimeout(function () { tiptip_holder.stop(true, true).fadeIn(opts.fadeIn) }, opts.delay) } function deactive_tiptip() { opts.exit.call(this); if (timeout) { clearTimeout(timeout) } tiptip_holder.fadeOut(opts.fadeOut) } } }) } })(jQuery);

(function (c) { c.anythingSlider = function (g, i) { var a = this; a.$el = c(g).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>'); a.$el.data("AnythingSlider", a); a.init = function () { a.options = c.extend({}, c.anythingSlider.defaults, i); c.isFunction(a.options.onBeforeInitialize) && a.$el.bind("before_initialize", a.options.onBeforeInitialize); a.$el.trigger("before_initialize", a); a.$wrapper = a.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-" + a.options.theme); a.$window = a.$el.closest("div.anythingWindow"); a.$controls = c('<div class="anythingControls"></div>').appendTo(a.options.appendControlsTo !== null && c(a.options.appendControlsTo).length ? c(a.options.appendControlsTo) : a.$wrapper); a.win = window; a.$win = c(a.win); a.$nav = c('<ul class="thumbNav" />').appendTo(a.$controls); a.timer = null; a.flag = false; a.playing = false; a.hovered = false; a.panelSize = []; a.currentPage = a.options.startPanel; a.adjustLimit = a.options.infiniteSlides ? 0 : 1; a.options.playRtl && a.$wrapper.addClass("rtl"); a.original = [a.options.autoPlay, a.options.buildNavigation, a.options.buildArrows]; a.updateSlider(); a.$currentPage = a.$items.eq(a.currentPage); a.$lastPage = a.$currentPage; a.runTimes = c("div.anythingSlider").index(a.$wrapper) + 1; a.regex = RegExp("panel" + a.runTimes + "-(\\d+)", "i"); if (!c.isFunction(c.easing[a.options.easing])) a.options.easing = "swing"; a.options.theme !== "default" && !c("link[href*=" + a.options.theme + "]").length && c("body").append('<link rel="stylesheet" href="' + a.options.themeDirectory.replace(/\{themeName\}/g, a.options.theme) + '" type="text/css" />'); a.options.pauseOnHover && a.$wrapper.hover(function () { if (a.playing) { a.$el.trigger("slideshow_paused", a); a.clearTimer(true) } }, function () { if (a.playing) { a.$el.trigger("slideshow_unpaused", a); a.startStop(a.playing, true) } }); var b = a.options.hashTags ? a.gotoHash() || a.options.startPanel : a.options.startPanel; a.setCurrentPage(b, false); a.slideControls(false); a.$wrapper.bind("mouseenter mouseleave", function (e) { a.hovered = e.type === "mouseenter" ? true : false; a.slideControls(a.hovered, false) }); a.options.enableKeyboard && c(document).keyup(function (e) { if (a.$wrapper.is(".activeSlider")) switch (e.which) { case 39: a.goForward(); break; case 37: a.goBack() } }); var d = "slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" "); c.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function (e, f) { c.isFunction(a.options[f]) && a.$el.bind(d[e], a.options[f]) }); c.isFunction(a.options.onSlideComplete) && a.$el.bind("slide_complete", function () { setTimeout(function () { a.options.onSlideComplete(a) }, 0) }); a.$el.trigger("initialized", a) }; a.updateSlider = function () { a.$el.find("li.cloned").remove(); a.$nav.empty(); a.$items = a.$el.find("> li"); a.pages = a.$items.length; if (a.options.resizeContents) { a.options.width && a.$wrapper.add(a.$items).css("width", a.options.width); a.options.height && a.$wrapper.add(a.$items).css("height", a.options.height) } if (a.pages === 1) { a.options.autoPlay = false; a.options.buildNavigation = false; a.options.buildArrows = false; a.$controls.hide(); a.$nav.hide(); a.$forward && a.$forward.add(a.$back).hide() } else { a.options.autoPlay = a.original[0]; a.options.buildNavigation = a.original[1]; a.options.buildArrows = a.original[2]; a.$controls.show(); a.$nav.show(); a.$forward && a.$forward.add(a.$back).show() } a.buildNavigation(); if (a.options.autoPlay) { a.playing = !a.options.startStopped; a.buildAutoPlay() } a.options.buildArrows && a.buildNextBackButtons(); a.$el.prepend(a.options.infiniteSlides ? a.$items.filter(":last").clone().addClass("cloned").removeAttr("id") : c('<li class="cloned" />')); a.$el.append(a.options.infiniteSlides ? a.$items.filter(":first").clone().addClass("cloned").removeAttr("id") : c('<li class="cloned" />')); a.$el.find("li.cloned").each(function () { c(this).html(c(this).html().replace(/<a/gi, "<span").replace(/\/a>/gi, "/span>")); c(this).find("[id]").removeAttr("id") }); a.$items = a.$el.find("> li").addClass("panel"); a.setDimensions(); a.options.resizeContents || a.$win.load(function () { a.setDimensions() }); if (a.currentPage > a.pages) { a.currentPage = a.pages; a.setCurrentPage(a.pages, false) } a.$nav.find("a").eq(a.currentPage - 1).addClass("cur"); a.hasEmb = a.$items.find("embed[src*=youtube]").length; a.hasSwfo = typeof swfobject !== "undefined" && swfobject.hasOwnProperty("embedSWF") && c.isFunction(swfobject.embedSWF) ? true : false; a.hasEmb && a.hasSwfo && a.$items.find("embed[src*=youtube]").each(function (b) { var d = c(this).parent()[0].tagName === "OBJECT" ? c(this).parent() : c(this); d.wrap('<div id="ytvideo' + b + '"></div>'); swfobject.embedSWF(c(this).attr("src") + "&enablejsapi=1&version=3&playerapiid=ytvideo" + b, "ytvideo" + b, d.attr("width"), d.attr("height"), "10", null, null, { allowScriptAccess: "always", wmode: a.options.addWmodeToObject, allowfullscreen: true }, { "class": d.attr("class"), style: d.attr("style") }, function () { b >= a.hasEmb - 1 && a.$el.trigger("swf_completed", a) }) }); a.$items.find("a").unbind("focus").bind("focus", function (b) { a.$items.find(".focusedLink").removeClass("focusedLink"); c(this).addClass("focusedLink"); var d = c(this).closest(".panel"); if (!d.is(".activePage")) { a.gotoPage(a.$items.index(d)); b.preventDefault() } }) }; a.buildNavigation = function () { a.options.buildNavigation && a.pages > 1 && a.$items.filter(":not(.cloned)").each(function (b) { var d = b + 1; b = (d === 1 ? "first" : "") + (d === a.pages ? "last" : ""); b = c('<a href="#"></a>').addClass("panel" + d).wrap('<li class="' + b + '" />'); a.$nav.append(b.parent()); if (c.isFunction(a.options.navigationFormatter)) { var e = a.options.navigationFormatter(d, c(this)); b.html(e); parseInt(b.css("text-indent"), 10) < 0 && b.addClass(a.options.tooltipClass).attr("title", e) } else b.text(d); b.bind(a.options.clickControls, function (f) { if (!a.flag && a.options.enableNavigation) { a.flag = true; setTimeout(function () { a.flag = false }, 100); a.gotoPage(d); a.options.hashTags && a.setHash(d) } f.preventDefault() }) }) }; a.buildNextBackButtons = function () { if (!a.$forward) { a.$forward = c('<span class="arrow forward"><a href="#">' + a.options.forwardText + "</a></span>"); a.$back = c('<span class="arrow back"><a href="#">' + a.options.backText + "</a></span>"); a.$back.bind(a.options.clickArrows, function (b) { a.goBack(); b.preventDefault() }); a.$forward.bind(a.options.clickArrows, function (b) { a.goForward(); b.preventDefault() }); a.$back.add(a.$forward).find("a").bind("focusin focusout", function () { c(this).toggleClass("hover") }); a.$wrapper.prepend(a.$forward).prepend(a.$back); a.$arrowWidth = a.$forward.width() } }; a.buildAutoPlay = function () { if (!a.$startStop) { a.$startStop = c("<a href='#' class='start-stop'></a>").html(a.playing ? a.options.stopText : a.options.startText); a.$controls.prepend(a.$startStop); a.$startStop.bind(a.options.clickSlideshow, function (b) { if (a.options.enablePlay) { a.startStop(!a.playing); if (a.playing) a.options.playRtl ? a.goBack(true) : a.goForward(true) } b.preventDefault() }).bind("focusin focusout", function () { c(this).toggleClass("hover") }); a.startStop(a.playing) } }; a.setDimensions = function () { var b, d, e, f, j, h = 0, k = a.$window.width(), l = a.$win.width(); a.$items.each(function (m) { e = c(this).children("*"); if (a.options.resizeContents) { b = parseInt(a.options.width, 10) || k; d = parseInt(a.options.height, 10) || a.$window.height(); c(this).css({ width: b, height: d }); if (e.length === 1) { e.css({ width: "100%", height: "100%" }); e[0].tagName === "OBJECT" && e.find("embed").andSelf().attr({ width: "100%", height: "100%" }) } } else { b = c(this).width(); j = b >= l ? true : false; if (e.length === 1 && j) { f = e.width() >= l ? k : e.width(); c(this).css("width", f); e.css("max-width", f); b = f } b = j ? a.options.width || k : b; c(this).css("width", b); d = c(this).outerHeight(); c(this).css("height", d) } a.panelSize[m] = [b, d, h]; h += b }); a.$el.css("width", h < a.options.maxOverallWidth ? h : a.options.maxOverallWidth) }; a.gotoPage = function (b, d, e) { if (a.pages !== 1) { a.$lastPage = a.$items.eq(a.currentPage); if (typeof b !== "number") { b = a.options.startPage; a.setCurrentPage(a.options.startPage) } if (!(a.hasEmb && a.checkVideo(a.playing))) { if (b > a.pages + 1 - a.adjustLimit) b = !a.options.infiniteSlides && !a.options.stopAtEnd ? 1 : a.pages; if (b < a.adjustLimit) b = !a.options.infiniteSlides && !a.options.stopAtEnd ? a.pages : 1; a.$currentPage = a.$items.eq(b); a.currentPage = b; a.$el.trigger("slide_init", a); a.slideControls(true, false); if (d !== true) d = false; if (!d || a.options.stopAtEnd && b === a.pages) a.startStop(false); a.$el.trigger("slide_begin", a); a.options.resizeContents || a.$wrapper.filter(":not(:animated)").animate({ width: a.panelSize[b][0], height: a.panelSize[b][1] }, { queue: false, duration: a.options.animationTime, easing: a.options.easing }); a.$window.filter(":not(:animated)").animate({ scrollLeft: a.panelSize[b][2] }, { queue: false, duration: a.options.animationTime, easing: a.options.easing, complete: function () { a.endAnimation(b, e) } }) } } }; a.endAnimation = function (b, d) { if (b === 0) { a.$window.scrollLeft(a.panelSize[a.pages][2]); b = a.pages } else if (b > a.pages) { a.$window.scrollLeft(a.panelSize[1][2]); b = 1 } a.setCurrentPage(b, false); a.$items.removeClass("activePage").eq(b).addClass("activePage"); a.hovered || a.slideControls(false); if (a.hasEmb) { var e = a.$currentPage.find("object[id*=ytvideo], embed[id*=ytvideo]"); e.length && c.isFunction(e[0].getPlayerState) && e[0].getPlayerState() > 0 && e[0].getPlayerState() !== 5 && e[0].playVideo() } a.$el.trigger("slide_complete", a); typeof d === "function" && d(a); a.options.autoPlayLocked && !a.playing && setTimeout(function () { a.startStop(true) }, a.options.resumeDelay - a.options.delay) }; a.setCurrentPage = function (b, d) { if (b > a.pages + 1 - a.adjustLimit) b = a.pages - a.adjustLimit; if (b < a.adjustLimit) b = 1; if (a.options.buildNavigation) { a.$nav.find(".cur").removeClass("cur"); a.$nav.find("a").eq(b - 1).addClass("cur") } if (!a.options.infiniteSlides && a.options.stopAtEnd) { a.$wrapper.find("span.forward")[b === a.pages ? "addClass" : "removeClass"]("disabled"); a.$wrapper.find("span.back")[b === 1 ? "addClass" : "removeClass"]("disabled"); b === a.pages && a.playing && a.startStop() } if (!d) { a.$wrapper.css({ width: a.panelSize[b][0], height: a.panelSize[b][1] }); a.$wrapper.scrollLeft(0); a.$window.scrollLeft(a.panelSize[b][2]) } a.currentPage = b; if (!a.$wrapper.is(".activeSlider")) { c(".activeSlider").removeClass("activeSlider"); a.$wrapper.addClass("activeSlider") } }; a.goForward = function (b) { if (b !== true) { b = false; a.startStop(false) } a.gotoPage(a.currentPage + 1, b) }; a.goBack = function (b) { if (b !== true) { b = false; a.startStop(false) } a.gotoPage(a.currentPage - 1, b) }; a.gotoHash = function () { var b = a.win.location.hash.match(a.regex); return b === null ? "" : parseInt(b[1], 10) }; a.setHash = function (b) { var d = "panel" + a.runTimes + "-", e = a.win.location.hash; if (typeof e !== "undefined") a.win.location.hash = e.indexOf(d) > 0 ? e.replace(a.regex, d + b) : e + "&" + d + b }; a.slideControls = function (b) { var d = b ? "slideDown" : "slideUp", e = b ? 0 : a.options.animationTime, f = b ? a.options.animationTime : 0; b = b ? 0 : 1; a.options.toggleControls && a.$controls.stop(true, true).delay(e)[d](a.options.animationTime / 2).delay(f); if (a.options.buildArrows && a.options.toggleArrows) { if (!a.hovered && a.playing) { b = 1; f = 0 } a.$forward.stop(true, true).delay(e).animate({ right: b * a.$arrowWidth, opacity: f }, a.options.animationTime / 2); a.$back.stop(true, true).delay(e).animate({ left: b * a.$arrowWidth, opacity: f }, a.options.animationTime / 2) } }; a.clearTimer = function (b) { if (a.timer) { a.win.clearInterval(a.timer); b || a.$el.trigger("slideshow_stop", a) } }; a.startStop = function (b, d) { if (b !== true) b = false; b && !d && a.$el.trigger("slideshow_start", a); a.playing = b; if (a.options.autoPlay) { a.$startStop.toggleClass("playing", b).html(b ? a.options.stopText : a.options.startText); if (parseInt(a.$startStop.css("text-indent"), 10) < 0) a.$startStop.addClass(a.options.tooltipClass).attr("title", b ? "Stop" : "Start") } if (b) { a.clearTimer(true); a.timer = a.win.setInterval(function () { a.hasEmb && a.checkVideo(b) || (a.options.playRtl ? a.goBack(true) : a.goForward(true)) }, a.options.delay) } else a.clearTimer() }; a.checkVideo = function (b) { var d, e, f = false; a.$items.find("object[id*=ytvideo], embed[id*=ytvideo]").each(function () { d = c(this); if (d.length && c.isFunction(d[0].getPlayerState)) { e = d[0].getPlayerState(); if (b && (e === 1 || e > 2) && a.$items.index(d.closest("li.panel")) === a.currentPage && a.options.resumeOnVideoEnd) f = true; else e > 0 && d[0].pauseVideo() } }); return f }; a.init() }; c.anythingSlider.defaults = { width: null, height: null, resizeContents: true, tooltipClass: "tooltip", theme: "default", themeDirectory: "css/theme-{themeName}.css", startPanel: 1, hashTags: true, infiniteSlides: true, enableKeyboard: true, buildArrows: true, toggleArrows: false, buildNavigation: true, enableNavigation: true, toggleControls: false, appendControlsTo: null, navigationFormatter: null, forwardText: "&raquo;", backText: "&laquo;", enablePlay: true, autoPlay: true, autoPlayLocked: false, startStopped: false, pauseOnHover: true, resumeOnVideoEnd: true, stopAtEnd: false, playRtl: false, startText: "Start", stopText: "Stop", delay: 3E3, resumeDelay: 15E3, animationTime: 600, easing: "swing", clickArrows: "click", clickControls: "click focusin", clickSlideshow: "click", addWmodeToObject: "opaque", maxOverallWidth: 32766 }; c.fn.anythingSlider = function (g, i) { return this.each(function () { var a = c(this).data("AnythingSlider"); if ((typeof g).match("object|undefined")) if (a) a.updateSlider(); else new c.anythingSlider(this, g); else if (/\d/.test(g) && !isNaN(g) && a) { var b = typeof g === "number" ? g : parseInt(c.trim(g), 10); b >= 1 && b <= a.pages && a.gotoPage(b, false, i) } }) } })(jQuery);

(function ($) { $.fn.hoverIntent = function (f, g) { var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; cfg = $.extend(cfg, g ? { over: f, out: g} : f); var cX, cY, pX, pY; var track = function (ev) { cX = ev.pageX; cY = ev.pageY }; var compare = function (ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) { $(ob).unbind("mousemove", track); ob.hoverIntent_s = 1; return cfg.over.apply(ob, [ev]) } else { pX = cX; pY = cY; ob.hoverIntent_t = setTimeout(function () { compare(ev, ob) }, cfg.interval) } }; var delay = function (ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob, [ev]) }; var handleHover = function (e) { var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while (p && p != this) { try { p = p.parentNode } catch (e) { p = this } } if (p == this) { return false } var ev = jQuery.extend({}, e); var ob = this; if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t) } if (e.type == "mouseover") { pX = ev.pageX; pY = ev.pageY; $(ob).bind("mousemove.cluetip", track); if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function () { compare(ev, ob) }, cfg.interval) } } else { $(ob).unbind("mousemove.cluetip", track); if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function () { delay(ev, ob) }, cfg.timeout) } } }; return this.bind('mouseover.cluetip', handleHover).bind('mouseout.cluetip', handleHover) } })(jQuery);
(function ($) { $.cluetip = { version: '1.0.6' }; var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $cluetipWait, $dropShadow, imgCount; $.fn.cluetip = function (js, options) { if (typeof js == 'object') { options = js; js = null } if (js == 'destroy') { return this.removeData('thisInfo').unbind('.cluetip') } return this.each(function (index) { var link = this, $this = $(this); var opts = $.extend(true, {}, $.fn.cluetip.defaults, options || {}, $.metadata ? $this.metadata() : $.meta ? $this.data() : {}); var cluetipContents = false; var cluezIndex = +opts.cluezIndex; $this.data('thisInfo', { title: link.title, zIndex: cluezIndex }); var isActive = false, closeOnDelay = 0; if (!$('#help-message').length) { $(['<div id="help-message">', '<div id="help-message-outer">', '<h3 id="help-message-title"></h3>', '<div id="help-message-inner"></div>', '</div>', '<div id="help-message-extra"></div>', '<div id="help-message-arrows" class="help-message-arrows"></div>', '</div>'].join(''))[insertionType](insertionElement).hide(); $cluetip = $('#help-message').css({ position: 'absolute' }); $cluetipOuter = $('#help-message-outer').css({ position: 'relative', zIndex: cluezIndex }); $cluetipInner = $('#help-message-inner'); $cluetipTitle = $('#help-message-title'); $cluetipArrows = $('#help-message-arrows'); $cluetipWait = $('<div id="help-message-waitimage"></div>').css({ position: 'absolute' }).insertBefore($cluetip).hide() } var dropShadowSteps = (opts.dropShadow) ? +opts.dropShadowSteps : 0; if (!$dropShadow) { $dropShadow = $([]); for (var i = 0; i < dropShadowSteps; i++) { $dropShadow = $dropShadow.add($('<div></div>').css({ zIndex: cluezIndex - 1, opacity: .1, top: 1 + i, left: 1 + i })) } $dropShadow.css({ position: 'absolute', backgroundColor: '#000' }).prependTo($cluetip) } var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass; if (!tipAttribute && !opts.splitTitle && !js) { return true } if (opts.local && opts.localPrefix) { tipAttribute = opts.localPrefix + tipAttribute } if (opts.local && opts.hideLocal) { $(tipAttribute + ':first').hide() } var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10); var tipHeight, wHeight, defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px'; var sTop, linkTop, posY, tipY, mouseY, baseline; var tipInnerWidth = parseInt(opts.width, 10) || 275, tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft'), 10) || 0) + (parseInt($cluetip.css('paddingRight'), 10) || 0) + dropShadowSteps, linkWidth = this.offsetWidth, linkLeft, posX, tipX, mouseX, winWidth; var tipParts; var tipTitle = (opts.attribute != 'title') ? $this.attr(opts.titleAttribute) : ''; if (opts.splitTitle) { if (tipTitle == undefined) { tipTitle = '' } tipParts = tipTitle.split(opts.splitTitle); tipTitle = tipParts.shift() } if (opts.escapeTitle) { tipTitle = tipTitle.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;') } var localContent; function returnFalse() { return false } var activate = function (event) { if (!opts.onActivate($this)) { return false } isActive = true; $cluetip.removeClass().css({ width: tipInnerWidth }); if (tipAttribute == $this.attr('href')) { $this.css('cursor', opts.cursor) } if (opts.hoverClass) { $this.addClass(opts.hoverClass) } linkTop = posY = $this.offset().top; linkLeft = $this.offset().left; mouseX = event.pageX; mouseY = event.pageY; if (link.tagName.toLowerCase() != 'area') { sTop = $(document).scrollTop(); winWidth = $(window).width() } if (opts.positionBy == 'fixed') { posX = linkWidth + linkLeft + lOffset; $cluetip.css({ left: posX }) } else { posX = (linkWidth > linkLeft && linkLeft > tipWidth) || linkLeft + linkWidth + tipWidth + lOffset > winWidth ? linkLeft - tipWidth - lOffset : linkWidth + linkLeft + lOffset; if (link.tagName.toLowerCase() == 'area' || opts.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { if (mouseX + 20 + tipWidth > winWidth) { $cluetip.addClass(' help-message-' + ctClass); posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'), 10) + parseInt($cluetipInner.css('marginRight'), 10) : mouseX - (tipWidth / 2) } else { posX = mouseX + lOffset } } var pY = posX < 0 ? event.pageY + tOffset : event.pageY; $cluetip.css({ left: (posX > 0 && opts.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth / 2) > winWidth) ? winWidth / 2 - tipWidth / 2 : Math.max(mouseX - (tipWidth / 2), 0), zIndex: $this.data('thisInfo').zIndex }); $cluetipArrows.css({ zIndex: $this.data('thisInfo').zIndex + 1 }) } wHeight = $(window).height(); if (js) { if (typeof js == 'function') { js = js.call(link) } $cluetipInner.html(js); cluetipShow(pY) } else if (tipParts) { var tpl = tipParts.length; $cluetipInner.html(tpl ? tipParts[0] : ''); if (tpl > 1) { for (var i = 1; i < tpl; i++) { $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>') } } cluetipShow(pY) } else if (!opts.local && tipAttribute.indexOf('#') !== 0) { if (/\.(jpe?g|tiff?|gif|png)$/i.test(tipAttribute)) { $cluetipInner.html('<img src="' + tipAttribute + '" alt="' + tipTitle + '" />'); cluetipShow(pY) } else if (cluetipContents && opts.ajaxCache) { $cluetipInner.html(cluetipContents); cluetipShow(pY) } else { var optionBeforeSend = opts.ajaxSettings.beforeSend, optionError = opts.ajaxSettings.error, optionSuccess = opts.ajaxSettings.success, optionComplete = opts.ajaxSettings.complete; var ajaxSettings = { cache: false, url: tipAttribute, beforeSend: function (xhr) { if (optionBeforeSend) { optionBeforeSend.call(link, xhr, $cluetip, $cluetipInner) } $cluetipOuter.children().empty(); if (opts.waitImage) { $cluetipWait.css({ top: mouseY + 20, left: mouseX + 20, zIndex: $this.data('thisInfo').zIndex - 1 }).show() } }, error: function (xhr, textStatus) { if (isActive) { if (optionError) { optionError.call(link, xhr, textStatus, $cluetip, $cluetipInner) } else { $cluetipInner.html('<i>sorry, the contents could not be loaded</i>') } } }, success: function (data, textStatus) { cluetipContents = opts.ajaxProcess.call(link, data); if (isActive) { if (optionSuccess) { optionSuccess.call(link, data, textStatus, $cluetip, $cluetipInner) } $cluetipInner.html(cluetipContents) } }, complete: function (xhr, textStatus) { if (optionComplete) { optionComplete.call(link, xhr, textStatus, $cluetip, $cluetipInner) } var imgs = $cluetipInner[0].getElementsByTagName('img'); imgCount = imgs.length; for (var i = 0, l = imgs.length; i < l; i++) { if (imgs[i].complete) { imgCount-- } } if (imgCount && !$.browser.opera) { $(imgs).bind('load error', function () { imgCount--; if (imgCount < 1) { $cluetipWait.hide(); if (isActive) { cluetipShow(pY) } } }) } else { $cluetipWait.hide(); if (isActive) { cluetipShow(pY) } } } }; var ajaxMergedSettings = $.extend(true, {}, opts.ajaxSettings, ajaxSettings); $.ajax(ajaxMergedSettings) } } else if (opts.local) { var $localContent = $(tipAttribute + (/#\S+$/.test(tipAttribute) ? '' : ':eq(' + index + ')')).clone(true).show(); $cluetipInner.html($localContent); cluetipShow(pY) } }; var cluetipShow = function (bpY) { $cluetip.addClass('help-message-' + ctClass); if (opts.truncate) { var $truncloaded = $cluetipInner.text().slice(0, opts.truncate) + '...'; $cluetipInner.html($truncloaded) } function doNothing() { }; tipTitle ? $cluetipTitle.show().html(tipTitle) : (opts.showTitle) ? $cluetipTitle.show().html('&nbsp;') : $cluetipTitle.hide(); if (opts.sticky) { var $closeLink = $('<div id="help-message-close"><a href="#">' + opts.closeText + '</a></div>'); (opts.closePosition == 'bottom') ? $closeLink.appendTo($cluetipInner) : (opts.closePosition == 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner); $closeLink.bind('click.cluetip', function () { cluetipClose(); return false }); if (opts.mouseOutClose) { $cluetip.bind('mouseleave.cluetip', function () { cluetipClose() }) } else { $cluetip.unbind('mouseleave.cluetip') } } var direction = ''; $cluetipOuter.css({ zIndex: $this.data('thisInfo').zIndex, overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight }); tipHeight = defHeight == 'auto' ? Math.max($cluetip.outerHeight(), $cluetip.height()) : parseInt(defHeight, 10); tipY = posY; baseline = sTop + wHeight; if (opts.positionBy == 'fixed') { tipY = posY - opts.dropShadowSteps + tOffset } else if ((posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || opts.positionBy == 'bottomTop') { if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) { tipY = mouseY - tipHeight - tOffset; direction = 'top' } else { tipY = mouseY + tOffset; direction = 'bottom' } } else if (posY + tipHeight + tOffset > baseline) { tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset } else if ($this.css('display') == 'block' || link.tagName.toLowerCase() == 'area' || opts.positionBy == "mouse") { tipY = bpY - tOffset } else { tipY = posY - opts.dropShadowSteps } if (direction == '') { posX < linkLeft ? direction = 'left' : direction = 'right' } $cluetip.css({ top: tipY + 'px' }).removeClass().addClass('help-' + direction + '-' + ctClass).addClass(' help-message-' + ctClass); if (opts.arrows) { var bgY = (posY - tipY - opts.dropShadowSteps); $cluetipArrows.css({ top: (/(left|right)/.test(direction) && posX >= 0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : '' }).show() } else { $cluetipArrows.hide() } $dropShadow.hide(); $cluetip.hide()[opts.fx.open](opts.fx.openSpeed || 0); if (opts.dropShadow) { $dropShadow.css({ height: tipHeight, width: tipInnerWidth, zIndex: $this.data('thisInfo').zIndex - 1 }).show() } if ($.fn.bgiframe) { $cluetip.bgiframe() } if (opts.delayedClose > 0) { closeOnDelay = setTimeout(cluetipClose, opts.delayedClose) } opts.onShow.call(link, $cluetip, $cluetipInner) }; var inactivate = function (event) { isActive = false; $cluetipWait.hide(); if (!opts.sticky || (/click|toggle/).test(opts.activation)) { cluetipClose(); clearTimeout(closeOnDelay) } if (opts.hoverClass) { $this.removeClass(opts.hoverClass) } }; var cluetipClose = function () { $cluetipOuter.parent().hide().removeClass(); opts.onHide.call(link, $cluetip, $cluetipInner); $this.removeClass('help-message-clicked'); if (tipTitle) { $this.attr(opts.titleAttribute, tipTitle) } $this.css('cursor', ''); if (opts.arrows) { $cluetipArrows.css({ top: '' }) } }; $(document).bind('hideCluetip', function (e) { cluetipClose() }); if ((/click|toggle/).test(opts.activation)) { $this.bind('click.cluetip', function (event) { if ($cluetip.is(':hidden') || !$this.is('.help-message-clicked')) { activate(event); $('.cluetip-clicked').removeClass('help-message-clicked'); $this.addClass('help-message-clicked') } else { inactivate(event) } this.blur(); return false }) } else if (opts.activation == 'focus') { $this.bind('focus.cluetip', function (event) { activate(event) }); $this.bind('blur.cluetip', function (event) { inactivate(event) }) } else { $this[opts.clickThrough ? 'unbind' : 'bind']('click', returnFalse); var mouseTracks = function (evt) { if (opts.tracking == true) { var trackX = posX - evt.pageX; var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY; $this.bind('mousemove.cluetip', function (evt) { $cluetip.css({ left: evt.pageX + trackX, top: evt.pageY + trackY }) }) } }; if ($.fn.hoverIntent && opts.hoverIntent) { $this.hoverIntent({ sensitivity: opts.hoverIntent.sensitivity, interval: opts.hoverIntent.interval, over: function (event) { activate(event); mouseTracks(event) }, timeout: opts.hoverIntent.timeout, out: function (event) { inactivate(event); $this.unbind('mousemove.cluetip') } }) } else { $this.bind('mouseenter.cluetip', function (event) { activate(event); mouseTracks(event) }).bind('mouseleave.cluetip', function (event) { inactivate(event); $this.unbind('mousemove.cluetip') }) } $this.bind('mouseover.cluetip', function (event) { $this.attr('title', '') }).bind('mouseleave.cluetip', function (event) { $this.attr('title', $this.data('thisInfo').title) }) } }) }; $.fn.cluetip.defaults = { width: 275, height: 'auto', cluezIndex: 97, positionBy: 'auto', topOffset: 15, leftOffset: 15, local: false, localPrefix: null, hideLocal: true, attribute: 'rel', titleAttribute: 'title', splitTitle: '', escapeTitle: false, showTitle: true, cluetipClass: 'default', hoverClass: '', waitImage: true, cursor: 'help', arrows: false, dropShadow: true, dropShadowSteps: 6, sticky: false, mouseOutClose: false, activation: 'hover', clickThrough: false, tracking: false, delayedClose: 0, closePosition: 'top', closeText: 'Close', truncate: 0, fx: { open: 'show', openSpeed: '' }, hoverIntent: { sensitivity: 3, interval: 50, timeout: 0 }, onActivate: function (e) { return true }, onShow: function (ct, ci) { }, onHide: function (ct, ci) { }, ajaxCache: true, ajaxProcess: function (data) { data = data.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm, '').replace(/<(link|meta)[^>]+>/g, ''); return data }, ajaxSettings: { dataType: 'html' }, debug: false }; var insertionType = 'appendTo', insertionElement = 'body'; $.cluetip.setup = function (options) { if (options && options.insertionType && (options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)) { insertionType = options.insertionType } if (options && options.insertionElement) { insertionElement = options.insertionElement } } })(jQuery);

