jQuery.noConflict(); 
jQuery(function() {
    $j.timer = function (d, c, a) {var b = {timer: setTimeout(c, d),callback: null};if (typeof a == "function") b.callback = a;return b};
    $j.clearTimer = function (a) {clearTimeout(a.timer);if (typeof a.callback == "function") a.callback();return this};
});

Function.prototype.addMethod = function (a, b) {if (!this.prototype[a]) this.prototype[a] = b;return this};Function.addMethod("as", function (e, f) {var b = e ? e.split(".") : [];if (b.length > 0) {var a = window;for (var d = 0; d < b.length - 1; ++d) {var c = b[d];if (c) {if (!a[c]) a[c] = {};a = a[c]}}a[b.last()] = f ? new this : this}return this});Function.addMethod("ns", function (a) {this.as(a, 1)});String.addMethod("trim", function () {return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1")});String.addMethod("collapse", function () {return this.replace(/\s+/g, " ").trim()});String.addMethod("wrap", function (a) {var b, c = {"(": ")","{": "}","[": "]","<": ">","\u00c2\u00ab": "\u00c2\u00bb","\u00e2\u20ac\u00b9": "\u00e2\u20ac\u00ba","\u00e2\u20ac\u0153": "\u00e2\u20ac\u009d","\u00e2\u20ac\u02dc": "\u00e2\u20ac\u2122"};if (c[a]) b = c[a];else {var d = /^<(\w+)(\s+\w+\s*=\s*"[^"]*")*\s*>$/.exec(a);if (d) b = "</" + d[1] + ">"}return a + this + (b ? b : a)});String.addMethod("format", function () {var b = this;for (var a = 0; a < arguments.length; ++a) b = b.replace(new RegExp("\\{" + a + "\\}", "g"), arguments[a]);return b});String.addMethod("encodeHtml", function () {var a = this.replace(/\>/g, "&gt;").replace(/\</g, "&lt;").replace(/\&/g, "&amp;").replace(/\'/g, "&#039;").replace(/\"/g, "&quot;");return a});String.addMethod("decodeHtml", function () {var a = this.replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&").replace(/&#039;/g, "'").replace(/&quot;/g, '"');return a});String.addMethod("encodeURIComponent", function () {return typeof encodeURIComponent != "undefined" ? encodeURIComponent(this) : escape(this)});String.addMethod("decodeURIComponent", function () {return typeof decodeURIComponent != "undefined" ? decodeURIComponent(this) : unescape(this)});Array.addMethod("last", function () {return this.length > 0 ? this[this.length - 1] : void 0});Array.addMethod("remove", function (b) {for (var a = this.length - 1; a >= 0; --a) if (this[a] === b) this.splice(a, 1);return this});Array.addMethod("contains", function (b) {for (var a = 0; a < this.length; ++a) if (this[a] === b) return 1;return 0});Array.addMethod("push", function (a) {this[this.length] = a;return this.length});Array.addMethod("shift", function () {return this.splice(0, 1)[0]});Array.addMethod("splice", function (c, d) {var b, e = arguments.length - 2;if (c > this.length) c = this.length;if (c + d > this.length) d = this.length - c;var f = [];for (var a = 0; a < d; ++a) f.push(this[c + a]);if (e > d) {b = e - d;for (a = this.length + b - 1; a >= c + b; --a) this[a] = this[a - b]} else if (e < d) {b = d - e;for (a = c + e; a < this.length - b; ++a) this[a] = this[a + b];for (; a < this.length - 1; ++a) delete this[a];this.length -= b}for (a = 0; a < e; ++a) this[c + a] = arguments[2 + a];return f});(function () {var a = this;Function.addMethod("hook", function (d, e) {if (d) {var f = b();if (!f && d.addEventListener) d.addEventListener(e, this, false);else if (!f && d.attachEvent) d.attachEvent("on" + e, this);else {var c = d["x" + e];if (c && c.constructor == Array) if (c.contains(this)) c = null;else c.push(this);else c = d["x" + e] = [this];if (c) {d["on" + e] = function (d) {var f = true;d = a.Event(d);for (var b = 0; b < c.length; ++b) {var e = c[b](d);if (typeof e != "undefined" && !e) f = false}return f};d = null}}}return this});Function.addMethod("unhook", function (a, c) {if (a) {var e = b();if (!e && a.removeEventListener) a.removeEventListener(c, this, false);else if (!e && a.detachEvent) a.detachEvent("on" + c, this);else {var d = a["x" + c];if (d && d.constructor == Array) d.remove(this);else a["on" + c] = null}}return this});a.CancelEvent = function (b) {b = a.Event(b);if (b) {b.cancelBubble = true;if (b.stopPropagation) b.stopPropagation();b.returnValue = false;if (b.preventDefault) b.preventDefault()}return false};a.Event = function (a) {return a ? a : window.event};a.Target = function (c) {c = a.Event(c);var b = c.target ? c.target : c.srcElement;if (b && b.nodeType != 1) b = a.ParentElem(b);return b};a.InnerText = function (e) {var c = "";for (var d = 0; d < e.childNodes.length; d++) {var b = e.childNodes[d];if (b.nodeType == 1) c += a.InnerText(b);else if (b.nodeType == 3) c += b.data}return c};a.NextElem = function (c, b) {var a = c.nextSibling;while (a && (a.nodeType != 1 || b && a.nodeName != b)) a = a.nextSibling;return a};a.PrevElem = function (c, b) {var a = c.previousSibling;while (a && (a.nodeType != 1 || b && a.nodeName != b)) a = a.previousSibling;return a};a.ParentElem = function (c, b) {var a = c.parentNode;while (a && (a.nodeType != 1 || b && a.nodeName != b)) a = a.parentNode;return a};a.ChildElem = function (e, f, g) {var d = null,b;for (var c = 0; !d && c < e.childNodes.length; ++c) {b = e.childNodes[c];if (b.nodeType == 1) if (!f || b.nodeName == f) d = b}if (!g) for (c = 0; !d && c < e.childNodes.length; ++c) {b = e.childNodes[c];if (b.nodeType == 1) d = a.ChildElem(b, f)}return d};a.ForEach = function (e, d, c) {for (var b = 0; b < d.childNodes.length; ++b) {var a = d.childNodes[b];if (a.nodeType == 1 && (!c || a.nodeName == c)) if (e(a)) break}};a.ChildCount = function (d, c) {var e = 0,a, b;for (a = 0; a < d.childNodes.length; ++a) {b = d.childNodes[a];e += b.nodeType == 1 && (!c || b.nodeName == c) ? 1 : 0}return e};a.AddClass = function (a, e) {var c = a.className;if (c) {var g = c.collapse().split(" "),d = e.collapse().split(" ");for (var b = 0; b < d.length; ++b) {var f = d[b];if (!g.contains(f)) a.className += " " + f}} else a.className = e;return a.className};a.DelClass = function (b, g) {var a = b.className;if (a) {var f = a.collapse().split(" "),d = g.collapse().split(" ");for (var c = 0; c < d.length; ++c) f.remove(d[c]);var e = f.join(" ");if (e != a) b.className = e}return b.className};a.HasClass = function (b, a) {return b.className.collapse().split(" ").contains(a)};a.Updated = function () {if (a.Access && typeof a.Access.Updated == "function") a.Access.Updated()};function b() {return navigator.userAgent.indexOf("Safari") >= 0}}).ns("Msn.DOM");(function () {var a = this,c = [];Function.addMethod("bind", function (b, h) {var d;switch (typeof b) {case "object":d = b.nodeType == 1 || b.nodeType == 9 ? [b] : b.length ? b : null;break;case "string":d = a.Select(b)}if (d) for (var g = 0; g < d.length; ++g) {var e = d[g],f = new this(e, h);if (e.bindings) e.bindings.push(f);else e.bindings = [f];c.push(f)}return this});a.Unbind = function (d, f) {var b;if (d.bindings && d.bindings.length) {for (b = 0; b < d.bindings.length; ++b) {var e = d.bindings[b];if (e && typeof e.dispose == "function") e.dispose();c.remove(e)}d.bindings = null}if (f) for (b = 0; b < d.childNodes.length; ++b) {var g = d.childNodes[b];if (g.nodeType == 1) a.Unbind(g, f)}};a.Select = function (c) {function i() {var d = null;if (c) if (c.charAt(a) == "*") d = "*";else while (a < c.length) {var b = c.charAt(a);if ("a" <= b && b <= "z" || "A" <= b && b <= "Z" || "0" <= b && b <= "9" || b == "-") {d = d ? d + b : b;++a} else break}return d}function j() {while (a < c.length && c.charAt(a) == " ")++a}function m() {var b = null;j();switch (c.charAt(a)) {case "+":case ">":b = c.charAt(a);++a;j()}return b}function h() {++a;return i()}function g() {var b = null,d = i();if (d !== null) b = new e(d);while (c && a < c.length) {var f = c.charAt(a);if (f == "#") {if (!b) b = new e;b.setID(h())} else if (f == ".") {if (!b) b = new e;b.addClass(h())} else break}return b}function n() {var d = [],b = g();if (b) {d.push(b);while (a < c.length) {var e = m();b = g();if (b) {if (e) b.setComb(e);d.push(b)} else break}}return d}function e(a) {var g = this,e = "",f = null,d = null;g.setID = function (a) {e = a};g.setComb = function (a) {f = a};g.addClass = function (a) {if (d) d.push(a);else d = [a]};g.getNodes = function (i) {var d, g, j, k = [];if (e) {switch (f) {case ">":for (d = 0; d < i.childNodes.length; ++d) if (i.childNodes[d].nodeType == 1 && i.childNodes[d].id == e) {g = i.childNodes[d];break}break;case "+":j = b(i);if (j && j.id == e) g = j;break;default:g = i.getElementById(e)}if (g && (!a || a == "*" || a.toLowerCase() == g.nodeName.toLowerCase()) && c(g)) k.push(g)} else if (a && a != "*") switch (f) {case ">":for (d = 0; d < i.childNodes.length; ++d) {g = i.childNodes[d];if (g.nodeType == 1 && g.nodeName.toLowerCase() == a && c(g)) k.push(g)}break;case "+":j = b(i);if (j && j.nodeName.toLowerCase() == a && c(j)) k.push(j);break;default:var l = i.getElementsByTagName(a);for (d = 0; d < l.length; ++d) if (c(l[d])) k.push(l[d])} else switch (f) {case ">":for (d = 0; d < i.childNodes.length; ++d) {g = i.childNodes[d];if (g.nodeType == 1 && c(g)) k.push(g)}break;case "+":j = b(i);if (j && c(j)) k.push(j);break;default:h(i, k)}return k};function h(d, e) {for (var b = 0; b < d.childNodes.length; ++b) {var a = d.childNodes[b];if (a.nodeType == 1) {if (c(a)) e.push(a);h(a, e)}}}function c(f) {var a = 1;if (d) {var c = f.className;if (c) {var e = c.collapse().split(" ");for (var b = 0; b < d.length; ++b) if (!e.contains(d[b])) {a = 0;break}} else a = 0}return a}}function l(c, d) {var a = [];for (var b = 0; b < c.length; ++b) a = a.concat(d.getNodes(c[b]));return a}var a = 0,k = n(),d = [document];for (var f = 0; f < k.length && d.length > 0; ++f) d = l(d, k[f]);return d};function b(b) {var a = b.nextSibling;while (a && a.nodeType != 1) a = a.nextSibling;return a}(function () {a.Unbind(document, 1);c = []}).hook(window, "unload")}).ns("Msn.Bind");(function (y, d) {if (!d) d = {};var e = Msn.DOM,g = document,E = window,b = y,A = f(d.siteSearchOn, "false"),C = f(d.searchUrl, ""),B = f(d.searchParam, ""),o = f(d.searchParams, ""),c = "site";if (A != "true") {$j("#ntwscopes").hide();c = "web"}var D = f(d.onepxgif, "http://blstc.msn.com/br/gbl/css/9/decoration/t.gif"),l = navigator.userAgent,k = l.indexOf("MSIE");if (k >= 0) if (parseFloat(l.substring(k + 4)) < 7 && parseFloat(l.substring(k + 4)) > 5) {x(g.getElementById("msnlogo"), "img", "image");x(g.getElementById("binglogo"), "img", "image")}var t = g.getElementById("sslink"),v = g.getElementById("wslink"),u = g.getElementById("spyglass"),a = g.getElementById("q");if (c == "site") {j.hook(t, "click");p.hook(v, "click")}var i = "",h = c == "site" ? f(d.helpertext, "") : "";if (c == "web") a.className = "";a.value = h;s.hook(u, "click");q.hook(a, "focus");r.hook(a, "blur");var n = b.onsubmit;b.onsubmit = function () {if (a.value == h) a.value = "";return !!n ? n(b) : null};w.hook(a, "keypress");function x(a, c, e) {if (!a) return;var b;if (c == "bgimage") b = a.currentStyle.backgroundImage;else if (c == "img") b = a.src;if (b == "") return;var d = b.search(new RegExp("(http[s]?://.+\\.png)", "i")) === -1 ? "" : RegExp.$1;if (d.length > 0) {if (c == "bgimage") a.style.backgroundImage = "none";else if (c == "img") a.src = D;a.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='" + e + "', src='" + d + "')"}}function w(a) {if (a.keyCode == 13) switch (c) {case "site":j(null);a = e.Event(a);return e.CancelEvent(a)}}function j(b) {var a = C + "?" + B + "=" + m();if (o) a = a + "&" + o.replace(/&amp;/g, "&");if (b && e.Target(b).tagName.toLowerCase() == "a") e.Target(b).href = a;else window.top.location.href = a}function p(d) {if (d && e.Target(d).tagName.toLowerCase() == "a") {var f = e.Target(d),c = b.action;for (var a = 0; a < b.length; a++) {if (a == 0) c += "?";else c += "&";if (b[a].name.toLowerCase() == "q") c += b[a].name + "=" + m();else c += b[a].name + "=" + encodeURIComponent(b[a].value)}f.href = c}}function m() {i = a ? a.value : "";if (c == "site") i = i == h ? "" : i;return encodeURIComponent(i)}function s() {switch (c) {case "site":b.onsubmit = z;j(null)}}function z(a) {a = e.Event(a);return e.CancelEvent(a)}function q() {a.className = "typing";if (a.value == h) a.value = ""}function r() {if (a.value.trim() == "") {a.className = "";a.value = h}}this.dispose = function () {if (c = "site") {j.unhook(t, "click");p.unhook(v, "click")}s.unhook(u, "click");q.unhook(a, "focus");r.unhook(a, "blur");w.unhook(a, "keypress");b.onsubmit = null;y = null};function f(a, b) {return typeof a != "undefined" ? a : b}}).as("Msn.SiteSearch");$j(document).ready(function () {Msn.HeaderUtilities.pageLoad()});$j(window).unload(function () {Msn.HeaderUtilities.dispose()});(function () {var c = [],b = [],a = null,d = false;this.pageLoad = function () {$j("#msg a").click(function () {return Msn.HeaderUtilities.messengerClicked()});$j("#xnav").removeClass("noscript");$j("#q").removeClass("typing");this.bindFlyout("click", "input#drpbutton", "#ntwscopes #scopescontainer", true);var d = $j("#xnav >  li");$j.each(d, function (b) {var a = b + 1;Msn.HeaderUtilities.bindFlyout("hover", "#xnav .c" + a + " > a", "#xnav .c" + a + " .menucontainer", false)});if ($j.browser.msie) {var e = $j("#hplink");e.click(function () {this.style.behavior = "url(#default#homepage)";this.setHomePage("http://www.msn.com/");return false});if ($j.browser.version < 7) {var a = $j("#xnav .last .menucontainer"),b = a.children(".section"),c = b.length,f = a.width();b.css("width", 100 / c + "%");a.width(c * f)}}$j(document).keypress(function (a) {var b = a.which || a.keyCode || -1;if (b == 27) Msn.HeaderUtilities.hideAll()})};this.checkMessenger = function () {d = true;try {a = new ActiveXObject("MSNMessenger.Hotmail2Control")} catch (b) {a = null}};this.messengerClicked = function () {if (!d) this.checkMessenger();if (a) try {a.ShowContactList();return false} catch (b) {a = null}};this.bindFlyout = function (h, d, a, f) {var d = $j(d),a = $j(a),e = {};if (d.length == 0 || a.length == 0) return;this.positionFlyout(d, a, f);var g = b.length;b.length += 1;b[g] = d;c.length += 1;c[g] = a;d.focus(function () {Msn.HeaderUtilities.hideAll();a.show()});a.find("a:last").blur(function () {a.hide()});if (h == "click") {d.click(function () {Msn.HeaderUtilities.positionFlyout(d, a, f);a.show();$j.clearTimer(e);return false});d.mouseleave(function () {e = $j.timer(350, function () {a.hide();window.focus()}, function () {})})} else d.hover(function () {$j.clearTimer(e);Msn.HeaderUtilities.positionFlyout(d, a, f);e = $j.timer(200, function () {Msn.HeaderUtilities.hideAll();a.show()}, function () {})}, function () {$j.clearTimer(e);e = $j.timer(350, function () {a.hide()}, function () {})});a.hover(function () {$j.clearTimer(e);a.show()}, function () {e = $j.timer(350, function () {a.hide()}, function () {})})};this.hideAll = function () {$j.each(c, function (b, a) {a.hide()})};this.positionFlyout = function (a, b, e) {var a = $j(a),b = $j(b);if (a.length == 0 || b.length == 0) return;var d = a.position(),c;if (e) c = d.left + a.outerWidth() - b.outerWidth();else c = d.left + 1;var f = d.top + a.outerHeight();b.css("left", c);b.css("top", f)};this.dispose = function () {jQuery.each(c, function (b, a) {a.unbind()});c = [];jQuery.each(b, function (b, a) {a.unbind()});b = []}}).ns("Msn.HeaderUtilities");

