﻿//Including Coda 3 config.
if (typeof btg == "undefined") var btg = {};

btg.config = {
    version: '3',
    defferedAdLoading: false,
    Omniture: {
        enabled: true,
        account: 'nickelodeonukprod',
        charSet: 'ISO-8859-1',
        dynamicAccountSelection: 'true',
        dynamicAccountList: 'nickelodeonukprod=www.nick.co.uk',
        linkInternalFilters: 'javascript:,www.nick.co.uk,nick.co.uk,nick.ie,www.icarly.co.uk,icarly.co.uk,microsites.nick.co.uk',
        videoViewEventDisable: false,
        enableTimeParting: false,
        trackInlineStats: true,
        defaultHier: 'hier2',
        enableVisitorNamespace: 'false',
        enableMtvnVisitorGuid: false,
        enableMeteorPlugin: false, 
        enableGuidPlugin: true,
        enableGuidAuxiliaryCall: true,
        enableFirstPartyCookie: false,
        tabletAccount: '',
        timezone: '-5',
        trackExternalLinks: 'true',
        fluxCommunityId: '',
        reloadInterval: 50000000000
    },
    Nielsen: {
        enabled: false,
        cid: '',
        videoCensusId: ''
    },
    GoogleAnalytics: {
        enabled: false,
        account: '',
        reportMode: '' // iframe/direct
    },
    QuantCast: {
        enabled: false,
        adsEnabled: false,
        labels: '',
        reportMode: '' //direct/ads
    },
    ComScore: {
        enabled: true,
        c2: '6035470'
    },
    Meteor: {
        enabled: false,
        applicationId: "",
        multiDomain: false
    },
    ChoiceStream: {
        enabled: false,
        apiKey: "",
        profileId: ""
    },
    DoubleClick: {
        enabled: false,
        dartSite: ''
    },
    International: {
        enabled: true,
        dartSite: 'nick.co.uk'
    },
    ABTest: {
        enabled: false
    },
    FluxHosted: {
        enabled: false
    },
    Photos: {
        enabled: false
    },
    TestAndTarget: {
        enabled: false
    },
    Demdex: {
        enabled: false
    }
};





//Including Coda 3 build.
var btg = typeof btg === "object" ? btg : {};
btg.config = typeof btg.config === "object" ? btg.config : {};
btg.isCoreLoaded = false;
btg.globalvars = {
    VISITOR_NAMESPACE: "mtvn",
    IS_CODA_ADS_USED: false,
    USER_AGENT: new function () {
        if (/MSIE/.test(navigator.userAgent)) this.BROWSER = "MSIE";
        else this.BROWSER = "Other"
    },
    MODULES_URL: "http://btg.mtvnservices.com/aria/mods.html",
    IS_TOP_ACCESSIBLE: function () {
        try {
            return typeof top.location.search != "undefined" && typeof top.location.search != "unknown"
        } catch (b) {
            return false
        }
    } (),
    PAGE_URL: function () {
        try {
            var b = "",
                b = self.location.pathname;
            if (b == "") b = "/";
            return b
        } catch (c) { }
    } (),
    IS_UNIT_TEST: function () {
        try {
            return location.href.toLowerCase().indexOf("/api/jsunittest/tests/") != -1
        } catch (b) {
            return false
        }
    } (),
    FORCE_AD_WAIT_TIME: {
        PLAYER_LOADED: 1E4,
        PLAYER_FAILED: 1E4,
        PLAYER_LOAD_WAIT_TIME: 1E4
    },
    VALID_DCOPT: ["ist"],
    ON_DOCUMENT_READY: function () {
        window.DOMLOADED = false;
        window.onload = function () {
            if (window.DOMLOADED == false && btg.config.defferedAdLoading) btg.AdManager.placeAllAds()
        };
        document.onreadystatechange = function () {
            if (document.readyState == "complete" && btg.config.defferedAdLoading) {
                window.DOMLOADED = true;
                btg.AdManager.placeAllAds()
            }
        }
    } ()
};
btg.loadLocalConfig = function () {
    if (typeof btg.config != "undefined" && typeof btg.config != "undefined") btg.Object.copyProperties(btg.config, this.config, true);
    if (typeof MTVN != "undefined" && typeof MTVN.config != "undefined" && typeof MTVN.config.btg != "undefined") btg.Object.copyProperties(MTVN.config.btg, this.config, true);
    if (typeof mtvn != "undefined" && typeof mtvn.btg != "undefined" && typeof mtvn.btg.config != "undefined") {
        if (typeof mtvn.btg.config.ReportSettings != "undefined") for (r in mtvn.btg.config.ReportSettings) {
            if (!mtvn.btg.config.ReportSettings.hasOwnProperty(r)) continue;
            btg.Object.copyProperties(mtvn.btg.config.ReportSettings[r], this.config[r], true)
        }
        if (typeof mtvn.btg.config.AdSettings != "undefined") for (a in mtvn.btg.config.AdSettings) {
            if (!mtvn.btg.config.AdSettings.hasOwnProperty(a)) continue;
            btg.Object.copyProperties(mtvn.btg.config.AdSettings[a], this.config[a], true)
        }
    }
    if (typeof com != "undefined" && typeof com.mtvi != "undefined" && typeof com.mtvi.reporting != "undefined" && typeof com.mtvi.reporting.Account != "undefined") {
        if (typeof this.config.Omniture != "undefined") this.config.Omniture = {
            enabled: true
        };
        this.config.Omniture.account = com.mtvi.reporting.Account.name;
        this.config.Omniture.dynamicAccountSelection = com.mtvi.reporting.Account.dynamic;
        this.config.Omniture.dynamicAccountList = com.mtvi.reporting.Account.list;
        this.config.Omniture.indexFileName = com.mtvi.reporting.Account.defaultIndexFileName;
        this.config.Omniture.linkInternalFilters = com.mtvi.reporting.Account.filters;
        if (typeof com.mtvi.reporting.Account.dartSite != "undefined") {
            this.config.DoubleClick.enabled = true;
            this.config.DoubleClick.dartSite = com.mtvi.reporting.Account.dartSite
        }
    }
};
btg.loadModules = function () {
    var b = [],
        c = this.config;
    if (typeof c.TestAndTarget != "undefined" && typeof c.TestAndTarget.enabled != "undefined" && c.TestAndTarget.enabled) b.push("TestAndTarget");
    if (typeof c.QuantCast != "undefined" && typeof c.QuantCast.enabled != "undefined" && c.QuantCast.enabled) b.push("QuantCast");
    if (typeof c.Photos != "undefined" && typeof c.Photos.enabled != "undefined" && c.Photos.enabled) b.push("Photos");
    if (typeof c.ABTest != "undefined" && typeof c.ABTest.enabled != "undefined" && c.ABTest.enabled) b.push("ABTest");
    if (typeof c.FluxHosted != "undefined" && typeof c.FluxHosted.enabled != "undefined" && c.FluxHosted.enabled) b.push("FluxHosted");
    b = btg.globalvars.MODULES_URL + "?m=" + b.join(",") + "&v=" + btg.Controller.getVersion();
    btg.DOM.loadScript(b)
};
btg.Controller = new function () {
    var b = btg.globalvars,
        c = true,
        d = true,
        e = false,
        f = "";
    this.init = function () {
        btg.loadLocalConfig();
        btg.loadModules();
        b.IS_LIVE_ENV = function () {
            var c = true;
            try {
                if (btg.String.isDefined(btg.config.Omniture.dynamicAccountList)) {
                    var d = btg.config.Omniture.dynamicAccountList,
                        f = d.indexOf("=");
                    if (f > -1) {
                        var d = d.substring(f + 1),
                            d = d.split(","),
                            e = self.location.hostname;
                        if (b.IS_TOP_ACCESSIBLE) e = top.location.hostname;
                        for (var f = 0, l = d.length; f < l; f++) if (e.indexOf(d[f]) > -1) {
                            c = false;
                            break
                        }
                    }
                }
            } catch (o) { }
            return c
        } ();
        f = typeof b.PAGE_URL == "string" && b.PAGE_URL != "" ? b.PAGE_URL : location.pathname;
        if (f.charAt(f.length - 1) == "/") f += typeof btg.config.indexFileName == "string" ? btg.config.indexFileName : "index";
        btg.config._defaultPageName = f;
        btg.ReportingManager.init();
        btg.AdManager.init();
        if (typeof btg.TestAndTarget != "undefined") btg.TestAndTarget.init();
        this.init = function () {
            return this
        };
        return this
    };
    this.gameInit = function () {
        if (!c && btg.config) {
            btg.ReportingManager.init();
            c = true
        }
        if (!d && btg.config) {
            btg.AdManager.init();
            d = true
        }
        if (!e && com.mtvnet.games.GameSettings) {
            btg.GameReportingManager.init();
            btg.GameAdManager.init();
            e = true
        }
        return true
    };
    this.loadGame = function (b) {
        if (e) {
            btg.GameAdManager.loadGame(b);
            btg.GameReportingManager.gameLoad(b)
        }
    };
    this.sendPageCall = function (b) {
        this.init();
        if (c) {
            if (typeof b == "undefined" || !b) b = {};
            btg.ReportingManager.sendPageCall(b);
            btg.ReportingManager.getData()
        }
    };
    this.sendLinkEvent = function (b) {
        this.init();
        if (c) {
            if (typeof b == "undefined" || !b) b = {};
            btg.ReportingManager.sendLinkEvent(b)
        }
    };
    this.placeAd = function (b) {
        this.init();
        if (d) if (btg.config.defferedAdLoading) return btg.AdManager.placeAdTag(b, true);
        else {
            b = btg.AdManager.placeAd(b);
            btg.AdManager.getData();
            return b
        }
    };
    this.reloadAds = function () {
        btg.AdManager.reloadAll();
        return this
    };
    this.placeIFrameAd = function (b, c) {
        this.init();
        btg.AdManager.placeIFrameAd(b, c)
    };
    this.getAdUrl = function (b) {
        this.init();
        if (d) return btg.AdManager.getAdUrl(b)
    };
    this.getVersion = function () {
        return btg.config.version
    };
    this.createMboxes = function (b) {
        if (typeof mboxDefine == "function" && typeof btg.config.Omniture.enableTestAndTarget == "boolean" && btg.config.Omniture.enableTestAndTarget && typeof btg.TestAndTarget != "undefined") btg.TestAndTarget.createMboxes(b)
    };
    this.setChoiceStreamRequest = function (b, d) {
        if (c) btg.ReportingManager.setChoiceStreamRequest(b, d)
    }
};
btg.Beacon = function (b) {
    this.url = b;
    this.data = null
};
btg.Beacon.prototype = {
    setData: function (b) {
        this.data = btg.Object.toString(b, "&")
    },
    formatSrc: function () {
        if (this.data) if (this.url.indexOf("?") > -1) this.url += "&" + this.data;
        else this.url += "?" + this.data;
        return this.url
    },
    send: function () {
        var b = new Image(1, 1);
        b.src = this.formatSrc();
        b.onload = function () { };
        b.onabort = function () { };
        b.onerror = function () { }
    }
};
btg.Alert = function (b, c) {
    if (!b) return;
    switch (c) {
        case 1:
            var d = "Warning";
            break;
        case 2:
            d = "Alert";
            break;
        default:
            d = "Error"
    }
    this.dependencies = new btg.DependencyManager;
    this.dependencies.add("ga_script_load", function () {
        return typeof _gat == "object"
    }, 100);
    this.dependencies.checkDependency("ga_script_load");
    if (this.dependencies.hasDependency()) {
        this.dependencies.addToCallQueue(this, function () {
            new btg.Alert(b, c)
        });
        return
    }
    var e = _gat._createTracker("UA-18578264-1", "coda_alerts_tracker");
    e._setDomainName("");
    e._trackEvent(location.hostname, location.pathname, d + ": " + b)
};
btg.Cookie = {
    read: function (b) {
        for (var b = b + "=", c = document.cookie.split(";"), d = 0, e = c.length; d < e; d++) {
            for (var f = c[d]; f.charAt(0) == " "; ) f = f.substring(1, f.length);
            if (f.indexOf(b) == 0) return unescape(f.substring(b.length, f.length))
        }
        return null
    },
    set: function (b, c, d, e, f) {
        b = b + "=" + escape(c) + "; path=/";
        if (d) b += ";expires=" + d;
        if (!f) {
            f = document.domain.split(".");
            f = f.length > 2 ? f[f.length - 2] + "." + f[f.length - 1] : document.domain
        }
        if (f != "localhost") b += ";domain=" + f;
        b += ";path=" + (e ? e : "/");
        document.cookie = b
    },
    remove: function (b, c, d) {
        b = b + "=";
        if (!d) {
            d = document.domain.split(".");
            d = d.length > 2 ? d[d.length - 2] + "." + d[d.length - 1] : document.domain
        }
        if (d != "localhost") b += ";domain=" + d;
        b += ";path=" + (c ? c : "/");
        b += ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
        document.cookie = b
    }
};
btg.DOM = {
    Events: {
        addListener: function (b, c, d) {
            if (b.attachEvent) b.attachEvent("on" + c, d);
            else if (b.addEventListener) b.addEventListener(c, d, false);
            else b["on" + c] = d
        },
        removeListener: function (b, c, d) {
            if (b.detachEvent) b.detachEvent("on" + c, d);
            else if (b.removeEventListener) b.removeEventListener(c, d, false);
            else b["on" + c] = null
        }
    },
    createIframe: function (b) {
        for (var c = document.createElement("iframe"), d = ["src", "id", "name", "width", "height", "scrolling", "frameBorder", "marginHeight", "marginWidth", "noResize"], e = d.length, f = 0; f < e; f++) {
            var g = d[f],
                h = b[g];
            if (h) {
                c[g] = h;
                c.setAttribute(g, h)
            }
        }
        return c
    },
    appendIframe: function (b) {
        if (!b.src) return null;
        if (!b.parent || b.parent.nodeType !== 1) b.parent = document.body;
        if (typeof b.style !== "object") b.style = {
            height: "1px",
            width: "1px",
            visibility: "hidden",
            position: "absolute",
            bottom: "0",
            left: "-1000px"
        };
        var c = this.createIframe(b);
        if (typeof b.onload === "function") c.onload = b.onload;
        this.applyStyle(c, b.style);
        b.parent.appendChild(c);
        return c
    },
    applyStyle: function (b, c) {
        if (!btg.Object.isDefined(c) || !btg.Object.isDefined(b)) return;
        var d = btg.Object.toString(c, ";", ":");
        if (btg.globalvars.USER_AGENT.BROWSER == "MSIE") {
            if (!btg.String.isDefined(b.id)) b.id = "coda_iframe_" + (new Date).getTime();
            document.createStyleSheet().addRule("#" + b.id, d)
        } else b.setAttribute("style", d)
    },
    loadScript: function (b, c, d) {
        if (btg.String.isDefined(b)) try {
            var e = document.createElement("script");
            e.setAttribute("type", "text/javascript");
            e.setAttribute("src", b);
            if (typeof d == "function") e.onload = e.onreadystatechange = d;
            if (c) document.body.appendChild(e);
            else document.getElementsByTagName("head")[0].appendChild(e)
        } catch (f) { }
    },
    loadScriptOnHead: function (b) {
        if (btg.String.isDefined(b)) try {
            var c = document.createElement("script");
            c.setAttribute("type", "text/javascript");
            c.setAttribute("src", b);
            document.getElementsByTagName("head")[0].appendChild(c)
        } catch (d) { }
    },
    getStyle: function (b, c) {
        var d = null;
        try {
            if (btg.Object.isDefined(b) && btg.String.isDefined(c)) if (btg.Object.isDefined(document.defaultView) && typeof document.defaultView.getComputedStyle == "function") d = document.defaultView.getComputedStyle(b, null)[c];
            else if (typeof window.getComputedStyle == "function") d = window.getComputedStyle(b, null)[c];
            else if (btg.Object.isDefined(b.currentStyle)) d = b.currentStyle[c];
            else d = b.style[c]
        } catch (e) {
            return d
        }
        return d
    }
};
btg.Events = new function () {
    var b = function () {
        this.callbacks = [];
        this.subscribe = function (b) {
            if (typeof b == "function") this.callbacks[this.callbacks.length] = b
        };
        this.remove = function (b) {
            for (var d = 0, e = this.callbacks.length; d < e; d++) if (this.callbacks[d] == b) delete this.callbacks[d];
            if (typeof b == "function") this.callbacks[this.callbacks.length] = b
        };
        this.fire = function () {
            for (var b = 0, d = this.callbacks.length; b < d; b++) try {
                if (typeof this.callbacks[b] == "function") this.callbacks[b].apply(this, arguments)
            } catch (e) {
                new btg.Alert('An event callback has failed. "' + e.number + ": " + e.message + '".')
            }
        }
    };
    this.add = function (c) {
        this[c] = new b;
        return this
    };
    this.CORE_LOADED = new b;
    this.flipBookView = new b;
    this.adLoaded = new b;
    this.Player_Freewheel_failsafe = new b;
    this.ABTest_Group_Assigned = new b;
    this.ON_GAME_CONFIG_LOADED = new b;
    this.ON_GAME_LOAD = new b;
    this.ON_GAME_PLAY = new b;
    this.ON_GAME_LEVELSTART = new b
};
if (!this.btg.JSON) btg.JSON = function () {
    function b(b) {
        return b < 10 ? "0" + b : b
    }
    function c(b, f) {
        var g, h, j, n;
        g = /["\\\x00-\x1f\x7f-\x9f]/g;
        var l;
        switch (typeof b) {
            case "string":
                return g.test(b) ? '"' + b.replace(g, function (b) {
                    var c = d[b];
                    if (c) return c;
                    c = b.charCodeAt();
                    return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16)
                }) + '"' : '"' + b + '"';
            case "number":
                return isFinite(b) ? String(b) : "null";
            case "boolean":
            case "null":
                return String(b);
            case "object":
                if (!b) return "null";
                if (typeof b.toJSON === "function") return c(b.toJSON());
                g = [];
                if (typeof b.length === "number" && !b.propertyIsEnumerable("length")) {
                    n = b.length;
                    for (h = 0; h < n; h += 1) g.push(c(b[h], f) || "null");
                    return "[" + g.join(",") + "]"
                }
                if (f) {
                    n = f.length;
                    for (h = 0; h < n; h += 1) {
                        j = f[h];
                        if (typeof j === "string") if (l = c(b[j], f)) g.push(c(j) + ":" + l)
                    }
                } else for (j in b) if (typeof j === "string") if (l = c(b[j], f)) g.push(c(j) + ":" + l);
                return "{" + g.join(",") + "}"
        }
    }
    Date.prototype.toJSON = function () {
        return this.getUTCFullYear() + "-" + b(this.getUTCMonth() + 1) + "-" + b(this.getUTCDate()) + "T" + b(this.getUTCHours()) + ":" + b(this.getUTCMinutes()) + ":" + b(this.getUTCSeconds()) + "Z"
    };
    var d = {
        "\u0008": "\\b",
        "\t": "\\t",
        "\n": "\\n",
        "\u000c": "\\f",
        "\r": "\\r",
        '"': '\\"',
        "\\": "\\\\"
    };
    return {
        stringify: c,
        parse: function (b, c) {
            function d(b, e) {
                var h, o;
                if (e && typeof e === "object") for (h in e) if (Object.prototype.hasOwnProperty.apply(e, [h])) {
                    o = d(h, e[h]);
                    if (o !== undefined) e[h] = o
                }
                return c(b, e)
            }
            var h;
            if (/^[\],:{}\s]*$/.test(b.replace(/\\./g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
                h = eval("(" + b + ")");
                return typeof c === "function" ? d("", h) : h
            }
            throw new SyntaxError("parseJSON");
        }
    }
} ();
btg.Math = {
    random: function () {
        var b, c;
        if (arguments.length > 1) {
            b = arguments[0];
            c = arguments[1]
        } else {
            b = 0;
            c = arguments[0]
        }
        return Math.floor(Math.random() * (c - b + 1) + b)
    }
};
btg.Object = {
    isDefined: function (b) {
        if (typeof b == "object" && b !== null) return true;
        else return false
    },
    toString: function (b, c, d) {
        if (!c) c = ",";
        if (!d) d = "=";
        var e = [],
            f;
        for (f in b) if (b.hasOwnProperty(f)) e.push(f + d + b[f]);
        return e.join(c)
    },
    copyProperties: function (b, c, d) {
        if (btg.Object.isDefined(b) && btg.Object.isDefined(c)) for (var e in b) if (btg.Object.isDefined(c[e]) || btg.String.isDefined(c[e])) {
            if (d) c[e] = b[e]
        } else c[e] = b[e]
    },
    isConfigDefined: function (b) {
        if (typeof b == "object" && b !== null && b.enabled == true) return true;
        else return false
    }
};
btg.Sections = {
    getAdSections: function () {
        var b = btg.config,
            c = self.location.pathname;
        if (c == "") c = "/";
        if (c.lastIndexOf("/") == c.length - 1) c += btg.Object.isDefined(b) && btg.String.isDefined(b.defaultIndexFileName) ? b.defaultIndexFileName : "index";
        if (c != "/" && c.indexOf("/") == 0) c = c.substring(1);
        return c
    },
    getReportingSections: function () {
        return self.location.pathname
    }
};
btg.Session = {
    Variables: {
        config: [],
        add: function (b) {
            if (typeof b == "undefined") return false;
            for (var c = 0, d = this.config.length; c < d; c++) {
                if (typeof this.config[c].varName != "string") continue;
                for (var e = 0, d = b.length; e < d; e++) {
                    if (typeof b[e].varName != "string") continue;
                    if (b[e].varName == this.config[c].varName) this.config.splice(c, 1)
                }
            }
            this.config = this.config.concat(b);
            return true
        },
        setData: function (b) {
            var c = btg.String.isDefined;
            if (!c(b)) return null;
            for (var d = 0, e = this.config.length; d < e; d++) {
                var f = this.config[d];
                if (typeof b[f.varName] != "undefined") b[f.varName] = this.saveToCookie(f, b[f.varName]);
                else {
                    var g = c(f.cookieName) ? f.cookieName : "mtvn_btg_" + f.varName,
                        g = btg.Cookie.read(g);
                    if (c(g)) {
                        g = g.replace(/\+/gim, ";");
                        b[f.varName] = g
                    }
                }
            }
            return b
        },
        saveToCookie: function (b, c) {
            var d = btg.String.isDefined;
            if (typeof c == "string" && typeof b.varName == "string") {
                var c = c.replace(/\;/gim, "+"),
                    e = b.varName,
                    e = typeof b.cookieName == "string" ? b.cookieName : "mtvn_btg_" + e,
                    f = typeof b.neverDie == "boolean" ? b.neverDie : 0;
                if (typeof b.appendOnly == "boolean" || typeof b.appendOnly == "number" ? b.appendOnly : 0) {
                    var g = btg.Cookie.read(e);
                    if (d(g)) {
                        values = c.split(",");
                        for (var h = 0, j = values.length; h < j; h++) {
                            var n = values[h];
                            if (!d(n)) continue;
                            if (g.indexOf(n) > -1) continue;
                            if (g.length > 0) g += ",";
                            g += n
                        }
                        c = g
                    }
                }
                g = (new Date).getYear();
                btg.Cookie.set(e, c, f ? "Thu, 01-Jan-" + (g + 10) + " 23:59:59 GMT" : null)
            }
            return d(c) ? c.replace(/\+/gim, ";") : null
        }
    }
};
btg.String = {
    isDefined: function (b) {
        if (typeof b === "undefined" || b === null || b == "") return false;
        else return true
    },
    random: function (b) {
        for (var c = "", b = b ? b : 8, d = 0; d < b; d++) {
            var e = Math.floor(Math.random() * "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".length);
            c += "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".substring(e, e + 1)
        }
        return c
    },
    toObject: function (b, c) {
        for (var d = b.split(c ? c : ","), e = {}, f = 0, g = d.length; f < g; f++) {
            var h = d[f].split("=");
            e[h[0]] = h[1]
        }
        return e
    },
    queryStringToObject: function (b) {
        b = b.indexOf("?") > -1 ? b.split("?")[1] : b;
        return btg.String.toObject(b, "&")
    },
    stripFileExtension: function (b) {
        var c = b.lastIndexOf(".");
        if (c > 0) return b.substring(0, c);
        else return b
    },
    charLtrim: function (b, c) {
        if (b.indexOf(c) == 0) b = b.substring(1);
        return b
    },
    charRtrim: function (b, c) {
        var d = b.lastIndexOf(c),
            e = b.length;
        if (d == e - 1) b = b.substring(0, e - 1);
        return b
    },
    charTrim: function (b, c) {
        b = btg.String.charLtrim(b, c);
        return b = btg.String.charRtrim(b, c)
    },
    isMockupMode: function () {
        var b = false,
            c = this.queryStringToObject((btg.globalvars.IS_TOP_ACCESSIBLE ? top : self).location.search);
        if (c.mockupMode && c.mockupMode == "true") b = true;
        return b
    },
    mockItUp: function (b) {
        b = b.replace(/[<]/g, "&lt;");
        return b = b.replace(/[>]/g, "&gt;")
    },
    getFileName: function (b) {
        b = btg.String.isDefined(b) ? b : "";
        return b = b.substring(b.lastIndexOf("/") + 1)
    },
    getBetween: function (b, c, d) {
        var e = "";
        if (btg.String.isDefined(b)) {
            if (btg.String.isDefined(c)) {
                var f = b.indexOf(c);
                if (f >= 0) e = b.substring(f + c.length)
            }
            if (btg.String.isDefined(d)) {
                b = e.indexOf(d);
                if (b >= 0) e = e.substring(0, b)
            }
        }
        return e
    }
};
btg.Window = {
    getNodeLinkName: function (b) {
        for (var c = null, d = 0, e = b.childNodes.length; d < e; d++) {
            var f = b.childNodes[d];
            switch (f.nodeType) {
                case 3:
                    c = f.nodeValue;
                    break;
                case 1:
                    if (b.attributes.title && b.attributes.title.nodeValue != "") c = b.attributes.title.nodeValue;
                    else if (b.attributes.alt && b.attributes.alt.nodeValue != "") c = b.attributes.alt.nodeValue
            }
        }
        return c
    },
    debug: function (b) {
        var c = document.getElementById("debug");
        if (!c) {
            c = document.createElement("div");
            c.setAttribute("id", "debug");
            document.getElementsByTagName("body")[0].appendChild(c)
        }
        c.innerHTML = c.innerHTML + b + "<br>"
    }
};
btg.Environment = {
    getPlatform: function () {
        var b = "desktop",
            c = window.navigator.userAgent.toLowerCase();
        if (c.indexOf("ipad") != -1) b = "iPad";
        else if (c.indexOf("iphone") != -1) b = "iPhone";
        return b
    },
    getCnamedDomain: function () {
        var b = location.hostname;
        if (b.split(".")[0] == "www") return b.replace("www.", "sc.");
        else return "sc." + b
    }
};
btg.Class = {
    inheritFrom: function (b, c) {
        function d() {
            if (arguments.length > 0 && typeof b === "function") b.apply(this, arguments)
        }
        if (typeof b === "function" || typeof b === "object") if (typeof c === "function" || typeof c === "object") {
            var e = c.prototype;
            c.prototype = typeof b === "function" ? new b : b;
            for (var f in e) c.prototype[f] = e[f];
            c.prototype.constructor = c;
            d.prototype = typeof c === "function" ? new c : c;
            d.prototype.constructor = d
        } else {
            d.prototype = typeof b === "function" ? new b : b;
            d.prototype.constructor = d
        } else throw "Coda ERROR: btg.Class.inheritFrom(a_superClass,a_subClass) requires at least a_superClass argument!";
        return d
    }
};
btg.Timer = function (b, c) {
    this.id = b;
    this.isRunning = false;
    this.currentCount = 0;
    this.milliseconds = c ? c : 100;
    this.intervalId = null;
    this.listeners = []
};
btg.Timer.prototype = {
    on: function (b, c) {
        if (typeof c == "function") this.listeners[b] = c
    },
    execListener: function (b) {
        if (typeof this.listeners[b] == "function") this.listeners[b]()
    },
    start: function () {
        if (!this.isRunning) {
            this.isRunning = true;
            this.intervalId = setInterval(this.id + ".count()", this.milliseconds)
        }
    },
    count: function () {
        this.currentCount = this.currentCount + this.milliseconds;
        this.execListener("count")
    },
    stop: function () {
        clearInterval(this.intervalId);
        this.isRunning = false
    },
    reset: function () {
        this.stop();
        this.currentCount = 0;
        this.start()
    }
};
btg.TimeTracker = function (b) {
    var c = btg.String.isDefined,
        d = btg.Cookie,
        e = "",
        f = null,
        g = c(b) ? b : "";
    this.init = function () {
        f = (new Date).getTime();
        btg.DOM.Events.addListener(window, "unload", this.saveTimeSpent);
        return true
    };
    this.setData = function (b) {
        if (c(b)) e = b
    };
    this.getTimeSpentOnPage = function () {
        var b = "",
            b = (new Date).getTime(),
            b = Math.round((b - f) / 100);
        if (b < 1) b = "";
        f = (new Date).getTime();
        return b
    };
    this.saveTimeSpent = function () {
        if (c(g)) {
            var b = (new Date).getTime(),
                b = Math.round((b - f) / 100);
            if (b < 1) b = 1;
            b = b;
            b += c(e) ? "," + e : "";
            d.set(g, b)
        }
    };
    this.getTimespent = function () {
        if (c(g)) {
            var b = d.read(g);
            d.remove(g);
            f = (new Date).getTime();
            return c(b) ? b : ""
        }
    }
};
btg.Ajax = function (b) {
    var c = btg.Object.isDefined(b) ? b : {};
    c.method = btg.String.isDefined(c.method) ? c.method : "GET";
    var d;
    if (window.XMLHttpRequest) d = new XMLHttpRequest;
    else d = new ActiveXObject("Microsoft.XMLHTTP");
    this.sendRequest = function () {
        if (!btg.String.isDefined(c.url)) return "[ERROR: Ajax request URL not specified!]";
        d.onreadystatechange = function () {
            if (d.readyState == 4) {
                c.responseText = d.responseText;
                c.responseXML = d.responseXML;
                if (d.status == 404) {
                    if (typeof c.on404 == "function") c.on404(c)
                } else if (typeof c.onSuccess == "function") {
                    c.success = true;
                    c.onSuccess(c)
                }
            }
        };
        try {
            d.open(c.method, c.url, true);
            d.send();
            return true
        } catch (b) {
            if (typeof c.onFail == "function") {
                c.error = b;
                c.fail = true;
                c.onFail(c)
            }
            return false
        }
    };
    if (c.autoSend === true) this.sendRequest()
};
(function (b) {
    var c = ["demdexcall", "demdexfwsegment", "uuid", "usersegment"],
        d = function (b) {
            var d = b.data,
                g, h;
            if (!JSON) return;
            if (d) {
                try {
                    d = JSON.parse(d)
                } catch (j) {
                    return
                }
                g = d.type;
                h = d.value
            }
            if (g && c.join().indexOf(g) != -1) switch (g) {
                case c[0]:
                    b = {};
                    d = 0;
                    for (g = h.length; d < g; d++) {
                        var n = h[d].split("=");
                        b[n[0]] = n[1]
                    }
                    btg.Demdex.sendPageCall(b);
                    break;
                case c[1]:
                    h = {
                        type: c[1],
                        value: btg.Demdex.getFWSegment()
                    };
                    if (h.value) b.source.postMessage(JSON.stringify(h), "*");
                    break;
                case c[2]:
                    h = {
                        type: c[2],
                        value: btg.Cookie.read("vmn_uuid")
                    };
                    if (h.value) b.source.postMessage(JSON.stringify(h), "*");
                    break;
                case c[3]:
                    h = {
                        type: c[3],
                        value: btg.Cookie.read("mtvn_btg_userSegments")
                    };
                    if (h.value) b.source.postMessage(JSON.stringify(h), "*")
            }
        };
    if (typeof b.addEventListener !== "undefined") b.addEventListener("message", d, false);
    else if (typeof b.attachEvent !== "undefined") b.attachEvent("onmessage", d)
})(window);
btg.DependencyManager = function (b) {
    var c = btg.config,
        d = b ? b : 8E3,
        e = false,
        f = [],
        g = [];
    this.add = function (b, c, f, l) {
        if (typeof b == "undefined" || typeof c == "undefined") return false;
        for (var o = 0, p = g.length; o < p; o++) if (g[o].flagname == b) return false;
        g[g.length] = {
            flagname: b,
            callback: c,
            interval: f ? f : 100
        };
        if (!e) {
            e = true;
            window.setTimeout(this.sendCalls, d)
        }
        if (l) this.checkDependency(b);
        return true
    };
    this.remove = function (b) {
        if (typeof b == "string" && b != "") for (var c = 0, d = g.length; c < d; c++) if (g[c].flagname == b) {
            g.splice(c, 1);
            break
        }
        if (!this.hasDependency()) this.sendCalls()
    };
    this.checkDependency = function (b) {
        for (var c = null, d = 0, f = g.length; d < f; d++) if (g[d].flagname == b) c = g[d];
        if (!c) return false;
        if (c.callback.apply()) this.remove(b);
        else {
            var e = this;
            window.setTimeout(function () {
                e.checkDependency(b)
            }, c.interval)
        }
    };
    this.hasDependency = function (b) {
        if (btg.String.isDefined(b)) {
            for (var c = g.length, d = 0; d < c; d++) if (g[d].flagname == b) return true;
            return false
        }
        return g.length >= 1
    };
    this.addToCallQueue = function (b, d) {
        if (!d) return false;
        for (var e = new Array, g = 2, o = arguments.length; g < o; g++) e.push(arguments[g]);
        f[f.length] = {
            context: b ? b : this,
            callback: d,
            args: e,
            config: c
        };
        return true
    };
    this.sendCalls = function () {
        g = [];
        for (var b = c, d = 0, e = f.length; d < e; d++) {
            c = f[d].config;
            f[d].callback.apply(f[d].context, f[d].args)
        }
        c = b;
        f = []
    }
};
btg.PluginManager = function (b) {
    for (var c = new Array, d = 1, e = arguments.length; d < e; d++) c.push(arguments[d]);
    d = 0;
    for (e = b.length; d < e; d++) if (typeof b[d].init == "function") b[d].init.apply(this, c);
    this.run = function (c) {
        for (var d = 0, e = b.length; d < e; d++) if (btg.Object.isDefined(b[d]) && typeof b[d].run == "function") c = b[d].run(c);
        return c
    }
};
btg.QueueManager = function (b) {
    this.id = b.id;
    this.timeToWait = !isNaN(b.timeToWait) ? b.timeToWait : 1;
    this.handler = typeof b.handler == "function" ? b.handler : function () { };
    this.notificationHandler = typeof b.notificationHandler == "function" ? b.notificationHandler : function () { };
    this.intervalId = null;
    this.isProcessing = false;
    this.queue = [];
    this.processedQueue = [];
    this.maxNumItems = b.maxNumItems;
    this.maxElapsed = b.maxElapsed;
    this.itemsAdded = this.totalItems = this.elapsed = 0
};
btg.QueueManager.prototype = {
    init: function () {
        this.isProcessing = true;
        this.processQueue();
        this.intervalId = setInterval(this.id + ".processQueue()", this.timeToWait)
    },
    addToQueue: function () {
        this.queue.push(arguments);
        this.itemsAdded++;
        if (!this.isProcessing) this.init()
    },
    processQueue: function () {
        if (this.isProcessing == true) if (this.queue.length > 0) {
            var b = this.queue.shift();
            this.elapsed = this.elapsed + this.timeToWait;
            this.totalItems++;
            if (!this.hasLimit()) {
                this.handler(b);
                this.processedQueue.push(b)
            } else {
                this.notificationHandler(this);
                this.clearQueue();
                this.stop()
            }
        } else this.stop()
    },
    stop: function () {
        clearInterval(this.intervalId);
        this.isProcessing = false;
        this.itemsAdded = this.totalItems = this.elapsed = 0
    },
    hasLimit: function () {
        return this.elapsed == this.maxElapsed || this.totalItems > this.maxNumItems
    },
    clearQueue: function () {
        this.queue = [];
        this.processedQueue = []
    }
};
btg.GUID = new function () {
    var b = null,
        c = null,
        d = function () {
            var b = btg.Cookie.read("vmn_uuid");
            if (typeof b == "string") c = b;
            return typeof c == "string"
        },
        e = function () {
            return typeof b.enableGuidPlugin == "boolean" && b.enableGuidPlugin
        };
    this.isGUIDReported = false;
    this.hasGUIDCookie = function () {
        return d()
    };
    this.get3pcCookie = function () {
        var b = btg.Cookie.read("vmn_3pc");
        return !btg.String.isDefined(b) ? null : b
    };
    this.init = function (c) {
        b = c;
        if (!e()) return false;
        if (typeof b.guidIdVarMap == "undefined") b.guidIdVarMap = ["eVar57"];
        if (typeof b.guidIdVarMap == "string") b.guidIdVarMap = b.guidIdVarMap.split(",");
        return true
    };
    this.run = function (f) {
        if (!e()) return f;
        if (!d()) {
            new btg.Alert("Failed to find the UUID value.");
            return f
        }
        for (var g = 0, n = b.guidIdVarMap.length; g < n; g++) f[b.guidIdVarMap[g]] = c;
        this.isGUIDReported = true;
        return f
    };
    this.guidScript = function () {
        var b = btg.GUID;
        btg.Controller.init();
        if (b.hasGUIDCookie() && !b.isGUIDReported) {
            b.sendLinkEventCall();
            return b.isGUIDReported = true
        }
        return false
    };
    this.sendLinkEventCall = function () {
        var b = {
            linkName: "GUID reporting",
            linkType: "o"
        },
            b = btg.GUID.run(b);
        if (e) btg.Controller.sendLinkEvent(b)
    };
    try {
        var f = "http" + ("https:" == document.location.protocol ? "s" : "") + "://btg.mtvnservices.com/aria/uuid.html";
        if (!this.get3pcCookie()) btg.DOM.loadScript(f)
    } catch (g) { }
};
try {
    btg.DOM.Events.addListener(window, "load", function () {
        var b = btg.config,
            c = btg.Object.isConfigDefined;
        if (c(b.Omniture)) if (b.Omniture.enableGuidPlugin && b.Omniture.enableGuidAuxiliaryCall && !btg.GUID.isGUIDReported) {
            b = new btg.DependencyManager;
            b.add("vmn_uuid", btg.GUID.guidScript);
            b.checkDependency("vmn_uuid")
        }
    })
} catch (e$$12) { }
btg.ComScore = function (b) {
    this.btgIsStr = btg.String.isDefined;
    this.config = b;
    this.c1 = this.btgIsStr(this.config.c1) ? this.config.c1 : "2";
    this.c2 = this.btgIsStr(this.config.c2) ? this.config.c2 : "6036034";
    this.c3 = this.btgIsStr(this.config.c3) ? this.config.c3 : "";
    this.c4 = this.btgIsStr(this.config.c4) ? this.config.c4 : escape(document.location.href);
    this.c5 = this.btgIsStr(this.config.c5) ? this.config.c5 : "20000";
    this.c6 = this.btgIsStr(this.config.c6) ? this.config.c6 : "";
    this.c15 = this.btgIsStr(this.config.c15) ? this.config.c15 : "";
    this.sendPageCall()
};
btg.ComScore.prototype = {
    sendPageCall: function (b) {
        var c = btg.ReportingManager;
        if (typeof b === "object") {
            if (this.btgIsStr(b.comScore1)) this.c1 = b.comScore1;
            if (this.btgIsStr(b.comScore2)) this.c2 = b.comScore2;
            if (this.btgIsStr(b.comScore3)) this.c3 = b.comScore3;
            if (this.btgIsStr(b.comScore4)) this.c4 = b.comScore4;
            if (this.btgIsStr(b.comScore5)) this.c5 = b.comScore5;
            if (this.btgIsStr(b.comScore6)) this.c6 = b.comScore6;
            if (this.btgIsStr(b.comScore15)) this.c15 = b.comScore15
        }
        b = ["c1=", this.c1, "&c2=", this.c2, "&c3=", this.c3, "&c4=", this.c4, "&c5=", this.c5, "&c6=", this.c6, "&c15=", this.c15].join("");
        try {
            if (!btg.globalvars.IS_UNIT_TEST && !c.isScriptIncluded.comscore) {
                btg.DOM.loadScript((document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js?" + b);
                c.isScriptIncluded.comscore = true
            }
        } catch (d) { }
    }
};
btg.GoogleAnalytics = function (b) {
    this.btgIsStr = btg.String.isDefined;
    this.config = b;
    if (b.iframeAccount && !btg.globalvars.IS_UNIT_TEST) document.write(unescape("%3Cdiv id='btg_ga_div'%3E%3C/div%3E"));
    this.account = b.account;
    this.dependencies = new btg.DependencyManager;
    this.dependencies.add("ga_script_load", function () {
        return typeof _gat == "object"
    }, 100);
    this.dependencies.checkDependency("ga_script_load")
};
btg.GoogleAnalytics.prototype = {
    sendPageCall: function (b) {
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendPageCall, b);
            return
        }
        if (this.btgIsStr(this.config.iframeAccount)) {
            var c = [];
            if (this.config.iframeAccount.indexOf(",") > -1) c = this.config.iframeAccount.split(",");
            else c[0] = this.config.iframeAccount;
            for (var d = 0, e = c.length; d < e; d++) {
                var f = document.getElementById("btg_ga_div"),
                    g = window.location,
                    h = b.pageName,
                    h = h.substring(0, 1) != "/" ? "/" + h : h,
                    j = document.referrer,
                    n = "//btg.mtvnservices.com/aria/ga.html?ga=" + c[d] + "&uri=",
                    j = "&ref=" + escape(j);
                if (f) {
                    var l = document.createElement("iframe");
                    l.src = g.protocol + n + g.hostname + h + j;
                    l.style.width = 1 + "px";
                    l.style.height = 1 + "px";
                    l.style.visibility = "hidden";
                    l.style.left = -50 + "px";
                    l.style.top = -50 + "px";
                    l.style.position = "absolute";
                    f.appendChild(l)
                }
            }
        }
        if (this.btgIsStr(this.config.account)) try {
            if (!btg.globalvars.IS_UNIT_TEST) if (typeof _gat == "object") _gat._getTracker(this.config.account)._trackPageview()
        } catch (o) { }
    },
    sendLinkEvent: function (b) {
        if (!b || !this.btgIsStr(b.category) || !this.btgIsStr(b.action) || !this.btgIsStr(b.label)) return;
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendLinkEvent, b);
            return
        }
        b.value = typeof b.value != "undefined" && typeof parseInt(b.value) == "number" ? parseInt(b.value) : null;
        var c = _gat._createTracker(this.config.account, "event_tracker");
        c._setDomainName("");
        c._trackEvent(b.category, b.action, b.label, b.value)
    }
};
try {
    if (!btg.globalvars.IS_UNIT_TEST) {
        var ga = document.createElement("script");
        ga.type = "text/javascript";
        ga.async = true;
        ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(ga, s)
    }
} catch (e$$15) { }
btg.Nielsen = function (b) {
    this.config = b;
    this.dependencies = new btg.DependencyManager;
    this.dependencies.add("nielsen_uuid_present", function () {
        return btg.Cookie.read("vmn_uuid") != "" ? true : false
    }, 100);
    this.dependencies.checkDependency("nielsen_uuid_present");
    this.sendPageCall()
};
btg.Nielsen.prototype = {
    sendPageCall: function (b) {
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendPageCall, b);
            return
        }
        var c = btg.Cookie.read("vmn_uuid");
        if (c == null) return;
        b = null;
        if (!b && btg.String.isDefined(this.config.cid)) b = this.config.cid;
        if (!b) return false;
        var d = new Image(1, 1);
        d.onerror = d.onload = function () {
            d.onerror = d.onload = null
        };
        c = "VMN_IDSYNC_" + escape(window.location.hostname) + "_" + escape(window.location.href) + "_" + c;
        d.src = ["//secure-us.imrworldwide.com/cgi-bin/m?ci=" + b + "&cg=0&cc=1&si=", c, "&rp=", escape(document.referrer), "&ts=compact&rnd=", (new Date).getTime()].join("")
    }
};
btg.Omniture = function (b) {
    this.pageViewEventSet = false;
    this.btgIsStr = btg.String.isDefined;
    this.btgSv = btg.Session.Variables;
    this.name = "Omniture";
    this.values = [];
    this.newRepeatProp = this.btgIsStr(b.newRepeatProp) ? b.newRepeatProp : "prop41";
    this.config = b;
    this.hcode = btg.Hcode;
    this.userPlatform = btg.Environment.getPlatform();
    this.hcode.setAccount(this.config.account);
    if (this.userPlatform == "desktop") {
        if (this.config.enableFirstPartyCookie) this.hcode.trackingServer = btg.Environment.getCnamedDomain()
    } else {
        this.hcode.trackingServer = btg.Environment.getCnamedDomain();
        if (this.btgIsStr(this.config.tabletAccount)) this.hcode.setAccount(this.config.tabletAccount)
    }
    for (var c in this.config) this.hcode[c] = this.config[c];
    this.url = "http" + (this.hcode.ssl ? "s" : "") + "://" + this.hcode.un + ".112.2o7.net/b/ss/" + this.hcode.un + "/1/";
    this.dependencies = new btg.DependencyManager;
    this.plugins = new btg.PluginManager([btg.GUID], this.config, this.dependencies);
    if (typeof btg.config.Omniture.enableVisitorNamespace == "boolean" && btg.config.Omniture.enableVisitorNamespace) this.setAttribute("visitorNamespace", btg.globalvars.VISITOR_NAMESPACE);
    if (typeof this.config.userSegmentVarMap == "undefined") {
        this.config.userSegmentVarMap = {
            traffic: "prop31",
            commerce: "products"
        };
        btg.config.Omniture.userSegmentVarMap = this.config.userSegmentVarMap
    }
    if (typeof btg.UserSegment != "undefined") btg.UserSegment.init(this);
    if (typeof btg.FluxState != "undefined") btg.FluxState.init(this.config.fluxCommunityId);
    if (typeof this.config.fluxVarMap == "undefined") {
        this.config.fluxVarMap = {
            memberState: "prop5",
            loginState: "prop6"
        };
        btg.config.Omniture.fluxVarMap = this.config.fluxVarMap
    }
    if (typeof this.config.timePartingVarMap == "undefined") this.config.timePartingVarMap = {
        trafficDay: "prop33",
        trafficHour: "prop34",
        commerceDay: "eVar45",
        commerceHour: "eVar46"
    };
    if (typeof this.config.photosVarMap == "undefined") this.config.photosVarMap = {
        application: ["prop48", "eVar31"],
        gallery: "eVar16",
        photoId: "eVar17",
        flipbookView: "event57",
        photoView: "event58",
        adView: "event59",
        timeSpent: "event60"
    };
    if (typeof mtvn_btg_Photos != "undefined") btg.Photos.init(this.config.photosVarMap);
    if (typeof this.config.pageViewEvent != "string") this.config.pageViewEvent = "event16";
    if (typeof btg.MediaPlayer != "undefined") btg.MediaPlayer.init(this)
};
btg.Omniture.prototype = {
    setAttribute: function (b, c) {
        if (this.btgIsStr(b)) {
            this.hcode[b] = this.btgIsStr(c) ? c : "";
            return true
        } else return false
    },
    getAttribute: function (b) {
        return this.hcode[b]
    },
    setValues: function (b) {
        for (var c in b) {
            this.setAttribute(c, b[c]);
            this.values.push(c)
        }
        return true
    },
    clearValues: function () {
        for (var b = 0, c = this.values.length; b < c; b++) if (this.values[b] != "pageName") this.setAttribute(this.values[b], "");
        this.clearNewRepeat();
        this.values = this.getPageName() ? ["pageName"] : [];
        return true
    },
    setNewRepeat: function () {
        this.setAttribute(this.newRepeatProp, this.hcode.getNewRepeat());
        return true
    },
    clearNewRepeat: function () {
        this.setAttribute(this.newRepeatProp, "");
        return true
    },
    getValOnce: function (b, c, d) {
        return this.hcode.getValOnce(b, c, d)
    },
    getNewRepeat: function () {
        return this.hcode.getNewRepeat()
    },
    getPageName: function () {
        return this.getAttribute("pageName")
    },
    preprocessData: function (b) {
        b = this.plugins.run(b);
        if (this.btgIsStr(b.account)) this.hcode.setAccount(b.account);
        else this.hcode.setAccount(this.config.account);
        if (typeof mboxDefine == "function" && typeof this.config.enableTestAndTarget == "boolean" && this.config.enableTestAndTarget) {
            b.tnt = this.hcode.trackTNT();
            if (b.tnt == "") b.tnt = btg.TestAndTarget.getCampaignId()
        }
        if (typeof btg.UserSegment != "undefined") b = btg.UserSegment.setData(this, b);
        if (typeof btg.Session != "undefined") b = this.btgSv.setData(b);
        var c = btg.Cookie.read;
        if (c("vmn_3pc") && c("vmn_3pc") == "0") b.eVar58 = "3PB";
        return b
    },
    sendPageCall: function (b) {
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendPageCall, b);
            return
        }
        b = typeof b != "object" ? {} : b;
        if (typeof b.pageName != "string" || b.pageName == "") b.pageName = typeof this.hcode.pageName === "string" && this.hcode.pageName != "" ? this.hcode.pageName : btg.config._defaultPageName;
        if (typeof this.config.noPagenameSlash != "undefined" && this.config.noPagenameSlash && b.pageName.charAt(0) == "/") b.pageName = b.pageName.substring(1);
        if (typeof this.config.defaultHier == "string" && this.config.defaultHier != "") if (typeof b[this.config.defaultHier] !== "string" || b[this.config.defaultHier] == "") {
            if (typeof this.hcode[this.config.defaultHier] === "string" && this.hcode[this.config.defaultHier] != "") var c = this.hcode[this.config.defaultHier];
            else if (typeof b.docHierarchy === "string" && b.docHierarchy != "") c = b.docHierarchy;
            else c = b.pageName;
            if (c.charAt(c.length - 1) == "/") if (typeof btg.config.indexFileName === "string") b[this.config.defaultHier] = c + btg.config.indexFileName;
            else b[this.config.defaultHier] = c + "index";
            else b[this.config.defaultHier] = c;
            b[this.config.defaultHier] = btg.String.charLtrim(b[this.config.defaultHier], "/")
        }
        if (typeof b.channel != "string" || b.channel == "") if (typeof this.hcode.channel == "string") b.channel = this.hcode.channel;
        else if (b.pageName == "/") b.channel = b.pageName;
        else for (var c = b.pageName.split("/"), d = 0, e = c.length; d < e; d++) if (c[d] != "") {
            b.channel = c[d];
            break
        }
        if (typeof b.channel == "string") b.eVar49 = b.channel;
        if (typeof btg.SEO != "undefined") b = btg.SEO.setData(this, b);
        if (typeof btg.BrowserToolbar != "undefined") b = btg.BrowserToolbar.setData(this, b);
        if ((typeof this.config.isFluxHosted == "undefined" || typeof this.config.isFluxHosted != "undefined" && this.config.isFluxHosted != true) && typeof btg.FluxState != "undefined") b = btg.FluxState.setData(this, b);
        if (typeof btg.Search != "undefined") b = btg.Search.setData(b);
        if (typeof btg.Search != "undefined") b = btg.Search.chkConversions(b);
        if (typeof btg.Photos != "undefined") b = btg.Photos.setData(b);
        if (typeof btg.RecsABTesting != "undefined") b = btg.RecsABTesting.setData(this, b);
        if (typeof this.config.enableTimeParting != "undefined" && this.config.enableTimeParting == true && typeof this.config.timePartingVarMap != "undefined") {
            c = typeof btg.config.Omniture.timezone != "undefined" ? btg.config.Omniture.timezone : "-5";
            b[this.config.timePartingVarMap.commerceHour] = b[this.config.timePartingVarMap.trafficHour] = this.hcode.getTimeParting("h", c);
            b[this.config.timePartingVarMap.commerceDay] = b[this.config.timePartingVarMap.trafficDay] = this.hcode.getTimeParting("d", c)
        }
        if (typeof this.config.percentPageViewedVarMap != "undefined") {
            if (typeof this.config.percentPageViewedVarMap.previousPage != "undefined") b[this.config.percentPageViewedVarMap.previousPage] = this.hcode.getPreviousValue(b.pageName, "s_pn");
            if (typeof this.config.percentPageViewedVarMap.percentage != "undefined") if (this.config.percentPageViewedVarMap.percentage.indexOf("event") >= 0) {
                if (typeof b.events == "string" && b.events != "") b.events += ",";
                else b.events = "";
                b.events += this.config.percentPageViewedVarMap.percentage;
                if (typeof b.products == "string" && b.products != "") b.products += ",";
                else b.products = "";
                b.products += ";;;;" + this.config.percentPageViewedVarMap.percentage + "=" + this.hcode.getPercentPageViewed()
            } else b[this.config.percentPageViewedVarMap.percentage] = this.hcode.getPercentPageViewed()
        }
        if (!this.pageViewEventSet) {
            c = typeof b.events === "string" ? b.events : "";
            if (typeof this.config.pageViewEvent === "string" && c.indexOf(this.config.pageViewEvent) < 0) {
                if (c != "") c += ",";
                c += this.config.pageViewEvent;
                b.events = c;
                this.pageViewEventSet = true
            }
        }
        if (typeof btg.GameReporter != "undefined") {
            btg.GameReporter.gtsEvent = "event74";
            b = btg.GameReporter.setData(b)
        }
        b = this.preprocessData(b);
        this.setValues(b);
        this.setNewRepeat();
        this.attachLoggedEvent();
        if (btg.Object.isConfigDefined(btg.config.Demdex) && btg.Demdex) {
            b[this.newRepeatProp] = this.getAttribute(this.newRepeatProp);
            btg.Demdex.sendPageCall(b)
        }
        this.hcode.t();
        this.clearValues();
        return true
    },
    sendLinkEvent: function (b) {
        this.hcode.trackExternalLinks = false;
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendPageCall, b);
            return
        }
        var b = typeof b != "object" ? {} : b,
            c = this.getPageName();
        b.lnk = b.lnk ? this.hcode.co(b.lnk) : true;
        b.linkType = b.linkType ? b.linkType : "o";
        b.referrer = location.href;
        b = this.preprocessData(b);
        this.setValues(b);
        this.setAttribute("pageName", "");
        this.attachLoggedEvent();
        this.hcode.t();
        this.clearValues();
        this.setAttribute("pageName", c);
        if (btg.config.Omniture.trackExternalLinks === true) {
            var d = this;
            setTimeout(function () {
                d.hcode.trackExternalLinks = true
            }, 1)
        }
        return true
    },
    setAccountVars: function (b) {
        this.setAttribute("un", b.name);
        this.setAttribute("dynamicAccountSelection", b.dynamic);
        this.setAttribute("dynamicAccountList", b.list);
        this.setAttribute("linkInternalFilters", b.filters);
        this.setAttribute("charSet", b.chartset);
        for (var c in b) if (this.btgIsStr(c)) this.setAttribute(c, this.btgIsStr(b[c]) ? b[c] : "")
    },
    logEvent: function (b) {
        var c = btg.Cookie.set;
        if (this.btgIsStr(b)) {
            if (this.btgIsStr(b.UIEvent)) c("UIEvent", b.UIEvent);
            if (this.btgIsStr(b.UIEventName)) c("UIEventName", b.UIEventName);
            if (this.btgIsStr(b.UITrackingCode)) c("UITrackingCode", b.UITrackingCode)
        }
    },
    attachLoggedEvent: function () {
        var b = btg.Cookie.read,
            c = btg.Cookie.remove;
        if (this.btgIsStr(b("UIEvent"))) {
            this.setAttribute("events", b("UIEvent"));
            c("UIEvent")
        }
        if (this.btgIsStr(b("UIEventName"))) {
            this.setAttribute("eVar40", b("UIEventName"));
            c("UIEventName")
        }
        if (this.btgIsStr(b("UITrackingCode"))) {
            this.setAttribute("campaign", b("UITrackingCode"));
            c("UITrackingCode")
        }
        return true
    },
    clearAllVars: function () {
        for (var b = 1; b <= 50; b++) {
            this.setAttribute("eVar" + b, "");
            this.setAttribute("prop" + b, "");
            if (b < 6) this.setAttribute("hier" + b, "")
        }
        this.setAttribute("pageName", "");
        this.setAttribute("channel", "");
        return true
    }
};
btg.ReportingManager = new function () {
    var b = false,
        c = false,
        d = false,
        e = false,
        f, g, h, j, n;
    this.isScriptIncluded = {
        comscore: false,
        quantcast: false,
        googleAnalytics: false
    };
    this.init = function () {
        g = btg.config;
        var f = btg.Object.isConfigDefined;
        if (f(g.Omniture) && btg.Omniture) {
            h = new btg.Omniture(g.Omniture);
            b = true
        }
        if (f(g.Nielsen) && btg.Nielsen) new btg.Nielsen(g.Nielsen);
        if (f(g.GoogleAnalytics) && btg.GoogleAnalytics) {
            n = new btg.GoogleAnalytics(g.GoogleAnalytics);
            d = true
        }
        if (f(g.QuantCast) && btg.QuantCast) {
            j = new btg.QuantCast(g.QuantCast);
            c = true
        }
        if (f(g.ComScore) && btg.ComScore) new btg.ComScore(g.ComScore);
        if (g.ChoiceStream && g.ChoiceStream.enabled && btg.ChoiceStream) {
            choicestream = new btg.ChoiceStream(g.ChoiceStream);
            e = true
        }
        if (f(g.ChoiceStream) && btg.ChoiceStream) {
            choicestream = new btg.ChoiceStream(g.ChoiceStream);
            e = true
        }
        if (f(g.Demdex) && btg.Demdex) {
            btg.Demdex.sendIdSyncCall();
            hasDemdex = true
        }
    };
    this.sendPageCall = function (e) {
        if (b) {
            h.sendPageCall(typeof e.omniture == "object" && e.omniture != null ? e.omniture : e);
            f = h.getPageName()
        }
        if (c) j.sendPageCall(typeof e.quantCast == "object" && e.quantCast != null ? e.quantCast : e);
        if (d) n.sendPageCall(typeof e.googleAnalytics == "object" && e.googleAnalytics != null ? e.googleAnalytics : e)
    };
    this.sendLinkEvent = function (c) {
        if (b) h.sendLinkEvent(typeof c.omniture == "object" && c.omniture != null ? c.omniture : c);
        if (d && btg.Object.isDefined(c.googleAnalytics)) n.sendLinkEvent(c.googleAnalytics)
    };
    this.getData = function () {
        btg.Controller.init();
        return {
            pageName: f
        }
    };
    this.getOmniture = function () {
        return b ? h : null
    };
    this.setChoiceStreamRequest = function (b, c) {
        if (e) choicestream.setChoiceStreamRequest(b, c)
    }
};
btg.FluxState = new function () {
    var b = function () {
        if (typeof Flux != "object" || Flux == null) return null;
        else if (typeof Flux.context == "object" && Flux.context != null && typeof Flux.context.user == "object" && Flux.context.user != null) return 3;
        else if (typeof Flux.Context == "object" && Flux.Context != null) return 2;
        return null
    };
    this.init = function (b) {
        if (b) btg.DOM.loadScript((document.location.protocol == "https:" ? "https://" : "http://") + "widgets3.flux.com/context/short/" + b)
    };
    this.setData = function (c, d) {
        var e = c.config.fluxVarMap.memberState;
        var f = null;
        switch (b()) {
            case 3:
                f = Flux.context.user.communityMember;
                break;
            case 2:
                f = Flux.Context.isCommunityMember()
        }
        d[e] = f ? "member" : "non-member";
        e = c.config.fluxVarMap.loginState;
        var f = btg.UserSegment,
            g = null;
        switch (b()) {
            case 3:
                if (Flux.context.user.memberType) {
                    g = Flux.context.user.memberType;
                    f.add(c, g + " User")
                } else if (Flux.context.user.facebookOnly) {
                    g = "FB Only";
                    f.add(c, "FB Connect Only User")
                } else if (Flux.context.user.facebookConnected) {
                    g = "Flux + FB";
                    f.add(c, "Flux & FB Connect User")
                } else if (typeof Flux.context.user.ucid == "string" && Flux.context.user.ucid.length > 0) {
                    g = "Flux Only";
                    f.add(c, "Flux Only User")
                } else g = "not logged-in";
                break;
            case 2:
                g = Flux.Context.isUserAuthenticated() ? "logged-in" : "not logged-in";
                break;
            default:
                g = "not logged-in"
        }
        if (g && g != "not logged-in") f.add(c, "LoggedIn");
        d[e] = g;
        return d
    }
};
btg.SEO = new function () {
    this.setData = function (b, c) {
        for (var d = [
            ["google.com", "GoogleUser"],
            ["msn.com", "MSNUser"],
            ["yahoo.com", "YahooUser"]
        ], e = 0, f = d.length; e < f; e++) if (document.referrer.indexOf(d[e][0]) > -1) if (typeof btg.UserSegment != "undefined") btg.UserSegment.set(d[e][1]);
        return c
    }
};
btg.Search = new function () {
    var b = btg.Cookie,
        c = b.set,
        d = "",
        e = function (b) {
            if (d.indexOf(b) < 0) {
                if (d != "") d += ",";
                d += b
            }
            return d
        };
    this.init = function () { };
    this.setData = function (b) {
        if (typeof com_mtvi_SSDC != "object") return b;
        var c = "events,prop31";
        e("event36");
        b.eVar3 = typeof com_mtvi_SSDC.srchtype == "string" ? com_mtvi_SSDC.srchtype : "GENERAL";
        if (typeof com_mtvi_SSDC.srchsyn != "undefined") {
            e("event33");
            if (typeof com_mtvi_SSDC.srchsyn == "object") {
                for (var h = 0, j = com_mtvi_SSDC.srchsyn.length; h < j; h++) com_mtvi_SSDC.srchsyn[h] = com_mtvi_SSDC.srchsyn[h].replace(/\,/, "");
                com_mtvi_SSDC.srchsyn = com_mtvi_SSDC.srchsyn.join(",")
            }
            b.eVar36 = com_mtvi_SSDC.srchsyn;
            c += ",eVar36"
        }
        if (typeof com_mtvi_SSDC.srchterm == "string") {
            e("event38");
            b.eVar2 = com_mtvi_SSDC.srchterm;
            c += ",eVar2"
        } else if (typeof com_mtvi_SSDC.srchfail == "string") {
            e("event37");
            b.eVar4 = typeof com_mtvi_SSDC.appfailure == "boolean" && com_mtvi_SSDC.appfailure ? "APP_FAILURE" : com_mtvi_SSDC.srchfail;
            c += ",eVar4"
        }
        btg.UserSegment.set("SiteSearcher");
        b.linkTrackVars = c;
        b.linkTrackEvents = d;
        return b
    };
    this.sendLinkEvent = function () {
        if (!com_mtvi_SSDC) return false;
        var b = {
            linkName: "SITE_SEARCH_RESULTS",
            linkType: "o"
        },
            b = this.setData(b);
        btg.Controller.sendLinkEvent(b);
        return true
    };
    this.chkConversions = function (c) {
        var g = b.read,
            h = b.remove;
        if (typeof c.events == "string") d = c.events;
        if (g("mtvn_btg_SSDC_conv")) {
            e("event35");
            h("mtvn_btg_SSDC_conv")
        }
        if (g("mtvn_btg_SSDC_syn_conv")) {
            e("event34");
            h("mtvn_btg_SSDC_syn_conv")
        }
        if (g("mtvn_btg_SSDC_typeahead_conv")) {
            e("event39");
            h("mtvn_btg_SSDC_typeahead_conv")
        }
        c.events = d;
        return c
    };
    this.setConversion = function () {
        c("mtvn_btg_SSDC_conv", 1)
    };
    this.setSynConversion = function () {
        c("mtvn_btg_SSDC_syn_conv", 1)
    };
    this.setTypeAheadConversion = function () {
        c("mtvn_btg_SSDC_typeahead_conv", 1)
    }
};
btg.Demdex = new function () {
    try {
        var b = "https:" == document.location.protocol ? "https://" : "http://"
    } catch (c) { }
    var d = b + "mtvn.demdex.net",
        e = b + "dpm.demdex.net/ibs:dpid=332&dpuuid=",
        f = btg.Cookie,
        g = new btg.Beacon,
        h = false;
    this.canSendRequest = true;
    this.dependencies = new btg.DependencyManager;
    this.data = null;
    this.sendIdSyncCall = function () {
        var b = f.read("vmn_uuid");
        if (!f.read("mtvn_dmp_init") && b) {
            var c = new Date;
            g.url = e + b;
            g.send();
            c.setHours(23);
            c.setMinutes(59);
            f.set("mtvn_dmp_init", 1, c)
        }
    };
    this.sendPageCall = function (b, c) {
        if (f.read("vmn_3pc") == "0") return;
        this.dependencies.add("demdex_response", function () {
            return (btg.Demdex ? btg.Demdex : {}).canSendRequest
        }, 500, true);
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendPageCall, b, c);
            return
        }
        this.canSendRequest = false;
        var e = d + "/event?",
            g = {
                d_rtbd: "json",
                d_dst: 1,
                d_cts: 1,
                d_cb: "btg.Demdex.response"
            };
        if (c && typeof c === "object") for (var h in c) if (c.hasOwnProperty(h)) g["d_" + h] = encodeURIComponent(decodeURIComponent(c[h]));
        if (f.read("vmn_host") == null) {
            b.host = location.hostname;
            f.set("vmn_host", 1)
        }
        if (b && typeof b === "object") for (h in b) if (b.hasOwnProperty(h)) {
            var u = h;
            if (h.match(/^(prop\d{1,2})$/ig)) u = h.replace("prop", "c");
            else if (h.match(/^(evar\d{1,2})$/ig)) u = h.replace("eVar", "v");
            else if (h.match(/^(hier\d{1,2})$/ig)) u = h.replace("hier", "h");
            else if (h.match(/^(channel)$/ig)) u = h.replace("channel", "ch");
            g["c_" + u] = encodeURIComponent(decodeURIComponent(b[h]))
        }
        btg.DOM.loadScript(e + btg.Object.toString(g, "&"))
    };
    this.sendSocialCall = function (b) {
        if (f.read("vmn_3pc") == "0") return;
        this.dependencies.add("demdex_response", function () {
            return (btg.Demdex ? btg.Demdex : {}).canSendRequest
        }, 500);
        this.dependencies.checkDependency("demdex_response");
        if (this.dependencies.hasDependency()) {
            this.dependencies.addToCallQueue(this, this.sendSocialCall, b);
            return
        }
        this.canSendRequest = false;
        var c = d + "/event?",
            e = {
                d_rtbd: "json",
                d_dst: 1,
                d_cts: 1,
                d_cb: "btg.Demdex.response",
                c_uuid: uuid
            };
        if (b && typeof b === "object") for (var g in b) if (b.hasOwnProperty(g) && b[g]) e["c_" + g] = encodeURIComponent(decodeURIComponent(b[g]));
        btg.DOM.loadScript(c + btg.Object.toString(e, "&"))
    };
    this.getFWSegment = function () {
        var b = this.data,
            c = btg.String,
            d = btg.Object,
            e;
        if (d.isDefined(b) && d.isDefined(b.stuff)) for (var b = b.stuff, f = 0, g = b.length; f < g; f++) if (d.isDefined(b[f]) && c.isDefined(b[f].cn) && b[f].cn == "fw" && c.isDefined(b[f].cv)) {
            e = b[f].cv;
            break
        }
        return e
    };
    this.response = function (b) {
        this.data = b;
        btg.Demdex.canSendRequest = true;
        if (!h) {
            btg.DOM.appendIframe("http://fast.mtvn.demdex.net/DSD-gz/mtvn-dest.html?targus=1&targusvalidttl=14400&bizo=1&bizovalidttl=14400&nexac=1&nexacvalidttl=14400");
            h = true
        }
        btg.MediaPlayer.setDemdexFWSegment(b)
    }
};
btg.UserSegment = new function () {
    var b = btg.Cookie;
    this.init = function (c) {
        var d = b.read("mtvn_btg_userSegments");
        c.userSegments = d ? d.split(",") : [];
        return true
    };
    this.set = function (c, d) {
        if (!d) d = btg.ReportingManager.getOmniture();
        for (var e = 0, f = d.userSegments.length; e < f; e++) if (d.userSegments[e] == c) return false;
        d.userSegments[d.userSegments.length] = c;
        b.set("mtvn_btg_userSegments", d.userSegments.join(","));
        return true
    };
    this.add = function (b, d) {
        this.set(d, b);
        return true
    };
    this.getSegments = function (b) {
        return b.userSegments
    };
    this.getStr = function (b, d, e) {
        if (!d) d = "";
        if (!e) e = "";
        return typeof b.userSegments == "object" && b.userSegments.length > 0 ? d + b.userSegments.join(e + "," + d) + e : ""
    };
    this.setData = function (b, d) {
        d[b.config.userSegmentVarMap.traffic] = d[b.config.userSegmentVarMap.traffic] ? d[b.config.userSegmentVarMap.traffic] + (this.getStr(b) != "" ? "," : "") + this.getStr(b) : this.getStr(b);
        d[b.config.userSegmentVarMap.commerce] = d[b.config.userSegmentVarMap.commerce] ? d[b.config.userSegmentVarMap.commerce] + (this.getStr(b, "User Segment;") != "" ? "," : "") + this.getStr(b, "User Segment;") : this.getStr(b, "User Segment;");
        return d
    }
};
var s_code = "",
    s_objectID;

function s_gi(b, c, d) {
    try {
        var e = 's.version=\'H.23.4\';s.an=s_an;s.logDebug=function(m){var s=this,tcf=new Function(\'var e;try{console.log("\'+s.rep(s.rep(m,"\\n","\\\\n"),"' + '\\"","\\\\\\"")+\'");}catch(e){}\');tcf()};s.cls=function(x,c){var i,y=\'\';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}return y};s.fl=function(x,l){retur' + "n x?(''+x).substring(0,l):x};s.co=function(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p" + "<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1))<0)return 0;return 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toU" + "pperCase():'';if(x){x=''+x;if(s.em==3)x=encodeURIComponent(x);else if(c=='AUTO'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.substring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h" + ".substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';else y+=escape(c)}x=y}else x=escape(''+x);x=s.rep(x,'+','%2B');if(c&&c!='AUTO'&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('" + "%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}return x};s.epa=function(x)" + "{var s=this;if(x){x=s.rep(''+x,'+',' ');return s.em==3?decodeURIComponent(x):unescape(x)}return x};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substri" + "ng(0,y);r=s[f](t,a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a.indexOf(':');if(c>=0)a=a.substring(0,c);c=a.indexOf('=');if(c>=0)a" + "=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var" + " s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.si=function(){var s=this,i,k,v,c=s_gi+'var s=s_gi(\"'+s.oun+'\");s.sa(\"'+s.un+'\");';for(i=0;i<s.va_g.length;i++){k=s.va_g[i];v=s[k];if(v!=unde" + "fined){if(typeof(v)!='number')c+='s.'+k+'=\"'+s_fe(v)+'\";';else c+='s.'+k+'='+v+';'}}c+=\"s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';\";return c};s.c_d='';" + "s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPeriods;if(d&&!s.c_d){n=n?pa" + "rseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function(k){var s=this;k=s.a" + "pe(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var s=this,d=s.c_gd" + "(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'){s.d.cookie" + "=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+e+'_'+s." + "_in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x.b=r?0:o[e];x.o[e]=f}if(" + "x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}catch(e){r=s[t](e)}return " + "r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfs" + "oe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=thi" + "s,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet" + "('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,r.t,r.u)}};s.flushBufferedRequests=fun" + "ction(){};s.mr=function(sess,q,rs,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackingServerBase,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Obje" + "ct,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase();else dc='d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p" + "=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/'+s.version+'/'+sess+'?AQB=1&ndh=1'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac)rs=s.fl(rs,2047)}if(s." + "d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s.rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window." + "s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im.s_l=0;im.onload" + "=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il['+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;if(s.debugTrackin" + "g){var d='AppMeasurement Debug: '+rs,dl=s.sp(rs,'&'),dln;for(dln=0;dln<dl.length;dln++)d+=\"\\n\\t\"+s.epa(dl[dln]);s.logDebug(d)}im.src=rs;if((!ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.na" + "me))&&rs.indexOf('&pe=')>=0){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg=function(v){va" + "r s=this;if(!s.wd['s_'+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s" + ".pt(v,',','glf',0)};s.rf=function(x){var s=this,y,i,j,h,p,l=0,q,a,b='',c='',t;if(x&&x.length>255){y=''+x;i=y.indexOf('?');if(i>0){q=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase();j=0;if(h.su" + "bstring(0,7)=='http://')j+=7;else if(h.substring(0,8)=='https://')j+=8;i=h.indexOf(\"/\",j);if(i>0){h=h.substring(j,i);p=y.substring(i);y=y.substring(0,i);if(h.indexOf('google')>=0)l=',q,ie,start,s" + "earch_key,word,kw,cd,';else if(h.indexOf('yahoo.co')>=0)l=',p,ei,';if(l&&q){a=s.sp(q,'&');if(a&&a.length>1){for(j=0;j<a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.substring(0,i)+'," + "')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c)q=b+'&'+c;else c=''}i=253-(q.length-c.length)-y.length;x=y+(i>0?p.substring(0,i):'')+'?'+q}}}}return x};s.s2q=function(k,v,vf,vfp,f){var s=this,qs" + "='',sk,sv,sp,ss,nke,nk,nf,nfl=0,nfn,nfm;if(k==\"contextData\")k=\"c\";if(v){for(sk in v) {if((!f||sk.substring(0,f.length)==f)&&v[sk]&&(!vf||vf.indexOf(','+(vfp?vfp+'.':'')+sk+',')>=0)){nfm=0;if(nf" + "l)for(nfn=0;nfn<nfl.length;nfn++)if(sk.substring(0,nfl[nfn].length)==nfl[nfn])nfm=1;if(!nfm){if(qs=='')qs+='&'+k+'.';sv=v[sk];if(f)sk=sk.substring(f.length);if(sk.length>0){nke=sk.indexOf('.');if(n" + "ke>0){nk=sk.substring(0,nke);nf=(f?f:'')+nk+'.';if(!nfl)nfl=new Array;nfl[nfl.length]=nf;qs+=s.s2q(nk,v,vf,vfp,nf)}else{if(typeof(sv)=='boolean'){if(sv)sv='true';else sv='false'}if(sv){if(vfp=='ret" + "rieveLightData'&&f.indexOf('.contextData.')<0){sp=sk.substring(0,4);ss=sk.substring(4);if(sk=='transactionID')sk='xact';else if(sk=='channel')sk='ch';else if(sk=='campaign')sk='v0';else if(s.num(ss" + ")){if(sp=='prop')sk='c'+ss;else if(sp=='eVar')sk='v'+ss;else if(sp=='list')sk='l'+ss;else if(sp=='hier'){sk='h'+ss;sv=sv.substring(0,255)}}}qs+='&'+s.ape(sk)+'='+s.ape(sv)}}}}}}if(qs!='')qs+='&.'+k" + "}return qs};s.hav=function(){var s=this,qs='',l,fv='',fe='',mn,i,e;if(s.lightProfileID){l=s.va_m;fv=s.lightTrackVars;if(fv)fv=','+fv+','+s.vl_mr+','}else{l=s.va_t;if(s.pe||s.linkType){fv=s.linkTrac" + "kVars;fe=s.linkTrackEvents;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}}if(fv)fv=','+fv+','+s.vl_l+','+s.vl_l2;if(fe){fe=','+f" + "e+',';if(fv)fv+=',events,'}if (s.events2)e=(e?',':'')+s.events2}for(i=0;i<l.length;i++){var k=l[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(!v)if(k=='events'&&e){v=e;e=''}if(" + "v&&(!fv||fv.indexOf(k)>=0)&&k!='linkName'&&k!='linkType'){if(k=='timestamp')q='ts';else if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL'){q='g';v=s.fl(v,255)}" + "else if(k=='referrer'){q='r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q='vmf';if(s.ssl&&s.visitorMigrationServerSecure)v=''}else i" + "f(k=='visitorMigrationServerSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUTO')v='ISO8859-1';else if(s.em==2||s.em==3)v='UTF-8'}else i" + "f(k=='visitorNamespace')q='ns';else if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q='vvp';else if(k=='currencyCode')q='cc';else if(k=='channel" + "')q='ch';else if(k=='transactionID')q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else if(k=='javascriptVersion')q='j';else if(k=='javaEnabled')q" + "='v';else if(k=='cookiesEnabled')q='k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct';else if(k=='homepage')q='hp';else if(k=='plugins')q='p';" + "else if(k=='events'){if(e)v+=(v?',':'')+e;if(fe)v=s.fs(v,fe)}else if(k=='events2')v='';else if(k=='contextData'){qs+=s.s2q('c',s[k],fv,k,0);v=''}else if(k=='lightProfileID')q='mtp';else if(k=='ligh" + "tStoreForSeconds'){q='mtss';if(!s.lightProfileID)v=''}else if(k=='lightIncrementBy'){q='mti';if(!s.lightProfileID)v=''}else if(k=='retrieveLightProfiles')q='mtsr';else if(k=='deleteLightProfiles')q" + "='mtsd';else if(k=='retrieveLightData'){if(s.retrieveLightProfiles)qs+=s.s2q('mts',s[k],fv,k,0);v=''}else if(s.num(x)){if(b=='prop')q='c'+n;else if(b=='eVar')q='v'+n;else if(b=='list')q='l'+n;else " + "if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+s.ape(q)+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}return qs};s.ltdf=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';var qi=h.indexOf('" + "?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;" + "return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.location.hostname;h=h.toLowerCase();if(s.trackDownloadLinks&&l" + "ft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';return ''};s.lc=new Func" + "tion('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Function('e','var s=s_c_il['+s._in+'],f,tcf;if(s.d&&s.d.all&&" + 's.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Function("s","var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement||s.eo.parentNode))s.t()}catch(e){}");tcf(s);s.eo=0\');' + "s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i>j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o." + "protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l.pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=" + "function(o){var t=o.tagName;if(o.tagUrn||(o.scopeName&&o.scopeName.toUpperCase()!='HTML'))return '';t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if((t=='INPUT'||t=='BUTTON')&&o.ty" + "pe&&o.type.toUpperCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=" + "='AREA')&&(!c||!p||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(t=='INPUT'||t=='SUBMIT'){if(o" + ".value)n=o.value;else if(o.innerText)n=o.innerText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o.s_oid};s.rqf=function(t" + ",un){var s=this,e=t.indexOf('='),u=e>=0?t.substring(0,e):'',q=e>=0?s.epa(t.substring(e+1)):'';if(u&&q&&(','+u+',').indexOf(','+un+',')>=0){if(u!=s.un&&s.un.indexOf(',')>=0)q='&u='+u+q+'&u=0';return" + " q}return ''};s.rq=function(un){if(!un)un=this.un;var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t" + ".indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='" + "s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))s.sqq[s." + "squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wd" + 'l=new Function(\'e\',\'var s=s_c_il[\'+s._in+\'],r=true,b=s.eh(s.wd,"onload"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.links.length;i++){o=s.d.links[i];oc=o.onclick?""+o.onclick:"";if((oc.indexOf("' + 's_gs(")<0||oc.indexOf(".s_oc(")>=0)&&oc.indexOf(".tl(")<0)s.eh(o,"onclick",0,s.lc);}return r\');s.wds=function(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)' + "s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.eh(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.vis" + "itorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};" + "s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dy" + "asmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if" + "(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s=this;s.un=un;if(!s.oun" + ")s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n.substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m" + "_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s.wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_i','_e','_d','_dl','s'," + "'n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m){r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l[i]]=m[l[i]];r._il[r._i" + "n]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new Function('n','g','e','if(!g)g=\"m_\"+n;var s=s_c_il['+s._in+'],c=s[g+\"_c\"],m,x,f=0;if(!c)c=s.wd[\"s_\"+g+\"_c\"];if(c&&s_d)s[g]=" + 'new Function("s",s_ft(s_d(c)));x=s[g];if(!x)x=s.wd[\\\'s_\\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!="m_"+n)){m._i=f=1;if((""+x).indexOf("function")>=0)x(s);else s.m_m("x",n,x,e)}' + "m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i];if(!n||x==n){m=s.m_i(x" + ");u=m[t];if(u){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u=m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t+1](d,e);else i" + "f(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o.e,1);g[i]=0}};s.loadMod" + "ule=function(n,u,d,l,e,ln){var s=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.substring(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))" + "&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o" + ".l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c++;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f" + "2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement(\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o.defer=true;o.onload=o.o" + "nreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catch(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;" + "o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}return m};s.voa=function(vo,r){var s=this,l=s.va_g,i,k,v,x;for(i=0;i<l.length;i++){" + 'k=l[i];v=vo[k];if(v||vo[\'!\'+k]){if(!r&&(k=="contextData"||k=="retrieveLightData")&&s[k])for(x in s[k])if(!v[x])v[x]=s[k][x];s[k]=v}}};s.vob=function(vo){var s=this,l=s.va_g,i,k;for(i=0;i<l.leng' + "th;i++){k=l[i];vo[k]=s[k];if(!vo[k])vo['!'+k]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.dll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!s.m_m(\"d\")||d.getTime" + "()-vo._t>=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){var s=this,d=new Date;if(" + "!vo)vo=new Object;s.vob(vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.maxDelay)s.maxDelay=250;s.dlt()};s.track=s.t=function(vo){var s=this,trk=1,tm=new Date,sed=Math&" + "&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1900?y+1900:y)+' '+tm.ge" + "tHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),ta=-1,q='',qs='',code='',vb=new Object;s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tf" + "s.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j='1.1';if(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s" + ".isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Object;tcf=new Function('o','var e,i=0;try{i=new Iterator(o)}catch(e){}return i');i=tcf(o);if" + "(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerH" + "eight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight;if(!s.ismac&" + "&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?\"Y\":\"N\"}catch(e){}return hp');hp=tcf(s,tl);tcf=new Function('s','var e,ct=0;try{s.b." + "addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;p" + "n++}s.resolution=x;s.colorDepth=c;s.javascriptVersion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;s.td=1}if(vo){s.vob(vb)" + ";s.voa(vo)}if((vo&&vo._t)||!s.m_m('d')){if(s.usePlugins)s.doPlugins(s);var l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s._1_referrer){s.referrer" + "=r;s._1_referrer=1}s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk;if(!o)return '';var p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.paren" + "tElement?o.parentElement:o.parentNode;if(!o)return '';t=s.ot(o);n=s.oid(o);x=o.s_oidt}oc=o.onclick?''+o.onclick:'';if((oc.indexOf(\"s_gs(\")>=0&&oc.indexOf(\".s_oc(\")<0)||oc.indexOf(\".tl(\")>=0)r" + "eturn ''}if(n)ta=o.target;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l))q+='&pe=lnk_'+(t=='d'||" + "t=='e'?s.ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');else trk=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1" + ";i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}if(!trk&&!qs)return '';s.sampled=s.vs(sed);if(trk){if(s" + ".sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq()),0,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=s.lightProfileID=s.retrieveLightProfiles=s.deleteLightProfiles=''}s.sq(qs" + ");}else{s.dl(vo);}if(vo)s.voa(vb,1);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';return code};" + "s.trackLink=s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName=n;s.t(vo)};s.trackLight=function(p,ss,i,vo){var s=this;s.lightProfileID=p;s.lightStoreForSeconds=ss;s.lightIncre" + "mentBy=i;s.t(vo)};s.jsLoaded=function(){var s=this,x;if(s.lmq)for(i=0;i<s.lmq.length;i++){x=s.lmq[i];s.loadModule(x.n,x.u,x.d)}if(s.onLoad)s.onLoad(s);if(s.tq)for(i=0;i<s.tq.length;i++)s.t(s.tq[i])" + "};s.wd=window;s.ssl=(s.wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=document;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navi" + "gator;s.u=s.n.userAgent;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='" + "Microsoft Internet Explorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substrin" + "g(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));else s.apv=parseFloat(v);s.em=0;if(s.em.toPrecision)s.em=3;else if(String.fromCharCode){i=escape(St" + "ring.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i=='%U0100'?1:0))}if(s.oun)s.sa(s.oun);s.sa(un);s.vl_l='dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,vis" + "itorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,pageName,pageURL,referrer,currencyCode';s.va_l=s.sp(s.vl_l,',');s.vl_mr=s.vl_m='charSet,visitorNamespace,co" + "okieDomainPeriods,cookieLifetime,contextData,lightProfileID,lightStoreForSeconds,lightIncrementBy';s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,z" + "ip,events,events2,products,linkName,linkType,contextData,lightProfileID,lightStoreForSeconds,lightIncrementBy,retrieveLightProfiles,deleteLightProfiles,retrieveLightData';var n;for(n=1;n<=75;n++){s" + ".vl_t+=',prop'+n+',eVar'+n;s.vl_m+=',prop'+n+',eVar'+n}for(n=1;n<=5;n++)s.vl_t+=',hier'+n;for(n=1;n<=3;n++)s.vl_t+=',list'+n;s.va_m=s.sp(s.vl_m,',');s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,color" + "Depth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidth,browserHeight,connectionType,homepage,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerS" + "ecure,trackingServerBase,fpCookieDomainPeriods,disableBufferedRequests,mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks," + "trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkDownloadFileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,lightTrackVars,_1_referrer,un';" + "s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);s.contextData=new Object;s.retrieveLightData=new Object;if(!ss)s.wds();if(pg){s.wd.s_co=function(o){s_gi(\"_\",1,1).co(o)};s.wd.s_gs=function(un){s_gi(u" + "n,1,1).t()};s.wd.s_dc=function(un){s_gi(un,1).t()}}",
            f = window,
            g = f.s_c_il,
            h = navigator,
            j = h.userAgent,
            n = h.appVersion,
            l = n.indexOf("MSIE "),
            o = j.indexOf("Netscape6/"),
            p, u, k, q;
        if (b) {
            b = b.toLowerCase();
            if (g) for (u = 0; u < g.length; u++) {
                q = g[u];
                k = q._c;
                if ((!k || k == "s_c" || k == "s_l") && (q.oun == b || q.fs && q.sa && q.fs(q.oun, b))) {
                    if (q.sa) q.sa(b);
                    if (k == "s_c") return q
                } else q = 0
            }
        }
        f.s_an = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        f.s_sp = new Function("x", "d", "var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.subst" + "ring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a");
        f.s_jn = new Function("a", "d", "var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x");
        f.s_rep = new Function("x", "o", "n", "return s_jn(s_sp(x,o),n)");
        f.s_d = new Function("x", "var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d" + "=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn(" + "x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x");
        f.s_fe = new Function("c", "return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");
        f.s_fa = new Function("f", "var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':" + "a");
        f.s_ft = new Function("c", "c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){i" + "f(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")" + "'+c.substring(e+1);s=c.indexOf('=function(')}return c;");
        e = s_d(e);
        if (l > 0) {
            p = parseInt(u = n.substring(l + 5));
            if (p > 3) p = parseFloat(u)
        } else if (o > 0) p = parseFloat(j.substring(o + 10));
        else p = parseFloat(n);
        if (p < 5 || n.indexOf("Opera") >= 0 || j.indexOf("Opera") >= 0) e = s_ft(e);
        if (!q) {
            q = new Object;
            if (!f.s_c_in) {
                f.s_c_il = new Array;
                f.s_c_in = 0
            }
            q._il = f.s_c_il;
            q._in = f.s_c_in;
            q._il[q._in] = q;
            f.s_c_in++
        }
        q._c = "s_c";
        (new Function("s", "un", "pg", "ss", e))(q, b, c, d);
        return q
    } catch (w) { }
}
var mboxCopyright = "Copyright 1996-2009. Adobe Systems Incorporated. All rights reserved";
mboxUrlBuilder = function (b, c) {
    this.a = b;
    this.b = c;
    this.c = new Array;
    this.d = function (b) {
        return b
    };
    this.f = null
};
mboxUrlBuilder.prototype.addParameter = function (b, c) {
    if ((new RegExp("('|\")")).exec(b)) throw "Parameter '" + b + "' contains invalid characters";
    for (var d = 0; d < this.c.length; d++) {
        var e = this.c[d];
        if (e.name == b) {
            e.value = c;
            return this
        }
    }
    d = new Object;
    d.name = b;
    d.value = c;
    this.c[this.c.length] = d;
    return this
};
mboxUrlBuilder.prototype.addParameters = function (b) {
    if (!b) return this;
    for (var c = 0; c < b.length; c++) {
        var d = b[c].indexOf("=");
        if (d == -1 || d == 0) continue;
        this.addParameter(b[c].substring(0, d), b[c].substring(d + 1, b[c].length))
    }
    return this
};
mboxUrlBuilder.prototype.setServerType = function (b) {
    this.o = b
};
mboxUrlBuilder.prototype.setBasePath = function (b) {
    this.f = b
};
mboxUrlBuilder.prototype.setUrlProcessAction = function (b) {
    this.d = b
};
mboxUrlBuilder.prototype.buildUrl = function () {
    for (var b = (document.location.protocol == "file:" ? "http:" : document.location.protocol) + "//" + this.a + (this.f ? this.f : "/m2/" + this.b + "/mbox/" + this.o), c = b.indexOf("?") != -1 ? "&" : "?", d = 0; d < this.c.length; d++) {
        var e = this.c[d];
        b += c + encodeURIComponent(e.name) + "=" + encodeURIComponent(e.value);
        c = "&"
    }
    return this.t(this.d(b))
};
mboxUrlBuilder.prototype.getParameters = function () {
    return this.c
};
mboxUrlBuilder.prototype.setParameters = function (b) {
    this.c = b
};
mboxUrlBuilder.prototype.clone = function () {
    var b = new mboxUrlBuilder(this.a, this.b);
    b.setServerType(this.o);
    b.setBasePath(this.f);
    b.setUrlProcessAction(this.d);
    for (var c = 0; c < this.c.length; c++) b.addParameter(this.c[c].name, this.c[c].value);
    return b
};
mboxUrlBuilder.prototype.t = function (b) {
    return b.replace(/\"/g, "&quot;").replace(/>/g, "&gt;")
};
mboxStandardFetcher = function () { };
mboxStandardFetcher.prototype.getType = function () {
    return "standard"
};
mboxStandardFetcher.prototype.fetch = function (b) {
    b.setServerType(this.getType());
    document.write("<" + "scr" + 'ipt src="' + b.buildUrl() + '" language="JavaScript"><' + "/scr" + "ipt>")
};
mboxStandardFetcher.prototype.cancel = function () { };
mboxAjaxFetcher = function () { };
mboxAjaxFetcher.prototype.getType = function () {
    return "ajax"
};
mboxAjaxFetcher.prototype.fetch = function (b) {
    b.setServerType(this.getType());
    b = b.buildUrl();
    this.x = document.createElement("script");
    this.x.src = b;
    document.body.appendChild(this.x)
};
mboxAjaxFetcher.prototype.cancel = function () { };
mboxMap = function () {
    this.y = new Object;
    this.z = new Array
};
mboxMap.prototype.put = function (b, c) {
    if (!this.y[b]) this.z[this.z.length] = b;
    this.y[b] = c
};
mboxMap.prototype.get = function (b) {
    return this.y[b]
};
mboxMap.prototype.remove = function (b) {
    this.y[b] = undefined
};
mboxMap.prototype.each = function (b) {
    for (var c = 0; c < this.z.length; c++) {
        var d = this.z[c],
            e = this.y[d];
        if (e) if (b(d, e) === false) break
    }
};
mboxFactory = function (b, c, d) {
    this.E = false;
    this.C = b;
    this.D = d;
    this.F = new mboxList;
    mboxFactories.put(d, this);
    this.H = (this.G = typeof document.createElement("div").replaceChild != "undefined" && true && typeof document.getElementById != "undefined" && typeof (window.attachEvent || document.addEventListener || window.addEventListener) != "undefined" && typeof encodeURIComponent != "undefined") && mboxGetPageParameter("mboxDisable") == null;
    var e = d == "default";
    this.J = new mboxCookieManager("mbox" + (e ? "" : "-" + d), mboxCookiePageDomain());
    this.H = this.H && this.J.isEnabled() && this.J.getCookie("disable") == null;
    if (this.isAdmin()) this.enable();
    this.K = mboxGenerateId();
    this.L = mboxScreenHeight();
    this.M = mboxScreenWidth();
    this.N = mboxBrowserWidth();
    this.O = mboxBrowserHeight();
    this.P = mboxScreenColorDepth();
    this.Q = mboxBrowserTimeOffset();
    this.R = new mboxSession(this.K, "mboxSession", "session", 31 * 60, this.J);
    this.S = new mboxPC("PC", 1209600, this.J);
    this.w = new mboxUrlBuilder(b, c);
    this.T(this.w, e);
    this.V = this.U = (new Date).getTime();
    var f = this;
    this.addOnLoad(function () {
        f.V = (new Date).getTime()
    });
    if (this.G) {
        this.addOnLoad(function () {
            f.E = true;
            f.getMboxes().each(function (b) {
                b.setFetcher(new mboxAjaxFetcher);
                b.finalize()
            })
        });
        this.limitTraffic(100, 10368E3);
        if (this.H) {
            this.Y();
            this.Z = new mboxSignaler(function (b, c) {
                return f.create(b, c)
            }, this.J)
        }
    }
};
mboxFactory.prototype.isEnabled = function () {
    return this.H
};
mboxFactory.prototype.getDisableReason = function () {
    return this.J.getCookie("disable")
};
mboxFactory.prototype.isSupported = function () {
    return this.G
};
mboxFactory.prototype.disable = function (b, c) {
    if (typeof b == "undefined") b = 60 * 60;
    if (typeof c == "undefined") c = "unspecified";
    if (!this.isAdmin()) {
        this.H = false;
        this.J.setCookie("disable", c, b)
    }
};
mboxFactory.prototype.enable = function () {
    this.H = true;
    this.J.deleteCookie("disable")
};
mboxFactory.prototype.isAdmin = function () {
    return document.location.href.indexOf("mboxEnv") != -1
};
mboxFactory.prototype.limitTraffic = function () { };
mboxFactory.prototype.addOnLoad = function (b) {
    if (window.addEventListener) window.addEventListener("load", b, false);
    else if (document.addEventListener) document.addEventListener("load", b, false);
    else if (document.attachEvent) window.attachEvent("onload", b)
};
mboxFactory.prototype.getEllapsedTime = function () {
    return this.V - this.U
};
mboxFactory.prototype.getEllapsedTimeUntil = function (b) {
    return b - this.U
};
mboxFactory.prototype.getMboxes = function () {
    return this.F
};
mboxFactory.prototype.get = function (b, c) {
    return this.F.get(b).getById(c || 0)
};
mboxFactory.prototype.update = function (b, c) {
    if (!this.isEnabled()) return;
    if (this.F.get(b).length() == 0) throw "Mbox " + b + " is not defined";
    this.F.get(b).each(function (b) {
        b.getUrlBuilder().addParameter("mboxPage", mboxGenerateId());
        b.load(c)
    })
};
mboxFactory.prototype.create = function (b, c, d) {
    if (!this.isSupported()) return null;
    var e = this.w.clone();
    e.addParameter("mboxCount", this.F.length() + 1);
    e.addParameters(c);
    var c = this.F.get(b).length(),
        f = this.D + "-" + b + "-" + c;
    if (d) d = new mboxLocatorNode(d);
    else {
        if (this.E) throw "The page has already been loaded, can't write marker";
        d = new mboxLocatorDefault(f)
    }
    try {
        var g = this,
            h = new mbox(b, c, e, d, "mboxImported-" + f);
        if (this.H) h.setFetcher(this.E ? new mboxAjaxFetcher : new mboxStandardFetcher);
        h.setOnError(function (b) {
            h.setMessage(b);
            h.activate();
            if (!h.isActivated()) {
                g.disable(60 * 60, b);
                window.location.reload(false)
            }
        });
        this.F.add(h)
    } catch (j) {
        this.disable();
        throw 'Failed creating mbox "' + b + '", the error was: ' + j;
    }
    b = new Date;
    e.addParameter("mboxTime", b.getTime() - b.getTimezoneOffset() * 6E4);
    return h
};
mboxFactory.prototype.getCookieManager = function () {
    return this.J
};
mboxFactory.prototype.getPageId = function () {
    return this.K
};
mboxFactory.prototype.getPCId = function () {
    return this.S
};
mboxFactory.prototype.getSessionId = function () {
    return this.R
};
mboxFactory.prototype.getSignaler = function () {
    return this.Z
};
mboxFactory.prototype.getUrlBuilder = function () {
    return this.w
};
mboxFactory.prototype.T = function (b, c) {
    b.addParameter("mboxHost", document.location.hostname).addParameter("mboxSession", this.R.getId());
    if (!c) b.addParameter("mboxFactoryId", this.D);
    if (this.S.getId() != null) b.addParameter("mboxPC", this.S.getId());
    b.addParameter("mboxPage", this.K);
    b.addParameter("screenHeight", this.L);
    b.addParameter("screenWidth", this.M);
    b.addParameter("browserWidth", this.N);
    b.addParameter("browserHeight", this.O);
    b.addParameter("browserTimeOffset", this.Q);
    b.addParameter("colorDepth", this.P);
    b.setUrlProcessAction(function (b) {
        b += "&mboxURL=" + encodeURIComponent(document.location);
        var c = encodeURIComponent(document.referrer);
        if (b.length + c.length < 2E3) b += "&mboxReferrer=" + c;
        b += "&mboxVersion=" + mboxVersion;
        return b
    })
};
mboxFactory.prototype.nb = function () {
    return ""
};
mboxFactory.prototype.Y = function () {
    document.write("<style>." + "mboxDefault" + " { visibility:hidden; }</style>")
};
mboxFactory.prototype.isDomLoaded = function () {
    return this.E
};
mboxSignaler = function (b, c) {
    this.J = c;
    for (var d = c.getCookieNames("signal-"), e = 0; e < d.length; e++) {
        var f = d[e],
            g = c.getCookie(f).split("&");
        b(g[0], g).load();
        c.deleteCookie(f)
    }
};
mboxSignaler.prototype.signal = function (b) {
    this.J.setCookie("signal-" + b, mboxShiftArray(arguments).join("&"), 45 * 60)
};
mboxList = function () {
    this.F = new Array
};
mboxList.prototype.add = function (b) {
    if (b != null) this.F[this.F.length] = b
};
mboxList.prototype.get = function (b) {
    for (var c = new mboxList, d = 0; d < this.F.length; d++) {
        var e = this.F[d];
        if (e.getName() == b) c.add(e)
    }
    return c
};
mboxList.prototype.getById = function (b) {
    return this.F[b]
};
mboxList.prototype.length = function () {
    return this.F.length
};
mboxList.prototype.each = function (b) {
    if (typeof b != "function") throw "Action must be a function, was: " + typeof b;
    for (var c = 0; c < this.F.length; c++) b(this.F[c])
};
mboxLocatorDefault = function (b) {
    this.g = "mboxMarker-" + b;
    document.write('<div id="' + this.g + '" style="visibility:hidden;display:none">&nbsp;</div>')
};
mboxLocatorDefault.prototype.locate = function () {
    for (var b = document.getElementById(this.g); b != null; ) {
        if (b.nodeType == 1) if (b.className == "mboxDefault") return b;
        b = b.previousSibling
    }
    return null
};
mboxLocatorDefault.prototype.force = function () {
    var b = document.createElement("div");
    b.className = "mboxDefault";
    var c = document.getElementById(this.g);
    c.parentNode.insertBefore(b, c);
    return b
};
mboxLocatorNode = function (b) {
    this.ub = b
};
mboxLocatorNode.prototype.locate = function () {
    return typeof this.ub == "string" ? document.getElementById(this.ub) : this.ub
};
mboxLocatorNode.prototype.force = function () {
    return null
};
mboxCreate = function (b) {
    var c = mboxFactoryDefault.create(b, mboxShiftArray(arguments));
    if (c) c.load();
    return c
};
mboxDefine = function (b, c) {
    return mboxFactoryDefault.create(c, mboxShiftArray(mboxShiftArray(arguments)), b)
};
mboxUpdate = function (b) {
    mboxFactoryDefault.update(b, mboxShiftArray(arguments))
};
mbox = function (b, c, d, e, f) {
    this.Ab = null;
    this.Bb = 0;
    this.hb = e;
    this.ib = f;
    this.Cb = null;
    this.Db = new mboxOfferContent;
    this.vb = null;
    this.w = d;
    this.message = "";
    this.Eb = new Object;
    this.Fb = 0;
    this.yb = c;
    this.g = b;
    this.Gb();
    d.addParameter("mbox", b).addParameter("mboxId", c);
    this.Hb = function () { };
    this.Ib = function () { };
    this.Jb = null
};
mbox.prototype.getId = function () {
    return this.yb
};
mbox.prototype.Gb = function () {
    if (this.g.length > 250) throw "Mbox Name " + this.g + " exceeds max length of " + "250 characters.";
    else if (this.g.match(/^\s+|\s+$/g)) throw "Mbox Name " + this.g + " has leading/trailing whitespace(s).";
};
mbox.prototype.getName = function () {
    return this.g
};
mbox.prototype.getParameters = function () {
    for (var b = this.w.getParameters(), c = new Array, d = 0; d < b.length; d++) if (b[d].name.indexOf("mbox") != 0) c[c.length] = b[d].name + "=" + b[d].value;
    return c
};
mbox.prototype.setOnLoad = function (b) {
    this.Ib = b;
    return this
};
mbox.prototype.setMessage = function (b) {
    this.message = b;
    return this
};
mbox.prototype.setOnError = function (b) {
    this.Hb = b;
    return this
};
mbox.prototype.setFetcher = function (b) {
    if (this.Cb) this.Cb.cancel();
    this.Cb = b;
    return this
};
mbox.prototype.getFetcher = function () {
    return this.Cb
};
mbox.prototype.load = function (b) {
    if (this.Cb == null) return this;
    this.setEventTime("load.start");
    this.cancelTimeout();
    this.Bb = 0;
    this.Cb.fetch(b && b.length > 0 ? this.w.clone().addParameters(b) : this.w);
    var c = this;
    this.Lb = setTimeout(function () {
        c.Hb("browser timeout", c.Cb.getType())
    }, 15E3);
    this.setEventTime("load.end");
    return this
};
mbox.prototype.loaded = function () {
    this.cancelTimeout();
    if (!this.activate()) {
        var b = this;
        setTimeout(function () {
            b.loaded()
        }, 100)
    }
};
mbox.prototype.activate = function () {
    if (this.Bb) return this.Bb;
    this.setEventTime("activate" + ++this.Fb + ".start");
    if (this.show()) {
        this.cancelTimeout();
        this.Bb = 1
    }
    this.setEventTime("activate" + this.Fb + ".end");
    return this.Bb
};
mbox.prototype.isActivated = function () {
    return this.Bb
};
mbox.prototype.setOffer = function (b) {
    if (b && b.show && b.setOnLoad) this.Db = b;
    else throw "Invalid offer";
    return this
};
mbox.prototype.getOffer = function () {
    return this.Db
};
mbox.prototype.show = function () {
    this.setEventTime("show.start");
    var b = this.Db.show(this);
    this.setEventTime(b == 1 ? "show.end.ok" : "show.end");
    return b
};
mbox.prototype.showContent = function (b) {
    if (b == null) return 0;
    if (this.vb == null || !this.vb.parentNode) {
        this.vb = this.getDefaultDiv();
        if (this.vb == null) return 0
    }
    if (this.vb != b) {
        this.Nb(this.vb);
        this.vb.parentNode.replaceChild(b, this.vb);
        this.vb = b
    }
    this.Ob(b);
    this.Ib();
    return 1
};
mbox.prototype.hide = function () {
    this.setEventTime("hide.start");
    var b = this.showContent(this.getDefaultDiv());
    this.setEventTime(b == 1 ? "hide.end.ok" : "hide.end.fail");
    return b
};
mbox.prototype.finalize = function () {
    this.setEventTime("finalize.start");
    this.cancelTimeout();
    if (this.getDefaultDiv() == null) if (this.hb.force() != null) this.setMessage("No default content, an empty one has been added");
    else this.setMessage("Unable to locate mbox");
    if (!this.activate()) {
        this.hide();
        this.setEventTime("finalize.end.hide")
    }
    this.setEventTime("finalize.end.ok")
};
mbox.prototype.cancelTimeout = function () {
    if (this.Lb) clearTimeout(this.Lb);
    if (this.Cb != null) this.Cb.cancel()
};
mbox.prototype.getDiv = function () {
    return this.vb
};
mbox.prototype.getDefaultDiv = function () {
    if (this.Jb == null) this.Jb = this.hb.locate();
    return this.Jb
};
mbox.prototype.setEventTime = function (b) {
    this.Eb[b] = (new Date).getTime()
};
mbox.prototype.getEventTimes = function () {
    return this.Eb
};
mbox.prototype.getImportName = function () {
    return this.ib
};
mbox.prototype.getURL = function () {
    return this.w.buildUrl()
};
mbox.prototype.getUrlBuilder = function () {
    return this.w
};
mbox.prototype.Qb = function (b) {
    return b.style.display != "none"
};
mbox.prototype.Ob = function (b) {
    this.Rb(b, true)
};
mbox.prototype.Nb = function (b) {
    this.Rb(b, false)
};
mbox.prototype.Rb = function (b, c) {
    b.style.visibility = c ? "visible" : "hidden";
    b.style.display = c ? "block" : "none"
};
mboxOfferContent = function () {
    this.Ib = function () { }
};
mboxOfferContent.prototype.show = function (b) {
    b = b.showContent(document.getElementById(b.getImportName()));
    if (b == 1) this.Ib();
    return b
};
mboxOfferContent.prototype.setOnLoad = function (b) {
    this.Ib = b
};
mboxOfferAjax = function (b) {
    this.Mb = b;
    this.Ib = function () { }
};
mboxOfferAjax.prototype.setOnLoad = function (b) {
    this.Ib = b
};
mboxOfferAjax.prototype.show = function (b) {
    var c = document.createElement("div");
    c.id = b.getImportName();
    c.innerHTML = this.Mb;
    b = b.showContent(c);
    if (b == 1) this.Ib();
    return b
};
mboxOfferDefault = function () {
    this.Ib = function () { }
};
mboxOfferDefault.prototype.setOnLoad = function (b) {
    this.Ib = b
};
mboxOfferDefault.prototype.show = function (b) {
    b = b.hide();
    if (b == 1) this.Ib();
    return b
};
mboxCookieManager = function (b, c) {
    this.g = b;
    this.Ub = c == "" || c.indexOf(".") == -1 ? "" : "; domain=" + c;
    this.Vb = new mboxMap;
    this.loadCookies()
};
mboxCookieManager.prototype.isEnabled = function () {
    this.setCookie("check", "true", 60);
    this.loadCookies();
    return this.getCookie("check") == "true"
};
mboxCookieManager.prototype.setCookie = function (b, c, d) {
    if (typeof b != "undefined" && typeof c != "undefined" && typeof d != "undefined") {
        var e = new Object;
        e.name = b;
        e.value = escape(c);
        e.expireOn = Math.ceil(d + (new Date).getTime() / 1E3);
        this.Vb.put(b, e);
        this.saveCookies()
    }
};
mboxCookieManager.prototype.getCookie = function (b) {
    return (b = this.Vb.get(b)) ? unescape(b.value) : null
};
mboxCookieManager.prototype.deleteCookie = function (b) {
    this.Vb.remove(b);
    this.saveCookies()
};
mboxCookieManager.prototype.getCookieNames = function (b) {
    var c = new Array;
    this.Vb.each(function (d) {
        if (d.indexOf(b) == 0) c[c.length] = d
    });
    return c
};
mboxCookieManager.prototype.saveCookies = function () {
    var b = new Array,
        c = 0;
    this.Vb.each(function (d, f) {
        b[b.length] = d + "#" + f.value + "#" + f.expireOn;
        if (c < f.expireOn) c = f.expireOn
    });
    var d = new Date(c * 1E3);
    document.cookie = this.g + "=" + b.join("|") + "; expires=" + d.toGMTString() + "; path=/" + this.Ub
};
mboxCookieManager.prototype.loadCookies = function () {
    this.Vb = new mboxMap;
    var b = document.cookie.indexOf(this.g + "=");
    if (b != -1) {
        var c = document.cookie.indexOf(";", b);
        if (c == -1) {
            c = document.cookie.indexOf(",", b);
            if (c == -1) c = document.cookie.length
        }
        for (var b = document.cookie.substring(b + this.g.length + 1, c).split("|"), c = Math.ceil((new Date).getTime() / 1E3), d = 0; d < b.length; d++) {
            var e = b[d].split("#");
            if (c <= e[2]) {
                var f = new Object;
                f.name = e[0];
                f.value = e[1];
                f.expireOn = e[2];
                this.Vb.put(f.name, f)
            }
        }
    }
};
mboxSession = function (b, c, d, e, f) {
    this.hc = c;
    this.qb = d;
    this.ic = e;
    this.J = f;
    this.jc = false;
    this.yb = typeof mboxForceSessionId != "undefined" ? mboxForceSessionId : mboxGetPageParameter(this.hc);
    if (this.yb == null || this.yb.length == 0) {
        this.yb = f.getCookie(d);
        if (this.yb == null || this.yb.length == 0) {
            this.yb = b;
            this.jc = true
        }
    }
    f.setCookie(d, this.yb, e)
};
mboxSession.prototype.getId = function () {
    return this.yb
};
mboxSession.prototype.forceId = function (b) {
    this.yb = b;
    this.J.setCookie(this.qb, this.yb, this.ic)
};
mboxPC = function (b, c, d) {
    this.qb = b;
    this.ic = c;
    this.J = d;
    this.yb = typeof mboxForcePCId != "undefined" ? mboxForcePCId : d.getCookie(b);
    if (this.yb != null) d.setCookie(b, this.yb, c)
};
mboxPC.prototype.getId = function () {
    return this.yb
};
mboxPC.prototype.forceId = function (b) {
    if (this.yb != b) {
        this.yb = b;
        this.J.setCookie(this.qb, this.yb, this.ic);
        return true
    }
    return false
};
mboxGetPageParameter = function (b) {
    var c = null,
        b = (new RegExp(b + "=([^&]*)")).exec(document.location);
    if (b != null && b.length >= 2) c = b[1];
    return c
};
mboxSetCookie = function (b, c, d) {
    return mboxFactoryDefault.getCookieManager().setCookie(b, c, d)
};
mboxGetCookie = function (b) {
    return mboxFactoryDefault.getCookieManager().getCookie(b)
};
mboxCookiePageDomain = function () {
    var b = /([^:]*)(:[0-9]{0,5})?/.exec(document.location.host)[1];
    if (!/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/.exec(b)) {
        var c = /([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/.exec(b);
        if (c) b = c[0]
    }
    return b ? b : ""
};
mboxShiftArray = function (b) {
    for (var c = new Array, d = 1; d < b.length; d++) c[c.length] = b[d];
    return c
};
mboxGenerateId = function () {
    return (new Date).getTime() + "-" + Math.floor(Math.random() * 999999)
};
mboxScreenHeight = function () {
    return screen.height
};
mboxScreenWidth = function () {
    return screen.width
};
mboxBrowserWidth = function () {
    return window.innerWidth ? window.innerWidth : document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth
};
mboxBrowserHeight = function () {
    return window.innerHeight ? window.innerHeight : document.documentElement ? document.documentElement.clientHeight : document.body.clientHeight
};
mboxBrowserTimeOffset = function () {
    return -(new Date).getTimezoneOffset()
};
mboxScreenColorDepth = function () {
    return screen.pixelDepth
};
try {
    if (typeof mboxVersion == "undefined") var mboxVersion = 39,
        mboxFactories = new mboxMap,
        mboxFactoryDefault = new mboxFactory("mtvnetworks.tt.omtrdc.net", "mtvnetworks", "default");
    if (mboxGetPageParameter("mboxDebug") != null || mboxFactoryDefault.getCookieManager().getCookie("debug") != null) {
        setTimeout(function () {
            if (typeof mboxDebugLoaded == "undefined") alert("Could not load the remote debug.\nPlease check your connection" + " to Test&amp;Target servers")
        }, 60 * 60);
        document.write("<" + "scr" + 'ipt language="Javascript1.2" src=' + '"http://admin5.testandtarget.omniture.com/admin/mbox/mbox_debug.jsp?mboxServerHost=mtvnetworks.tt.omtrdc.net' + '&clientCode=mtvnetworks"><' + "/scr" + "ipt>")
    }
} catch (e$$27) { }
mboxScPluginFetcher = function (b, c) {
    this.b = b;
    this.qc = c
};
mboxScPluginFetcher.prototype.rc = function (b) {
    b.setBasePath("/m2/" + this.b + "/sc/standard");
    this.sc(b);
    b = b.buildUrl();
    b += "&scPluginVersion=1";
    return b
};
mboxScPluginFetcher.prototype.sc = function (b) {
    for (var c = ["dynamicVariablePrefix", "visitorID", "vmk", "ppu", "charSet", "visitorNamespace", "cookieDomainPeriods", "cookieLifetime", "pageName", "currencyCode", "variableProvider", "channel", "server", "pageType", "transactionID", "purchaseID", "campaign", "state", "zip", "events", "products", "linkName", "linkType", "resolution", "colorDepth", "javascriptVersion", "javaEnabled", "cookiesEnabled", "browserWidth", "browserHeight", "connectionType", "homepage", "pe", "pev1", "pev2", "pev3", "visitorSampling", "visitorSamplingGroup", "dynamicAccountSelection", "dynamicAccountList", "dynamicAccountMatch", "trackDownloadLinks", "trackExternalLinks", "trackInlineStats", "linkLeaveQueryString", "linkDownloadFileTypes", "linkExternalFilters", "linkInternalFilters", "linkTrackVars", "linkTrackEvents", "linkNames", "lnk", "eo"], d = 0; d < c.length; d++) this.uc(c[d], b);
    for (d = 1; d <= 50; d++) {
        this.uc("prop" + d, b);
        this.uc("eVar" + d, b);
        this.uc("hier" + d, b)
    }
};
mboxScPluginFetcher.prototype.uc = function (b, c) {
    var d = this.qc[b];
    if (typeof d === "undefined" || d === null || d === "") return;
    c.addParameter(b, d)
};
mboxScPluginFetcher.prototype.cancel = function () { };
mboxStandardScPluginFetcher = function (b, c) {
    mboxScPluginFetcher.call(this, b, c)
};
mboxStandardScPluginFetcher.prototype = new mboxScPluginFetcher;
mboxStandardScPluginFetcher.prototype.getType = function () {
    return "standard"
};
mboxStandardScPluginFetcher.prototype.fetch = function (b) {
    b.setServerType(this.getType());
    b = this.rc(b);
    document.write("<" + "scr" + 'ipt src="' + b + '" language="JavaScript"><' + "/scr" + "ipt>")
};
mboxAjaxScPluginFetcher = function (b, c) {
    mboxScPluginFetcher.call(this, b, c)
};
mboxAjaxScPluginFetcher.prototype = new mboxScPluginFetcher;
mboxAjaxScPluginFetcher.prototype.fetch = function (b) {
    b.setServerType(this.getType());
    b = this.rc(b);
    this.x = document.createElement("script");
    this.x.src = b;
    document.body.appendChild(this.x)
};
mboxAjaxScPluginFetcher.prototype.getType = function () {
    return "ajax"
};

function mboxLoadSCPlugin(b) {
    if (!b) return null;
    b.m_tt = function (b) {
        b = b.m_i("tt");
        b.H = true;
        b.b = "mtvnetworks";
        b._t = function () {
            if (!this.isEnabled()) return;
            var b = this.xc();
            if (b) {
                var c = mboxFactoryDefault.isDomLoaded() ? new mboxAjaxScPluginFetcher(this.b, this.s) : new mboxStandardScPluginFetcher(this.b, this.s);
                b.setFetcher(c);
                b.load()
            }
        };
        b.isEnabled = function () {
            return this.H && mboxFactoryDefault.isEnabled()
        };
        b.xc = function () {
            var b = this.yc(),
                c = document.createElement("DIV");
            return mboxFactoryDefault.create(b, new Array, c)
        };
        b.yc = function () {
            return "SiteCatalyst: " + (this.s.events && this.s.events.indexOf("purchase") != -1 ? "purchase" : "event")
        }
    };
    return b.loadModule("tt")
}
btg.Hcode = s_gi("");
if (typeof btg.Hcode === "object") btg.Hcode.setAccount = function (b) {
    this.un = b
};
if (typeof btg.Hcode === "object") btg.Hcode.getNewRepeat = new Function("" + "var s=this,e=new Date(),cval,ct=e.getTime(),y=e.getYear();e.setTime" + "(ct+30*24*60*60*1000);cval=s.c_r('s_nr');if(cval.length==0){s.c_w(" + "'s_nr',ct,e);return 'New';}if(cval.length!=0&&ct-cval<30*60*1000){s" + ".c_w('s_nr',ct,e);return 'New';}if(cval<1123916400001){e.setTime(cv" + "al+30*24*60*60*1000);s.c_w('s_nr',ct,e);return 'Repeat';}else retur" + "n 'Repeat';");
if (typeof btg.Hcode === "object") {
    btg.Hcode.getTimeParting = new Function("t", "z", "" + "var s=this,cy;dc=new Date('1/1/2000');" + "if(dc.getDay()!=6||dc.getMonth()!=0){return'Data Not Available'}" + "else{;z=parseFloat(z);var dsts=new Date(s.dstStart);" + "var dste=new Date(s.dstEnd);fl=dste;cd=new Date();if(cd>dsts&&cd<fl)" + "{z=z+1}else{z=z};utc=cd.getTime()+(cd.getTimezoneOffset()*60000);" + "tz=new Date(utc + (3600000*z));thisy=tz.getFullYear();" + "var days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday'," + "'Saturday'];if(thisy!=s.currentYear){return'Data Not Available'}else{;" + "thish=tz.getHours();thismin=tz.getMinutes();thisd=tz.getDay();" + "var dow=days[thisd];var ap='AM';var dt='Weekday';var mint='00';" + "if(thismin>30){mint='30'}if(thish>=12){ap='PM';thish=thish-12};" + "if (thish==0){thish=12};if(thisd==6||thisd==0){dt='Weekend'};" + "var timestring=thish+':'+mint+ap;if(t=='h'){return timestring}" + "if(t=='d'){return dow};if(t=='w'){return dt}}};");
    btg.Hcode.dstStart = "03/13/2011";
    btg.Hcode.dstEnd = "11/06/2011";
    btg.Hcode.currentYear = (new Date).getFullYear()
}
if (typeof btg.Hcode === "object") btg.Hcode.getValOnce = new Function("v", "c", "e", "" + "var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime(" + ")+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");
if (typeof btg.Hcode === "object") {
    btg.Hcode.getPreviousValue = new Function("v", "c", "el", "" + "var s=this,t=new Date,i,j,r='';t.setTime(t.getTime()+1800000);if(el" + "){if(s.events){i=split(el,',');j=split(s.events,',');for(x in i" + "){for(y in j){if(i[x]==j[y]){if(s.c_r(c)) r=s.c_r(c);v?s.c_w(c,v,t)" + ":s.c_w(c,'no value',t);return r}}}}}else{if(s.c_r(c)) r=s.c_r(c);v?" + "s.c_w(c,v,t):s.c_w(c,'no value',t);return r}");
    var split = new Function("l", "d", "" + "var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x" + "++]=l.substring(0,i);l=l.substring(i+d.length);}return a")
}
if (typeof btg.Hcode === "object") {
    btg.Hcode.getPercentPageViewed = new Function("", "" + "var s=this;if(typeof(s.linkType)=='undefined'||s.linkType=='e'){var" + " v=s.c_r('s_ppv');s.c_w('s_ppv',0);return v;}");
    btg.Hcode.getPPVCalc = new Function("", "" + "var s=s_c_il[" + btg.Hcode._in + "],dh=Math.max(Math.max(s.d.body.scrollHeight," + "s.d.documentElement.scrollHeight),Math.max(s.d.body.offsetHeight,s." + "d.documentElement.offsetHeight),Math.max(s.d.body.clientHeight,s.d." + "documentElement.clientHeight)),vph=s.wd.innerHeight||(s.d.documentE" + "lement.clientHeight||s.d.body.clientHeight),st=s.wd.pageYOffset||(s" + ".wd.document.documentElement.scrollTop||s.wd.document.body.scrollTo" + "p),vh=st+vph,pv=Math.round(vh/dh*100),cp=s.c_r('s_ppv');if(pv>100){" + "s.c_w('s_ppv','');}else if(pv>cp){s.c_w('s_ppv',pv);}");
    btg.Hcode.getPPVSetup = new Function("", "" + "var s=this;if(s.wd.addEventListener){s.wd.addEventListener('load',s" + ".getPPVCalc,false);s.wd.addEventListener('scroll',s.getPPVCalc,fals" + "e);s.wd.addEventListener('resize',s.getPPVCalc,false);}else if(s.wd" + ".attachEvent){s.wd.attachEvent('onload',s.getPPVCalc);s.wd.attachEv" + "ent('onscroll',s.getPPVCalc);s.wd.attachEvent('onresize',s.getPPVCa" + "lc);}");
    btg.Hcode.getPPVSetup()
}
if (typeof btg.Hcode === "object") {
    btg.Hcode.getQueryParam = new Function("p", "d", "u", "" + "var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati" + "on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p" + ".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-" + "1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i=" + "=p.length?i:i+1)}return v");
    btg.Hcode.p_gpv = new Function("k", "u", "" + "var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v" + "=s.pt(q,'&','p_gvf',k)}return v");
    btg.Hcode.p_gvf = new Function("t", "k", "" + "if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T" + "rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s." + "epa(v)}return ''")
}
if (typeof btg.Hcode === "object") btg.Hcode.trackTNT = function (b, c, d) {
    var b = b ? b : "s_tnt",
        e = "",
        f = false,
        d = d ? d : true;
    if (this.getQueryParam) f = this.getQueryParam(c ? c : "s_tnt");
    if (f) e += f + ",";
    if (this.wd[b] != undefined) e += this.wd[b];
    if (d) this.wd[b] = "";
    return e
};
btg.MediaPlayer = {
    context: null,
    playerCommandQueue: null,
    isHtml5: false,
    html5MetaData: {},
    init: function (b) {
        this.context = b;
        this.playerCommandQueue = new btg.QueueManager({
            id: "btg.MediaPlayer.playerCommandQueue",
            timeToWait: 100,
            maxNumItems: 10,
            maxElapsed: 1E3,
            handler: this.execute
        })
    },
    playStarted: false,
    players: [],
    addPlayer: function (b, c) {
        var d = this.isHtml5 ? b.id : b;
        this.players[d] = new this.Player(b, c);
        return this.players[d]
    },
    setEndSlateClick: function (b) {
        var c = btg.Cookie.set,
            d = btg.config.Omniture;
        c("mtvn_btg_tnt", (b && typeof d.enableTestAndTarget == "boolean" && d.enableTestAndTarget ? btg.TestAndTarget.getCampaignId() : "") + "_" + (typeof feedEndslate != "undefined" && feedEndslate));
        c("mtvn_btg_esclicked", b)
    },
    getEndSlateClick: function () {
        return btg.Cookie.read("mtvn_btg_esclicked")
    },
    PlayerController: function (b, c) {
        return this.addPlayer(b, c)
    },
    pause: function () {
        var b = btg.MediaPlayer,
            c;
        for (c in b.players) if (b.players.hasOwnProperty(c)) b.players[c].player.pause()
    },
    unpause: function () {
        var b = btg.MediaPlayer,
            c;
        for (c in b.players) if (b.players.hasOwnProperty(c)) if (b.players[c].player.unpause) b.players[c].player.unpause();
        else if (b.players[c].player.play) b.players[c].player.play()
    },
    execute: function (b) {
        var c = btg.MediaPlayer;
        if (c.playStarted) switch (b) {
            case "unpause":
                c.unpause();
                break;
            case "pause":
                c.pause()
        } else c.playerCommandQueue.queue.push(b)
    },
    reportingInit: function () {
        try {
            btg.config.Omniture.videoViewEventDisable = true;
            btg.Demdex.sendIdSyncCall()
        } catch (b) { }
    },
    getFirstPartyServer: function () {
        var b = null;
        if (btg.config.Omniture.enableFirstPartyCookie) b = btg.Environment.getCnamedDomain();
        return b
    },
    getVmnUUID: function () {
        return btg.Cookie.read("vmn_uuid")
    },
    setDemdexFWSegment: function () {
        var b = btg.Demdex.getFWSegment(),
            c = btg.MediaPlayer;
        if (b) for (var d in c.players) if (c.players.hasOwnProperty(d) && c.players[d].player && c.players[d].player.setDemdexFWSegment) c.players[d].player.setDemdexFWSegment(b)
    },
    Player: function (b, c) {
        var d = btg.Controller,
            e = btg.Cookie,
            f = btg.TestAndTarget,
            g = btg.MediaPlayer,
            h = btg.config;
        this.playerId = this.isHtml5 ? b.id : b;
        this.player = this.lastGuid = null;
        this.playerLoaded = false;
        this.onLoadFunctionName = c;
        this.onLoaded = function () {
            this.player = g.getPlayerObject(b);
            g.addListeners(this.player);
            this.playerLoaded = true;
            var c = eval(this.onLoadFunctionName);
            if (typeof c == "function") c(this)
        };
        this.onDump = function () { };
        this.dump = function () {
            var b = "";
            if (this.playerLoaded) b = this.player.getLogDump();
            else b = "player not loaded";
            this.onDump(b)
        };
        this.onPlayHeadUpdate = function (b) {
            b = g.isHtml5 ? b.data : b;
            if ((b = b == -1 || b == null || typeof b == "undefined" ? 1.5 : b) && b > 1) if (!g.playStarted) {
                g.playStarted = true;
                g.playerCommandQueue.init()
            }
        };
        this.onMetaData = function (b) {
            if (btg.MediaPlayer.isHtml5) try {
                html5MetaData = b = {
                    guid: b.data.rss.guid,
                    contentType: b.data.rss.group.categories.contentType
                }
            } catch (c) { }
            if (location.search.match(/showMetaData\=true/)) {
                str = "";
                for (m in b) str += m + ": " + b[m] + "\n";
                alert(this.lastGuid + "\n\n\n" + str)
            }
            var l = "",
                o = document.location.search,
                p = o.toLowerCase().indexOf("xrs=mpes_") != -1 ? true : false,
                u = b.contentType === "c3_adpod";
            if (p) for (var o = o.replace(/^\?/g, "").split("&"), p = 0, k = o.length; p < k; p++) if (o[p].split("=")[0] == "xrs") l = btg.String.isDefined(o[p].split("=")[1]) ? o[p].split("=")[1] : "";
            if (b.guid && this.lastGuid !== b.guid) {
                l = {
                    linkName: "Video View",
                    linkType: "o",
                    eVar28: b.contentType,
                    events: "event15" + (g.getEndSlateClick() == "true" ? ",event45" : ""),
                    campaign: l
                };
                if (typeof h.Omniture.enableTestAndTargetTrial != "undefined" && h.Omniture.enableTestAndTargetTrial) {
                    o = (p = e.read("mtvn_btg_tnt")) ? p.split("_")[0] : "";
                    p = p ? p.split("_")[1] : "false";
                    if (g.getEndSlateClick() == "true" && o != "") if (p.toString() == "true") f.convertMbox(location.href && location.href.match(/[\?#&]id=[^&]/gi) ? "editorialplaylist" : "dynamicplaylist");
                    else f.convertMbox("endslatevideoloaded");
                    f.convertMbox("endSlateGating")
                }
                e.set("mtvn_btg_tnt", "");
                if (typeof btg.UserSegment != "undefined") {
                    btg.UserSegment.add(g.context, "VideoViewer");
                    if (u) btg.UserSegment.add(btg.MediaPlayer.context, "C3VideoViewer")
                }
                if (typeof h.Omniture.videoViewEventDisable != "undefined" && h.Omniture.videoViewEventDisable) {
                    l.events = l.events.replace(/event15(,)?/gi, "");
                    l.eVar28 = ""
                } else {
                    g.setEndSlateClick("false");
                    d.sendLinkEvent(l)
                }
            }
            this.lastGuid = b.guid
        };
        this.onEndslateLoad = function () {
            if (typeof this.onEndslateFired != "undefined") return;
            else this.onEndslateFired = true;
            if (typeof btg.UserSegment != "undefined") btg.UserSegment.add(g.context, "EndslateViewer");
            d.sendLinkEvent({
                linkName: "Endslate View",
                linkType: "o",
                events: "event44"
            });
            if (typeof h.Omniture.enableTestAndTargetTrial != "undefined" && h.Omniture.enableTestAndTargetTrial) f.convertMbox("endslateload")
        }
    },
    getPlayerObject: function (b) {
        if (btg.MediaPlayer.isHtml5) b = b;
        else {
            if (navigator.appName.indexOf("Microsoft")) b = window[b] ? window[b] : document[b] ? document[b] : null;
            else b = document[b] ? document[b] : window[b] ? window[b] : null;
            if (b && typeof b.length != "undefined") for (var c in b) if (typeof b[c].pause != "undefined") {
                b = b[c];
                break
            }
        }
        return b
    },
    addListeners: function (b) {
        if (btg.MediaPlayer.isHtml5) {
            b.addEventListener("onMetadata", btg.MediaPlayer.players[b.id].onMetaData);
            b.addEventListener("onPlayheadUpdate", btg.MediaPlayer.players[b.id].onPlayHeadUpdate)
        } else {
            b.addEventListener("METADATA", 'btg.MediaPlayer.players["' + b.id + '"].onMetaData');
            b.addEventListener("ENDSLATE_CLICK", 'btg.MediaPlayer.players["' + b.id + '"].onEndslateLoad');
            b.addEventListener("PLAYHEAD_UPDATE", 'btg.MediaPlayer.players["' + b.id + '"].onPlayHeadUpdate');
            if (b.addReportingEventListener) {
                b.addReportingEventListener("DEMDEXVIDEOSTARTCALL", "btg.Demdex.sendPageCall");
                b.addReportingEventListener("DEMDEXVIDEOENDCALL", "btg.Demdex.sendPageCall");
                b.addReportingEventListener("DEMDEXEMBED", "btg.Demdex.sendSocialCall");
                b.addReportingEventListener("DEMDEXLINK", "btg.Demdex.sendSocialCall");
                b.addReportingEventListener("DEMDEXSHARE", "btg.Demdex.sendSocialCall");
                b.addReportingEventListener("REPORTINGINIT", "btg.MediaPlayer.reportingInit");
                b.addReportingEventListener("FIRSTPARTYSERVER", "btg.MediaPlayer.getFirstPartyServer");
                b.addReportingEventListener("VMNUUID", "btg.MediaPlayer.getVmnUUID");
                b.addReportingEventListener("ENDSLATECLICK", "btg.MediaPlayer.setEndSlateClick")
            }
        }
    },
    onWindowLoaded: function () {
        var b = btg.MediaPlayer;
        try {
            if (typeof oldMtvnPlayerLoaded != "undefined") oldMtvnPlayerLoaded(id)
        } catch (c) { }
        window.mtvnPlayerLoaded = function (c) {
            var e;
            if (btg.Object.isDefined(c)) {
                b.isHtml5 = true;
                e = c.id;
                if (c.isFlash) {
                    b.isHtml5 = false;
                    c = c.id
                }
            } else e = c;
            if (typeof oldMtvnPlayerLoaded != "undefined") oldMtvnPlayerLoaded(e);
            if (!b.isHtml5 && typeof document.getElementById(e) == "undefined") return;
            if (typeof b.players[e] == "undefined") b.addPlayer(c);
            b.players[e].onLoaded()
        }
    }
};
try {
    btg.MediaPlayer.onWindowLoaded();
    var MTVNPlayer = MTVNPlayer || {};
    MTVNPlayer.addCallback = function (b) {
        this.onAPIReady = function (c) {
            return c ?
            function () {
                c();
                b()
            } : b
        } (this.onAPIReady)
    };
    MTVNPlayer.addCallback(function (b) {
        return function () {
            MTVNPlayer.onPlayer(b)
        }
    } (mtvnPlayerLoaded))
} catch (e$$36) { }
btg.AdManager = new function () {
    var b = btg.Object,
        c = b.copyProperties,
        d = btg.String.isDefined,
        e = b.isConfigDefined,
        f = btg.String.stripFileExtension,
        g = btg.Math.random,
        h = btg.globalvars,
        j = false,
        n = false,
        l = false,
        o = false,
        p = false,
        u = 3E4,
        k, q = [],
        w = new btg.DependencyManager(7E3);
    w.add("demdex_data", function () {
        return !btg.config.Demdex || !btg.config.Demdex.enabled || btg.Object.isDefined(btg.Demdex.data)
    }, 100, true);
    w.add("uuid", function () {
        return btg.Cookie.read("vmn_uuid") != null
    }, 100, true);
    this.groupedReloadableAdsCounter = this.groupedReloadableAdsTotal = 0;
    var t = {};
    t.tile = 0;
    t.ord = g(1E17, 1E18);
    var v = [{
        name: "DoubleClick",
        url: "http://ad.doubleclick.net/",
        reportEvent: "event79"
    }, {
        name: "FreeWheel",
        url: "http://140cc.v.fwmrm.net/",
        reportEvent: "event80"
    }];
    this.reloadableAds = {};
    this.init = function () {
        k = btg.config;
        if (k.reloadableAds && k.reloadableAds === true) p = true;
        if (k.reloadInterval && !isNaN(parseInt(k.reloadInterval))) {
            k.reloadInterval = parseInt(k.reloadInterval);
            if (k.reloadInterval >= 1E4) u = k.reloadInterval
        }
        var b = {};
        if (e(k.DoubleClick)) {
            if (k.DoubleClick.type && k.DoubleClick.type.toLowerCase() == "international") {
                k.International = {};
                c(k.DoubleClick, k.International)
            } else if (k.DoubleClick.type && k.DoubleClick.type.toLowerCase() == "domestic") k.International = {};
            j = true;
            if (d(k.DoubleClick.sections)) {
                k.DoubleClick.sections = f(k.DoubleClick.sections);
                b.sections = k.DoubleClick.sections
            } else {
                this.setDefaultSections();
                if (d(t.sections)) b.sections = t.sections
            }
            b.dartSite = k.DoubleClick.dartSite
        }
        if (e(k.FreeWheel)) n = true;
        if (e(k.International)) {
            l = true;
            if (d(k.International.sections)) {
                k.International.sections = f(k.International.sections);
                b.sections = k.International.sections
            } else {
                this.setDefaultSections();
                if (d(t.sections)) b.sections = t.sections
            }
            b.dartSite = k.International.dartSite
        }
        if (e(k.QuantCast)) o = true;
        if (o) {
            PlatoAd = new btg.DomesticDc(k.DoubleClick);
            dmobj = {
                size: "728x90",
                contentType: "adj"
            };
            dmobj.sections = b.sections;
            if (d(k.QuantCast.vertical)) PlatoAd.setKeyValues("vertical=" + k.QuantCast.vertical);
            PlatoAd.init(dmobj);
            PlatoAd.getUrl();
            if (btg.QuantCast) btg.QuantCast.Ads.setLabels(b, PlatoAd.getSections())
        }
        this.check4BlockedAds();
        b = this.getAdsBHCookie("mtvn_btg_adshidden");
        if (b < 2) {
            btg.Cookie.set("mtvn_btg_adshidden", ++b);
            btg.Events.adLoaded.subscribe(this.checkStyle)
        }
    };
    this.getAdsBHCookie = function (b) {
        var c = "",
            b = btg.Cookie.read(b);
        if (b != null) c = parseInt(b);
        else c = 0;
        return c
    };
    this.sendAdBlockedRepCall = function () {
        btg.Cookie.set("mtvn_btg_adsblocked", this.getAdsBHCookie("mtvn_btg_adsblocked") + 1);
        for (var b = [], c = [], d = 0, f = v.length; d < f; d++) if (v[d].isBlocked === true) {
            b.push(v[d].name);
            c.push(v[d].reportEvent)
        }
        if (b.length > 0) {
            b = b.join(" and ");
            btg.Controller.sendLinkEvent({
                linkName: b + " Blocked",
                linkType: "o",
                eVar55: b + " Blocked",
                events: c.join()
            });
            btg.Cookie.set("mtvn_btg_adsblocked", 2)
        }
    };
    this.blockCallback = function (b) {
        for (var c = 0, d = 0, f = v.length; d < f; d++) {
            if (b.url == v[d].url) if (typeof b.fail != "undefined" && b.fail === true) v[d].isBlocked = true;
            else v[d].isBlocked = false;
            if (typeof v[d].isBlocked != "undefined") c++
        }
        if (c == v.length) btg.AdManager.sendAdBlockedRepCall()
    };
    this.check4BlockedAds = function () {
        if (navigator.userAgent.indexOf("MSIE") != -1) return;
        var b = this.getAdsBHCookie("mtvn_btg_adsblocked");
        if (b >= 2);
        else if (b < 2) for (var b = 0, c = v.length; b < c; b++) new btg.Ajax({
            method: "POST",
            onSuccess: this.blockCallback,
            onFail: this.blockCallback,
            autoSend: true,
            url: v[b].url
        })
    };
    this.sendAdHiddenRepCall = function () {
        if (this.getAdsBHCookie("mtvn_btg_adshidden") >= 2) return;
        btg.Controller.sendLinkEvent({
            linkName: "DoubleClick Hidden",
            linkType: "o",
            eVar55: "DoubleClick Hidden",
            events: v[0].reportEvent
        });
        btg.Cookie.set("mtvn_btg_adshidden", 2)
    };
    this.checkStyle = function (b) {
        try {
            var c = document.getElementById(b),
                d = c.tagName.toLowerCase() == "iframe" ? c : c.parentNode;
            if (btg.DOM.getStyle(d, "display") == "none" || btg.DOM.getStyle(d, "visibility") == "hidden") btg.AdManager.sendAdHiddenRepCall()
        } catch (f) { }
    };
    this.addUuid = function (b) {
        var c = btg.Cookie.read("vmn_uuid");
        if (c != null) {
            c = "u=" + c;
            if (btg.String.isDefined(b.keyValues)) b.keyValues += c + ";";
            else b.keyValues = c + ";"
        }
        return b
    };
    this.addDemdexVals = function (b) {
        if (btg.Object.isDefined(btg.Demdex.data && btg.Demdex.data.stuff)) for (var c = btg.Demdex.data.stuff, d = 0, f = c.length; d < f; d++) if (btg.Object.isDefined(c[d]) && btg.String.isDefined(c[d].cn) && c[d].cn == "dfp" && btg.String.isDefined(c[d].cv)) {
            c = c[d].cv.split(",").join(";");
            if (btg.String.isDefined(b.keyValues)) b.keyValues += c + ";";
            else b.keyValues = c + ";";
            break
        }
        return b
    };
    this.placeAd = function (b, c) {
        btg.Controller.init();
        if (btg.config.defferedAdLoading && !c) this.placeAdTag(b);
        else {
            if (typeof h.IS_CODA_ADS_USED != "undefined" && h.IS_CODA_ADS_USED == false) h.IS_CODA_ADS_USED = true;
            if (b.size == "6x6") if (btg.Cookie.read("vmn_poe") == null) btg.Cookie.set("vmn_poe", "6x6");
            else return;
            var d = this.getAd(b);
            if (b.isReloadable === true || p && b.isReloadable !== false) {
                if (d.setContentType) d.setContentType("adi");
                d.reloadInterval = u;
                if (b.reloadInterval && !isNaN(parseInt(b.reloadInterval))) {
                    d.needUniqueOrd = true;
                    b.reloadInterval = parseInt(b.reloadInterval);
                    if (b.reloadInterval >= 1E4) d.reloadInterval = b.reloadInterval
                } else {
                    this.groupedReloadableAdsTotal++;
                    this.groupedReloadableAdsCounter++
                }
                if (d.reloadTimer) {
                    clearInterval(d.reloadTimer);
                    d.reloadTimer = null
                }
                d.reloadTimer = setInterval(function () {
                }, d.reloadInterval)
            }
            if (d != null) {
                d.placeAd(b);
                return d
            } else {
                document.write("[ERROR: Ad not created, please check your config to enable CODA ads]");
                return null
            }
        }
    };
    this.placeAdTag = function (b) {
        var c = btg.config;
        c.adSetup = c.adSetup || [];
        b.adId = "btgAd_" + c.adSetup.length;
        c.adSetup[c.adSetup.length] = b;
        document.write("<div id='" + b.adId + "'></div>")
    };
    this.placeAllAds = function () {
        if (w.hasDependency()) {
            w.addToCallQueue(this, btg.AdManager.placeAllAds);
            return
        }
        var b = btg.config.adSetup;
        if (b) for (var c = 0, d = b.length; c < d; c++) {
            b[c].contentType = "adi";
            if (b[c].adId.match(/btgad_/ig)) {
                if (btg.config.Demdex && btg.config.Demdex.enabled) b[c] = this.addDemdexVals(b[c]);
                b[c] = this.addUuid(b[c]);
                this.placeAd(b[c], true)
            } else if (console && console.log) console.log("Please provide adId in std format. Ex. 'btgAd_1'.")
        }
    };
    this.adLoadNotify = function (b) {
        if (typeof btg.Events.adLoaded != "undefined") btg.Events.adLoaded.fire(b)
    };
    this.setAdReloadOrdByGroup = function (b) {
        if (b.needUniqueOrd === true) b.setOrd(g(1E17, 1E18));
        else {
            if (this.groupedReloadableAdsCounter >= this.groupedReloadableAdsTotal && this.groupedReloadableAdsCounter % this.groupedReloadableAdsTotal == 0) t.ord = g(1E17, 1E18);
            b.setOrd(t.ord);
            this.groupedReloadableAdsCounter++
        }
    };
    this.reloadAd = function (c) {
        var f = b.isDefined;
        if (f(c) && d(c.id) && f(self.frames[c.id])) {
            c.setContentType("adi");
            this.setAdReloadOrdByGroup(c);
            try {
                self.frames[c.id].location.replace(c.getUrl())

                //TESTING URL STRING 
                //alert(c.getUrl());

            } catch (e) { }
        }
    };
    this.reloadAll = function () {
        var b = q.length,
            c = btg.FreeWheelAdInterface.fwAds,
            d = c.length;
        t.ord = g(1E17, 1E18);
        for (var f = 0; f < b; f++) {
            var e = q[f];
            e.setOrd(t.ord);
            this.reloadAd(e);
            if (e.reloadTimer) {
                clearInterval(e.reloadTimer);
                e.reloadTimer = null;
                e.reloadTimer = setInterval(function () {
                    btg.AdManager.reloadAd(e)
                }, e.reloadInterval)
            }
        }
        for (f = 0; f < d; f++) {
            e = c[f];
            e.dcAd.setOrd(t.ord);
            e.reload();
            e.startReloadTimer()
        }
        return this
    };
    this.getData = function () {
        return t
    };
    this.setDefaultSections = function (b) {
        b = d(b) ? b : btg.Sections.getAdSections();
        if (d(b)) t.sections = f(b)
    };
    this.getAd = function (b) {
        this.init();
        var e;
        if (l) {
            e = new btg.InternationalDc(k.International);
            t.tile++;
            if (d(b.sections)) b.sections = f(b.sections);
            c(t, b);
            e.init(b);
            q.push(e)
        } else if (n) {
            e = new btg.FreeWheelAd(k);
            t.tile++;
            if (d(b.sections)) b.sections = f(b.sections);
            c(t, b);
            e.init(b);
            q.push(e)
        } else if (j) {
            e = new btg.DomesticDc(k.DoubleClick);
            t.tile++;
            if (d(b.sections)) b.sections = f(b.sections);
            c(t, b);
            e.init(b);
            q.push(e)
        } else {
            document.write("<\!-- [ERROR: Ads not enabled. Please check your config or placeAd() method call!] --\>");
            return null
        }
        return e
    };
    this.getAds = function () {
        return q
    };
    this.getAdUrl = function (b) {
        return this.getAd(b).getUrl()
    };
    this.setTile = function (b) {
        t.tile = b
    }
};
btg.FreeWheelAd = function (b) {
    this.isStr = btg.String.isDefined;
    this.config = b;
    this.type = "FreeWheelAd";
    this.fwType = "DART";
    this.slotId = "fwph_";
    this.reloadable = true;
    this.reloadTime = 3E4;
    this.needUniqueOrd = this.isGroupedByOrd = false
};
btg.FreeWheelAd.prototype = {
    placeAd: function (b) {
        if (this.fwType == "MRM" || this.fwType == "COV") {
            this.realWidth = this.realSize.substr(0, this.realSize.indexOf("x"));
            this.realHeight = this.realSize.substr(this.realSize.indexOf("x") + 1, this.realSize.length);
            var c = "slid=";
            c += this.slotId;
            c += "&ptgt=s&envp=g_iframe_js&w=";
            c += this.realWidth;
            c += "&h=";
            c += this.realHeight;
            var d = "";
            d += '<span id="' + this.slotId + '" class="_fwph">';
            d += '<form id="_fw_form_' + this.slotId + '" style="display:none;">';
            d += '<input type="hidden" name="_fw_input_' + this.slotId + '" id="_fw_input_' + this.slotId + '" value="' + c + '" />';
            d += "</form>";
            d += '<span id="_fw_container_' + this.slotId + '" class="_fwac">';
            d += '<span id="fwCustom_' + this.slotId + '" name="fwCustom_' + this.slotId + '" class="fwCustomAll" style="width:' + this.realWidth + "px;height:" + this.realHeight + 'px;display:block;"></span></span>';
            d += "</span>";
            if (btg.globalvars.IS_TOP_ACCESSIBLE && btg.String.queryStringToObject(top.location.search).mockupMode == "true") d = btg.String.mockItUp(d);
            if (btg.config.defferedAdLoading) if (b = document.getElementById(b.adId)) b.innerHTML = d;
            else document.write(d);
            else document.write(d);
            btg.FreeWheelAdInterface.fwAds[this.slotId] = this;
            btg.DOM.Events.addListener(window, "load", this.timerToPlayAd)
        } else if (this.fwType == "DART") {
            this.dcAd = new btg.DomesticDc(this.config.DoubleClick);
            this.dcAd.init(this.initData);
            this.dcAd.placeAd(b)
        } else new btg.Alert("FreeWheel ad type not recognized.")
    },
    timerToPlayAd: function () {
        setTimeout(function () {
            var b = false,
                c;
            for (c in btg.MediaPlayer.players) {
                b = true;
                break
            }
            if (b) setTimeout(btg.FreeWheelAdInterface.forcedPlayAd, btg.globalvars.FORCE_AD_WAIT_TIME.PLAYER_LOADED);
            else setTimeout(btg.FreeWheelAdInterface.forcedPlayAd, btg.globalvars.FORCE_AD_WAIT_TIME.PLAYER_FAILED)
        }, btg.globalvars.FORCE_AD_WAIT_TIME.PLAYER_LOAD_WAIT_TIME)
    },
    setContentType: function () { },
    init: function (b) {
        this.initData = b;
        if (this.isStr(b.size)) this.size = b.size;
        else {
            this.size = "[ERROR: Size Not Defined!]";
            new btg.Alert("FreeWheel ad size not defined.")
        }
        if (this.isStr(b.realSize)) this.realSize = b.realSize;
        else this.realSize = this.size;
        this.slotId += b.tile;
        if (this.isStr(this.config.FreeWheel.type)) this.fwType = this.config.FreeWheel.type.toUpperCase();
        if (this.config.FreeWheel.reloadable || b.isReloadable) {
            this.reloadable = true;
            this.reloadTime = 3E4;
            if (this.config.FreeWheel.reloadTime && !isNaN(parseInt(this.config.FreeWheel.reloadTime)) && parseInt(this.config.FreeWheel.reloadTime) >= 1E4) {
                this.reloadTime = parseInt(this.config.FreeWheel.reloadTime);
                this.isGroupedByOrd = true
            }
            if (b.reloadInterval && !isNaN(parseInt(b.reloadInterval)) && parseInt(b.reloadInterval) >= 1E4) {
                this.reloadTime = parseInt(b.reloadInterval);
                if (this.isGroupedByOrd === true) this.isGroupedByOrd = false;
                this.needUniqueOrd = true
            }
            if (this.isGroupedByOrd === true) {
                btg.AdManager.groupedReloadableAdsTotal++;
                btg.AdManager.groupedReloadableAdsCounter++
            }
        }
    },
    reload: function () {
        var b = "_fw_frame_" + this.slotId,
            c = document.getElementById(b),
            d = document.getElementById("fwCustom_" + this.slotId);
        if (!btg.Object.isDefined(this.dcAd)) {
            this.dcAd = new btg.DomesticDc(this.config.DoubleClick);
            this.dcAd.init(this.initData)
        }
        if (!this.isStr(this.dcAd.id)) this.dcAd.setId("ad" + this.dcAd.tile);
        this.dcAd.needUniqueOrd = this.needUniqueOrd;
        if (c != null) btg.AdManager.setAdReloadOrdByGroup(this.dcAd);
        this.dcAd.setContentType("adi");
        b = "<ifr" + 'ame allowtransparency="true" style="display:inline;width:' + this.realWidth + "px;height:" + this.realHeight + 'px;border:0px;z-index:99;border-width:0px;" onload="btg.AdManager.adLoadNotify(\'' + this.dcAd.id + '\');" id="' + b + '" name="' + b + '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="' + this.realWidth + '" height="' + this.realHeight + '" src="' + this.dcAd.getUrl() + '"></ifr' + "ame>";
        if (c == null && d != null) {
            d.style.border = "0px";
            d.style.backgroundColor = "transparent";
            try {
                d.innerHTML = b
            } catch (e) { }
        } else if (c != null) if (c.parentElement) try {
            c.parentElement.innerHTML = b
        } catch (f) { } else if (c.parentNode) try {
            c.parentNode.innerHTML = b
        } catch (g) { }
    },
    startReloadTimer: function () {
        if (this.reloadable) {
            var b = this;
            if (this.reloadTimer) {
                clearInterval(this.reloadTimer);
                this.reloadTimer = null
            }
            this.reloadTimer = setInterval(function () {
                b.reload()
            }, this.reloadTime)
        }
    }
};
btg.FreeWheelAdInterface = new function () {
    var b = btg.String;
    this.fwAds = [];
    this.getFallbackDisplayHTML = function (c, d) {
        for (var e = b.isDefined, f = "", g = this.fwAds[c], h = d.split(","), j = "", n = 0, l = h.length; n < l; n++) if (e(h[n])) j += ";!category=" + h[n];
        g.dcAd = new btg.DomesticDc(g.config.DoubleClick);
        if (e(g.initData.keyValues)) g.initData.keyValues += j;
        else g.initData.keyValues = j;
        g.initData.contentType = "adj";
        g.dcAd.init(g.initData);
        if (g.reloadable) g.startReloadTimer();
        if (!e(g.dcAd.id)) g.dcAd.setId("ad" + g.dcAd.tile);
        f += "<scr" + 'ipt type="text/javascript"  id="' + g.dcAd.id + "\" onreadystatechange=\"if(this.readyState=='complete')parent.btg.AdManager.adLoadNotify('" + g.dcAd.id + "');\" onload=\"parent.btg.AdManager.adLoadNotify('" + g.dcAd.id + '\');" src="';
        f += g.dcAd.getUrl();
        f += '"></scr' + "ipt>";
        return f
    };
    this.forcedPlayAd = function () {
        var c = btg.FreeWheelAdInterface,
            d = btg.globalvars,
            e = b.queryStringToObject,
            f = false,
            g = false,
            h, j = d.IS_LIVE_ENV;
        if (d.IS_TOP_ACCESSIBLE) if (e(top.location.search).fwFailSafe == "true") h = true;
        else if (e(top.location.search).fwFailSafe == "false") h = false;
        if (h == true) {
            f = true;
            if (j == true) g = true
        } else if (h == false) f = false;
        else if (j == true) g = f = true;
        if (d.IS_TOP_ACCESSIBLE && e(top.location.search).mockupMode == "true") g = f = false;
        if (f == true) {
            for (i in c.fwAds) if (document.getElementById("_fw_frame_" + i) == null) {
                if (c.fwAds[i].reloadable) c.fwAds[i].startReloadTimer();
                c.fwAds[i].reload()
            } else g = false;
            if (g == true) new btg.Alert("Freewheel failsafe method used.", 1)
        }
    }
};
var mtvn = typeof mtvn === "object" ? mtvn : {};
mtvn.btg = typeof mtvn.btg === "object" ? mtvn.btg : {};
mtvn.btg.ads = typeof mtvn.btg.ads === "object" ? mtvn.btg.ads : {};
mtvn.btg.ads.FreeWheelAdInterface = btg.FreeWheelAdInterface;
btg.DoubleClick = function (b) {
    this.isStr = btg.String.isDefined;
    this.isObj = btg.Object.isDefined;
    this.gv = btg.globalvars;
    this.qsToObj = btg.String.queryStringToObject;
    this.mockItUp = btg.String.mockItUp;
    if (this.isObj(b)) this.config = b;
    this.server = "ad.doubleclick.net";
    this.ssl = false;
    this.contentType = "adj";
    this.mediaType = "standard";
    this.keyValues = "";
    this.zoneOverride = null;
    this.additionalKeyValues = [];
    this.exclusions = [];
    this.reservedKeyValues = {};
    if (this.isObj(b)) this.autoDcopt = b.autoDcopt ? true : false;
    if (this.isObj(btg.AdManager) && !btg.AdManager.dcoptOn) btg.AdManager.dcoptOn = false;
    this.isDevEnv = false;
    if (btg.globalvars.IS_TOP_ACCESSIBLE && top.location.hostname.indexOf("mtvi.com") > -1) this.isDevEnv = true;
    if (this.isObj(b)) for (var c in b) if (this.isStr(b[c]) && (typeof b[c] == "string" || typeof b[c] == "number")) if (c == "sections") this.setSections(b[c]);
    else if (c == "keyValues") this.setKeyValues(b[c]);
    else if (c == "positionThreshold") this.setPositionThreshold(b[c]);
    else this[c] = b[c]
};
btg.DoubleClick.prototype = {
    formatUrl: function (b) {
        var c = "",
            c = b.dartSite + "/" + b.zone + ";";
        if (c.length > 64) b.zone = b.zone.substring(0, b.zone.length - (c.length - 64));
        c = [
            [b.protocol + b.server, b.contentType, b.dartSite, b.zone].join("/"), b.sections];
        if (this.isStr(b.keyValues)) c.push(b.keyValues);
        if (b.ord > 0) c.push("ord=" + b.ord + "?");
        return c = c.join(";")
    },
    setKeyValues: function (b) {
        b = b.replace(/[^\w=!;|-]/g, "_");
        this.keyValues = b.replace(/^;+|;+$/g, "");
        if (this.keyValues.indexOf("mtype=") > -1) this.setMediaType(this.getKeyValue("mtype="));
        if (this.keyValues.indexOf("pos=") > -1) this.setPosition(this.getKeyValue("pos="));
        else if (this.keyValues.indexOf("threshold=") > -1) this.setPositionThreshold(this.getKeyValue("threshold="))
    },
    setZoneOverride: function (b) {
        this.zoneOverride = b
    },
    setId: function (b) {
        this.id = b
    },
    setServer: function (b) {
        this.server = b
    },
    setSsl: function () {
        this.ssl = true
    },
    setDartSite: function (b) {
        if (btg.Environment.getPlatform() == "desktop") this.dartSite = b;
        else this.dartSite = "tabletdart." + b
    },
    setContentType: function (b) {
        this.contentType = b
    },
    setMediaType: function (b) {
        this.mediaType = b
    },
    setPosition: function (b) {
        this.position = b
    },
    setSections: function (b) {
        for (var b = b == "/" ? b : btg.String.charTrim(b, "/"), c = this.isObj(btg.config) && this.isStr(btg.config.defaultIndexFileName) ? btg.config.defaultIndexFileName : "index", c = btg.String.stripFileExtension(c), c = ["/", c, "home/" + c], d = 0, e = c.length; d < e; d++) if (b.indexOf(c[d]) == 0 && b.length == c[d].length) {
            b = b.replace(c[d], "_hp");
            break
        }
        for (b = b.replace(/[^\/\w=!;|-]/g, "_"); b.match(/\/\d/); ) b = b.replace(/\/\d/, RegExp.lastMatch.substring(0, 1) + "_" + RegExp.lastMatch.substring(1, 2));
        b = b.replace(/^\d/, "_" + b.match(/^\d/, "_"));
        this.sections = b.replace(/^\/+|\/+$/g, "");
        if (this.sections.indexOf(".") > -1) this.sections = this.sections.split(".")[0]
    },
    setSize: function (b) {
        this.size = b
    },
    setRealSize: function (b) {
        this.realSize = b
    },
    setTile: function (b) {
        this.tile = b
    },
    setPositionThreshold: function (b) {
        if (isNaN(parseInt(b))) this.positionThreshold = null;
        else this.positionThreshold = parseInt(b)
    },
    setOrd: function (b) {
        this.ord = b
    },
    setPartner: function (b) {
        this.partner = b
    },
    addExclusionCategory: function (b) {
        var b = b.replace(/^;+|;+$/g, ""),
            c = false;
        if (this.exclusions.length > 0) {
            for (var d = 0, e = this.exclusions.length; d < e; d++) if (this.exclusions[d].match(new RegExp("category=" + b, "ig"))) {
                c = true;
                break
            }
            if (!c) this.exclusions.push("!category=" + b)
        } else this.exclusions.push("!category=" + b)
    },
    addKeyValues: function (b) {
        if (this.isStr(b) && b.indexOf("=") > -1) this.additionalKeyValues.push(b)
    },
    appendKeyValue: function (b, c) {
        if (!this.isStr(b)) b = "";
        if (!this.isStr(c)) c = "";
        b = b.replace(/^;+|;+$/g, "");
        c = c.replace(/^;+|;+$/g, "");
        if (b.indexOf("=") > -1) c += ";" + b;
        return c = c.replace(/^;+|;+$/g, "")
    },
    removeKeyValue: function (b) {
        if (this.isStr(this.getKeyValue(b))) {
            var c = ";" + b + this.getKeyValue(b);
            if (this.keyValues.indexOf(c) == -1) {
                c = b + this.getKeyValue(b) + ";";
                if (this.keyValues.indexOf(c) == -1) c = b + this.getKeyValue(b)
            }
            this.keyValues = this.keyValues.replace(new RegExp(c, "g"), "");
            this.removeKeyValue(b)
        }
    },
    getProtocol: function () {
        return this.ssl ? "https://" : "http://"
    },
    getPosition: function () {
        var b = "unk";
        if (this.isStr(this.position)) if (this.position.indexOf("atf") > -1) b = "atf";
        else {
            if (this.position.indexOf("btf") > -1) b = "btf"
        } else if (this.isStr(this.positionThreshold)) b = this.tile <= this.positionThreshold ? "atf" : "btf";
        return b
    },
    getKeyValue: function (b) {
        var c;
        if (this.keyValues.indexOf(b) > -1) {
            b = this.keyValues.split(b);
            if (b.length > 0) if (b[1].indexOf(";") > -1) c = b[1].substring(0, b[1].indexOf(";"));
            else c = b[1]
        }
        return c
    },
    getSections: function () {
        return this.sections
    },
    getContentTypeAbbreviation: function () {
        var b = "";
        if (this.contentType == "pfadx") b = "p";
        if (this.contentType == "adj") b = "j";
        if (this.contentType == "adi") b = "i";
        if (this.contentType == "adx") b = "x";
        if (this.contentType == "ad") b = "a";
        return b
    },
    getExclusions: function () {
        return this.exclusions.join(";")
    },
    isValidDcopt: function (b) {
        var c = false;
        if (this.isStr(b)) for (var d = 0, e = btg.globalvars.VALID_DCOPT.length; d < e; d++) if (b == btg.globalvars.VALID_DCOPT[d]) {
            c = true;
            break
        }
        return c
    },
    formatReserved: function () {
        for (var b = this.keyValues, c = ["dcmt", "dcopt", "dcove"], d = 0, e = c.length; d < e; d++) if (b.indexOf(c[d] + "=") > -1) {
            for (var f = this.getKeyValue(c[d] + "="), b = b.split(c[d] + "=" + f), g = 0, e = b.length; g < e; g++) b[g] = b[g].replace(/^;+|;+$/g, "");
            if (c[d] == "dcopt" && this.isValidDcopt(f) != true) {
                this.keyValues = b.join(";");
                return this.formatReserved()
            }
            this.reservedKeyValues[c[d]] = f;
            b = b.join(";")
        }
        if (b.lastIndexOf(";") == b.length - 1) b = b.substring(0, b.length - 1);
        return b
    },
    getAdditionalKeyValues: function () {
        return this.additionalKeyValues.join(";")
    },
    applyTestbedValues: function () {
        var b = btg.Cookie.read("mtvn_btg_atb");
        if (b != null && b.indexOf("daDart:") >= 0) {
            b = b.split(",")[0].split(":")[1];
            this.dartSite = b == "auto" ? this.dartSite = "atb_" + this.dartSite : b
        }
    },
    getValues: function () {
        this.applyTestbedValues();
        var b = this.isStr(this.zoneOverride) ? this.zoneOverride : this.formatZone(),
            c = this.formatKeyValues(),
            d = this.formatSectionValues();
        return {
            id: this.id,
            protocol: this.getProtocol(),
            server: this.server,
            dartSite: this.dartSite,
            contentType: this.contentType,
            mediaType: this.mediaType,
            zone: b,
            sections: d,
            keyValues: c,
            ord: this.ord
        }
    },
    getRealWidth: function () {
        return this.realSize.substr(0, this.realSize.indexOf("x"))
    },
    getRealHeight: function () {
        return this.realSize.substr(this.realSize.indexOf("x") + 1, this.realSize.length)
    },
    getWidth: function () {
        return this.size.substr(0, this.size.indexOf("x"))
    },
    getHeight: function () {
        return this.size.substr(this.size.indexOf("x") + 1, this.size.length)
    },
    getUrl: function () {
        return this.formatUrl(this.getValues())
    },
    getJson: function () {
        var b = this.getValues();
        b.url = this.formatUrl(b);
        return b
    },
    getXml: function () {
        var b = [],
            c = this.getValues();
        c.url = this.formatUrl(c);
        for (var d in c) if (typeof (c[d] == "string")) b.push("<" + d + ">" + "</" + c[d] + ">");
        return "<DoubleClick>" + b.join("") + "</DoubleClick>"
    },
    init: function (b) {
        if (typeof b === "object") {
            if (this.isStr(b.zoneOverride)) this.setZoneOverride(b.zoneOverride);
            if (this.isStr(b.id)) this.setId(b.id);
            if (this.isStr(b.server)) this.setServer(b.server);
            if (this.isStr(b.ssl)) this.setSsl(b.ssl);
            if (this.isStr(b.dartSite)) this.setDartSite(b.dartSite);
            if (this.isStr(b.contentType)) this.setContentType(b.contentType);
            if (this.isStr(b.mediaType)) this.setMediaType(b.mediaType);
            if (this.isStr(b.position)) this.setPosition(b.position);
            if (this.isStr(b.sections)) this.setSections(b.sections);
            if (this.isStr(b.keyValues)) this.setKeyValues(b.keyValues);
            if (this.isStr(b.size)) this.setSize(b.size);
            else this.setSize("[ERROR: Size Not Defined!]");
            if (this.isStr(b.realSize)) this.setRealSize(b.realSize);
            else this.setRealSize(this.size);
            if (this.isStr(b.tile)) this.setTile(b.tile);
            if (this.isStr(b.positionThreshold)) this.setPositionThreshold(b.positionThreshold);
            if (this.isStr(b.ord)) this.setOrd(b.ord);
            if (this.isStr(b.partner)) this.setPartner(b.partner)
        }
    },
    createIframe: function (b) {
        var c = document.getElementById(props.adId),
            d = null;
        if (c) {
            b.frameBorder = 0;
            b.marginHeight = 0;
            b.marginWidth = 0;
            b.scrolling = "no";
            b.onload = function () {
                btg.AdManager.adLoadNotify(this.id)
            };
            b.parent = c;
            b.style = {
                height: b.height + "px",
                width: b.width + "px",
                borderWidth: 0,
                overflow: "hidden"
            };
            if (this.gv.IS_TOP_ACCESSIBLE && this.qsToObj(top.location.search).mockupMode == "true") {
                b.parent = document.createElement("div");
                d = btg.DOM.appendIframe(b);
                c.innerHTML = this.mockItUp(d.parentNode.innerHTML)
            } else d = btg.DOM.appendIframe(b);
            d.setAttribute("allowtransparency", true)
        }
    }
};
btg.DomesticDc = function () {
    this.type = "DomesticDc"
};
btg.DomesticDc.prototype = {
    formatSectionValues: function () {
        try {
            var b = this.sections.split("/")
        } catch (c) {
            b = ["[ERROR: Sections Not Defined!]"]
        }
        for (var d = 0, e = [], f = 0, g = b.length; f < g; f++) if (btg.String.isDefined(b[f])) {
            e.push("sec" + d + "=" + b[f]);
            d++
        }
        return e.join(";")
    },
    formatZone: function () {
        var b = this.getPosition() + "_" + this.getContentTypeAbbreviation() + "_" + this.mediaType.substr(0, 1) + "/",
            c = this.getSections();
        if (this.isStr(this.keyValues)) {
            if (this.keyValues.indexOf("partner=") > -1) {
                var d = this.getKeyValue("partner=");
                if (this.isStr(d) && d != "null") {
                    b += d + "/";
                    this.addExclusionCategory(d);
                    this.addExclusionCategory("partner")
                } else this.keyValues = this.keyValues.replace(/(partner=;)|partner=$/ig, "partner=null;")
            }
            if (this.keyValues.indexOf("vertical=") > -1) {
                d = this.getKeyValue("vertical=");
                if (this.isStr(d)) {
                    c = d + "/" + c;
                    this.setSections(c)
                }
            }
            if (this.keyValues.indexOf("synd=") > -1) {
                d = this.getKeyValue("synd=");
                if (this.isStr(d)) this.addExclusionCategory(d)
            }
        }
        b = b.replace(/^\d/, "_" + b.match(/^\d/, "_"));
        return b + c
    },
    setDemoVal: function () {
        var b = btg.Cookie.read("qcDemo");
        if ((typeof btg.config != "undefined" && typeof btg.config.QuantCast != "undefined" && typeof btg.config.QuantCast.enableDemoTargeting == "boolean" ? btg.config.QuantCast.enableDemoTargeting : true) && this.isStr(b) && this.keyValues.indexOf("demo=D") == -1) this.keyValues += ";" + unescape(b)
    },
    formatKeyValues: function () {
        var b = this.getAdditionalKeyValues();
        if (this.isStr(b)) this.keyValues += ";" + b;
        if (this.keyValues.indexOf("pos=") == -1) this.keyValues += ";pos=" + this.getPosition();
        if (this.keyValues.indexOf("tag=") == -1) this.keyValues += ";tag=" + this.contentType;
        if (this.keyValues.indexOf("mtype=") == -1) this.keyValues += ";mtype=" + this.mediaType;
        if (this.autoDcopt) {
            this.removeKeyValue("dcopt");
            if (this.tile == "1") this.keyValues += ";dcopt=ist"
        }
        this.keyValues = this.formatReserved();
        if (this.isStr(this.size) && this.keyValues.indexOf("sz=") == -1) this.keyValues += ";sz=" + this.size;
        if (this.tile >= 0 && this.keyValues.indexOf("tile=") == -1) this.keyValues += ";tile=" + this.tile;
        this.setDemoVal();
        if (this.isStr(this.reservedKeyValues.dcmt)) this.keyValues += ";dcmt=" + this.reservedKeyValues.dcmt;
        if (this.isStr(this.reservedKeyValues.dcopt)) {
            this.removeKeyValue("dcopt");
            this.keyValues += ";dcopt=" + this.reservedKeyValues.dcopt
        }
        if (this.keyValues.indexOf(this.getExclusions()) == -1 && this.exclusions.length > 0) this.keyValues += ";" + this.getExclusions();
        if (this.isStr(this.reservedKeyValues.dcove)) this.keyValues += ";dcove=" + this.reservedKeyValues.dcove;
        if (this.gv.IS_TOP_ACCESSIBLE) {
            b = this.qsToObj(top.location.search.toLowerCase()).testmode;
            if (this.isStr(b) && this.keyValues.toLowerCase().indexOf("testmode") < 0) this.keyValues += ";testmode=" + b
        }
        return this.keyValues = this.keyValues.replace(/^;+|;+$/g, "")
    },
    placeAd: function (b) {
        if (!this.isStr(this.id)) this.setId("ad" + this.tile);
        if (btg.config.defferedAdLoading) this.createIframe({
            allowtransparency: "true",
            id: this.id,
            name: this.id,
            width: this.getRealWidth(),
            height: this.getRealHeight(),
            src: this.getUrl(),
            adType: this.contentType,
            adId: b.adId
        });
        else if (this.contentType == "adi") {
            var c = "<ifr" + 'ame allowtransparency="true" onload="btg.AdManager.adLoadNotify(\'' + this.id + '\');" id="' + this.id + '" name="' + this.id + '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="' + this.getRealWidth() + '" height="' + this.getRealHeight() + '" src="' + this.getUrl() + '"></ifr' + "ame>";
            if (this.gv.IS_TOP_ACCESSIBLE && this.qsToObj(top.location.search).mockupMode == "true") c = this.mockItUp(c);
            if (this.isStr(b) && this.isStr(b.reloadableAdId)) return c;
            else if (typeof exposeTestFunctionNames == "undefined") document.write(c)
        } else {
            c = "<scr" + 'ipt type="text/javascript" id="' + this.id + "\" onreadystatechange=\"if(this.readyState=='complete')btg.AdManager.adLoadNotify('" + this.id + "');\" onload=\"btg.AdManager.adLoadNotify('" + this.id + '\');" src="' + this.getUrl() + '"></scr' + "ipt>";
            if (this.gv.IS_TOP_ACCESSIBLE && this.qsToObj(top.location.search).mockupMode == "true") c = this.mockItUp(c);
            if (this.isStr(b) && this.isStr(b.reloadableAdId)) return c;
            else if (typeof exposeTestFunctionNames == "undefined") document.write(c)
        }
    }
};
btg.DomesticDc = btg.Class.inheritFrom(btg.DoubleClick, btg.DomesticDc);
btg.InternationalDc = function () {
    this.type = "InternationalDc"
};
btg.InternationalDc.prototype = {
    formatSectionValues: function () {
        var b = this.sections.split("/"),
            c = "none",
            d = "none",
            e = "none",
            f = [];
        if (this.isStr(b[0])) c = b[0];
        else c = "/";
        if (this.isStr(b[1])) d = b[1];
        if (this.isStr(b[2])) {
            for (var e = 2, g = b.length; e < g; e++) if (this.isStr(b[e])) f.push(b[e]);
            e = f.join("/")
        }
        return "sec0=" + c + ";sec1=" + d + ";secN=" + e
    },
    formatZone: function () {
        var b = this.sections.split("/");
        if (this.isStr(b[0])) b = b[0];
        else b = "/home";
        return b
    },
    formatKeyValues: function () {
        var b = btg.AdManager,
            c = this.getAdditionalKeyValues();

        // EDITED - Changed to check if additonal key values have been set, if so they are not set again // 
        if (this.keyValues.indexOf("log") == -1) {
            if (this.isStr(c)) this.keyValues += ";" + c;
        };
        this.keyValues = this.formatReserved();
        if (this.isStr(this.size) && this.keyValues.indexOf("sz=") == -1) this.keyValues += ";sz=" + this.size;
        if (this.tile >= 0 && this.keyValues.indexOf("tile=") == -1) this.keyValues += ";tile=" + this.tile;
        if (this.isStr(this.reservedKeyValues.dcmt)) this.keyValues += ";dcmt=" + this.reservedKeyValues.dcmt;
        if (this.autoDcopt && this.tile == "1") {
            this.keyValues += ";dcopt=ist";
            b.dcoptOn = true
        }
        if (this.isStr(this.reservedKeyValues.dcopt)) if (b.dcoptOn) {
            if (this.tile != "1" && this.isDevEnv) this.keyValues += ";[ERROR: attempt to set dcopt value more than once per page!]"
        } else {
            this.keyValues += ";dcopt=" + this.reservedKeyValues.dcopt;
            b.dcoptOn = true
        }
        if (this.exclusions.length > 0) this.keyValues += ";" + this.getExclusions();
        if (this.isStr(this.reservedKeyValues.dcove)) this.keyValues += ";dcove=" + this.reservedKeyValues.dcove;
        if (this.gv.IS_TOP_ACCESSIBLE) {
            b = this.qsToObj(top.location.search.toLowerCase()).testmode;
            if (this.isStr(b) && this.keyValues.toLowerCase().indexOf("testmode") < 0) this.keyValues += ";testmode=" + b
        }
        return this.keyValues = this.keyValues.replace(/^;+|;+$/g, "")

    },
    addInternationalValues: function (b) {
        if (this.isStr(b.log)) this.addKeyValues("log=" + b.log);
        else this.addKeyValues("log=0");
        if (this.isStr(b.demo)) this.addKeyValues("demo=" + b.demo);
        else this.addKeyValues("demo=none");
        if (this.isStr(b.event)) this.addKeyValues("event=" + b.event);
        else this.addKeyValues("event=none");
        if (this.isStr(b.keyword)) this.addKeyValues("search_kw=" + b.keyword);
        else this.addKeyValues("search_kw=none");
        if (this.isStr(b.vid)) this.addKeyValues("vid=" + b.vid);
        else this.addKeyValues("vid=none");
        if (this.isStr(b.vid_type)) this.addKeyValues("vid_type=" + b.vid_type);
        else this.addKeyValues("vid_type=none");
        if (this.isStr(b.region)) this.addKeyValues("region=" + b.region);
        else this.addKeyValues("region=none");
        this.addKeyValues("dcove=d");
        this.addKeyValues("url=" + escape(location.pathname));
        if (this.isStr(b.keyValues)) this.addKeyValues(b.keyValues)
    },
    placeAd: function (b) {

        this.addInternationalValues(b);
        if (!this.isStr(this.id)) this.setId("ad" + this.tile);
        if (btg.config.defferedAdLoading) this.createIframe({
            allowtransparency: "true",
            id: this.id,
            name: this.id,
            width: this.getRealWidth(),
            height: this.getRealHeight(),
            src: this.getUrl(),
            adType: this.contentType,
            adId: b.adId
        });
        else if (this.contentType == "adi") {
            var c = "<ifr" + 'ame allowtransparency="true" onload="btg.AdManager.adLoadNotify(\'' + this.id + '\');" id="' + this.id + '" name="' + this.id + '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="' + this.getRealWidth() + '" height="' + this.getRealHeight() + '" src="' + this.getUrl() + '"></ifr' + "ame>";
            if (this.gv.IS_TOP_ACCESSIBLE && this.qsToObj(top.location.search).mockupMode == "true") c = this.mockItUp(c);
            if (this.isStr(b) && this.isStr(b.reloadableAdId)) return c;
            else if (typeof exposeTestFunctionNames == "undefined") document.write(c)
        } else {
            c = "<scr" + 'ipt type="text/javascript" id="' + this.id + "\" onreadystatechange=\"if(this.readyState=='complete')btg.AdManager.adLoadNotify('" + this.id + "');\" onload=\"btg.AdManager.adLoadNotify('" + this.id + '\');" src="' + this.getUrl() + '"></scr' + "ipt>";
            if (this.gv.IS_TOP_ACCESSIBLE && this.qsToObj(top.location.search).mockupMode == "true") c = this.mockItUp(c);
            if (this.isStr(b) && this.isStr(b.reloadableAdId)) return c;
            else if (typeof exposeTestFunctionNames == "undefined") document.write(c)
        }
    }
};
btg.InternationalDc = btg.Class.inheritFrom(btg.DoubleClick, btg.InternationalDc);
if (typeof mtvn == "undefined") mtvn = {};
mtvn.btg = {
    Controller: btg.Controller,
    managers: {
        DependencyManager: btg.DependencyManager,
        PluginManager: btg.PluginManager,
        QueueManager: btg.QueueManager
    },
    ads: {
        AdManager: btg.AdManager,
        games: {
            GameAdLoader: btg.GameAdLoader,
            GameAdManager: btg.GameAdManager,
            GameDc: btg.GameDc
        },
        freewheel: {
            FreeWheelAd: btg.FreeWheelAd,
            FreeWheelAdInterface: btg.FreeWheelAdInterface
        }
    },
    reporting: {
        ABTest: btg.ABTest,
        ChoiceStream: btg.ChoiceStream,
        ComScore: btg.ComScore,
        ESIVars: btg.ESIVars,
        FluxHosted: btg.FluxHosted,
        FluxState: btg.FluxState,
        GoogleAnalytics: btg.GoogleAnalytics,
        Nielsen: btg.Nielsen,
        Omniture: btg.Omniture,
        Photos: btg.Photos,
        QuantCast: btg.QuantCast,
        RecsABTesting: btg.RecsABTesting,
        ReportingManager: btg.ReportingManager,
        Search: btg.Search,
        SEO: btg.SEO,
        TestAndTarget: btg.TestAndTarget,
        UserSegment: btg.UserSegment,
        Demdex: btg.Demdex,
        omniture: {
            Hcode: btg.Hcode
        },
        player: {
            Loadtime: btg.Loadtime,
            MediaPlayer: btg.MediaPlayer,
            Preload: btg.Preload
        },
        games: {
            GameEventMediator: btg.GameEventMediator,
            GameEventVO: btg.GameEventVO,
            GameReporter: btg.GameReporter,
            GameReportingManager: btg.GameReportingManager
        }
    },
    util: {
        Alert: btg.Alert,
        Beacon: btg.Beacon,
        Class: btg.Class,
        Cookie: btg.Cookie,
        DOM: btg.DOM,
        Events: btg.Events,
        JSON: btg.JSON,
        Math: btg.Math,
        Object: btg.Object,
        String: btg.String,
        Timer: btg.Timer,
        TimeTracker: btg.TimeTracker,
        Window: btg.Window
    },
    plugins: {
        GUID: btg.GUID,
        Meteor: btg.Meteor
    }
};
if (typeof mtvn.btg.config == "undefined") mtvn.btg.config = {};
if (typeof mtvn.btg.config.ReportSettings == "undefined") mtvn.btg.config.ReportSettings = {
    defaultPageName: btg.globalvars.PAGE_URL,
    Omniture: {},
    Nielsen: {},
    GoogleAnalytics: {},
    QuantCast: {},
    ComScore: {},
    Meteor: {},
    ChoiceStream: {},
    Demdex: {}
};
if (typeof mtvn.btg.config.AdSettings == "undefined") mtvn.btg.config.AdSettings = {
    DoubleClick: {},
    International: {},
    QuantCast: {}
};
if (typeof com == "undefined") com = {};
if (typeof com.mtvi == "undefined") com.mtvi = {};
if (typeof com.mtvi.reporting == "undefined") com.mtvi.reporting = {};
if (typeof com.mtvi.ads == "undefined") com.mtvi.ads = {};
if (typeof com.mtvi.config == "undefined") com.mtvi.config = {};
if (typeof com.mtvi.util == "undefined") com.mtvi.util = {};
if (typeof com.mtvi.util.IFrameReloader == "undefined") com.mtvi.util.IFrameReloader = {};
if (typeof com.mtvi.metadata == "undefined") com.mtvi.metadata = {};
com.mtvi.util = {
    toObject: btg.String.toObject,
    queryStringToHash: btg.String.queryStringToObject,
    isDefined: btg.String.isDefined,
    readCookie: btg.Cookie.read,
    deleteCookie: btg.Cookie.remove,
    crawlNodes: btg.Window.getNodeLinkName,
    addOnloadEvent: function (b) {
        return btg.DOM.Events.addListener(window, "load", b)
    }
};
com.mtvi.metadata = {
    getDefaultPageName: function () {
        var b = "",
            c = btg.globalvars;
        try {
            b = c && typeof c.PAGE_URL == "string" && c.PAGE_URL != "" ? c.PAGE_URL : location.pathname;
            if (b.lastIndexOf("/") == b.length - 1) if (mtvn.btg.util.String.isDefined(mtvn.btg.config.ReportSettings.indexFileName)) b += mtvn.btg.config.ReportSettings.indexFileName;
            else b = b != "/" ? mtvn.btg.util.String.charRtrim(b, "/") : b;
            if (b != "/") b = mtvn.btg.util.String.charRtrim(b, "/");
            if (b != "/" && b.indexOf("/") == 0) b = b.substring(1);
            if (b.indexOf("/") == -1 && b.indexOf(mtvn.btg.config.ReportSettings.indexFileName) != -1) b = "home/" + b
        } catch (d) { }
        return b
    },
    getDefaultHierarchy: function () {
        var b = this.getDefaultPageName();
        return b == "/" ? "" : b
    },
    getDefaultChannel: function () {
        var b = this.getDefaultPageName();
        return b != "/" ? b.split("/")[0] : b
    }
};
com.mtvi.reporting.Controller = new function () {
    this.initalized = false;
    this.initialize = function () {
        btg.Controller.init()
    };
    this.sendCall = function (b) {
        btg.Controller.sendPageCall(b)
    };
    this.sendLinkEvent = function (b) {
        btg.Controller.sendLinkEvent(b)
    };
    this.registerLinks = function () {
        return true
    };
    this.setConfig = function (b) {
        for (var c in b) btg.config.Omniture[c] = b[c];
        return true
    };
    this.addRegisterLinks = function () {
        return true
    };
    this.setDefaultData = function (b, c) {
        if (btg.String.isDefined(b)) {
            btg.config.Omniture[b] = btg.String.isDefined(c) ? c : "";
            return true
        }
        return false
    }
};
com.mtvi.ads.AdManager = new function () {
    var b = btg.config.DoubleClick,
        c = btg.config.International,
        d = btg.String.isDefined,
        e = btg.Object.isDefined;
    this.setDartSite = function (d) {
        (b.enabled ? b : c).dartSite = d
    };
    this.setPositionThreshold = function (d) {
        (b.enabled ? b : c).positionThreshold = d
    };
    this.setSiteName = function (d) {
        (b.enabled ? b : c).siteName = d
    };
    this.setDefaultSections = function (c) {
        if (d(c)) b.sections = c
    };
    this.setKeyValues = function (d) {
        (b.enabled ? b : c).keyValues = d
    };
    this.getFormattedSections = function (b) {
        var c = b;
        try {
            var c = b == "/" ? b : btg.String.charTrim(b, "/"),
                h = b.length,
                j = "index";
            if (e(com.mtvi.reporting.Account) && d(com.mtvi.reporting.Account.defaultIndexFileName)) j = com.mtvi.reporting.Account.defaultIndexFileName;
            if (e(mtvn.btg.config.AdSettings) && d(mtvn.btg.config.AdSettings.defaultIndexFileName)) j = mtvn.btg.config.AdSettings.defaultIndexFileName;
            if (e(btg.config) && d(btg.config.defaultIndexFileName)) j = btg.config.defaultIndexFileName;
            for (var j = btg.String.stripFileExtension(j), n = ["/", j, "home/" + j], l = 0, o = n.length; l < o; l++) if (b.indexOf(n[l]) == 0 && h == n[l].length) {
                c = b.replace(n[l], "_hp");
                break
            }
            if (c == "") c = "_hp";
            var p = btg.String.stripFileExtension(c).split("/");
            if (p.length == 2) if (p[1] == j) c = btg.String.stripFileExtension(c).replace(j, "_mn")
        } catch (u) { }
        return c
    };
    this.placeAd = function (b) {
        btg.Controller.placeAd(b)
    };
    this.setServer = function (d) {
        (b.enabled ? b : c).server = d
    };
    this.setSsl = function () {
        (b.enabled ? b : c).ssl = true
    };
    this.setDefaultContentType = function (d) {
        (b.enabled ? b : c).contentType = d
    };
    this.setZoneOverride = function (d) {
        (b.enabled ? b : c).zoneOverride = d
    };
    this.IFrameAds = [];
    this.placeIFrameAd = function (b) {
        b.isReloadable = true;
        btg.Controller.placeAd(b)
    };
    this.setReloadInterval = function (b) {
        btg.config.reloadInterval = b
    };
    this.setAdClass = function () { };
    this.getAdById = function () {
        return null
    };
    this.getDartSite = function () {
        return (b.enabled ? b : c).dartSite
    };
    this.getAd = function (b) {
        return btg.AdManager.getAd(b)
    };
    this.getReloadInterval = function () {
        return btg.config.reloadInterval
    };
    this.reloadIFrameAds = function () {
        btg.Controller.reloadAds()
    };
    this.reloadIFrameAd = function () { };
    this.setZone = function () { };
    this.getNewAd = function () { };
    this.populateNamesValuesObj = function () { }
};
com.mtvi.ads.DoubleClickAd = function () { };
com.mtvi.ads.DoubleClickAd.prototype = {
    setZoneOverride: function () { },
    setDartSite: function () { },
    setOrd: function () { },
    placeAd: function () { },
    getXml: function () {
        return null
    },
    getJson: function () {
        return null
    },
    getUrl: function () {
        return null
    },
    getSections: function () {
        return null
    },
    setSize: function () { },
    setSections: function () { },
    setContentType: function () { },
    setKeyValues: function () { },
    setTile: function () { },
    setPositionThreshold: function () { },
    setServer: function () { },
    setSsl: function () { },
    setMediaType: function () { },
    setPosition: function () { },
    setPartner: function () { },
    setId: function () { }
};
com.mtvi.reporting.ComScore = new function () {
    this.sendComScoreCall = function () { }
};
com.mtvi.reporting.Dispatcher = function () {
    this.getValOnce = function () {
        return true
    };
    this.sendCall = function (b) {
        btg.Controller.sendPageCall(b)
    };
    this.sendLinkEvent = function (b) {
        mtvn.btg.Controller.sendLinkEvent(b)
    };
    this.registerLinks = function () {
        return true
    };
    this.setAttribute = function (b, c) {
        if (btg.String.isDefined(b)) {
            btg.Hcode[b] = btg.String.isDefined(c) ? c : "";
            return true
        }
        return false
    };
    this.getAttribute = function (b) {
        return btg.config.Omniture[b]
    };
    this.setValues = function (b) {
        for (var c in b) if (btg.String.isDefined(b[c])) this.setAttribute(c, b[c])
    };
    this.send = function (b) {
        btg.Controller.sendPageCall(b)
    };
    this.setDefaultData = function () { };
    this.clearProps = function () { };
    this.clearAllVars = function () { }
};
com.mtvi.reporting.FluxWidgeted = {
    setVars: function () {
        return true
    }
};
com.mtvi.reporting.GoogleAnalytics = {
    makeCall: function () {
        (new btg.GoogleAnalytics(btg.GoogleAnalytics)).sendPageCall();
        return true
    }
};
com.mtvi.reporting.MediaPlayer = {
    addPlayer: btg.MediaPlayer.addPlayer
};
mtvn.btg.reporting.MediaPlayer = {
    setEndSlateClick: mtvn.btg.reporting.player.MediaPlayer.setEndSlateClick,
    getEndSlateClick: mtvn.btg.reporting.player.MediaPlayer.getEndSlateClick
};
com.mtvi.reporting.QuantCast = new function () {
    this.sendQuantCastCall = function () {
        (new btg.QuantCast(btg.config.QuantCast)).sendPageCall();
        return true
    }
};
com.mtvi.reporting.Search = btg.Search;
com.mtvi.reporting.Search.setVars = btg.Search.setData;
btg.loadPOEad = function () {
    if (btg.Object.isConfigDefined(btg.config.DoubleClick) && btg.Cookie.read("vmn_poe") == null) {
        var b = btg.config.DoubleClick.positionThreshold;
        btg.config.DoubleClick.positionThreshold = -1;
        var c = btg.AdManager.getAdUrl({
            size: "6x6",
            contentType: "adj"
        });
        btg.DOM.loadScript(c, true);
        btg.config.DoubleClick.positionThreshold = b;
        btg.AdManager.setTile(0);
        btg.Cookie.set("vmn_poe", "6x6")
    }
};
btg.isCoreLoaded = function () {
    btg.Events.CORE_LOADED.fire();
    btg.loadPOEad();
    return true
} ();
