; (function (window, document, undefined) { var a; mti = {}; mti.bind = function (b, c) { var d = arguments.length > 2 ? Array.prototype.slice.call(arguments, 2) : []; return function () { d.push.apply(d, arguments); return c.apply(b, d) } }; mti.DomHelper = function (b, c) { this.document_ = b; this.userAgent_ = c }; mti.DomHelper.prototype.createElement = function (b, c, d) { b = this.document_.createElement(b); if (c) for (var e in c) if (c.hasOwnProperty(e)) if (e == "style" && this.userAgent_.getName() == "MSIE") b.style.cssText = c[e]; else b.setAttribute(e, c[e]); d && b.appendChild(this.document_.createTextNode(d)); return b }; mti.DomHelper.prototype.insertInto = function (b, c) { b = this.document_.getElementsByTagName(b)[0]; if (!b) b = document.documentElement; if (b && b.lastChild) { b.insertBefore(c, b.lastChild); return true } return false }; mti.DomHelper.prototype.whenBodyExists = function (b) { var c = function () { document.body ? b() : setTimeout(c, 0) }; c() }; mti.DomHelper.contentAlreadyReady = false; a = mti.DomHelper.prototype; a.whenContentLoaded = function (b) { if (mti.DomHelper.contentAlreadyReady === true) b(); else if (this.userAgent_.getName() == "MSIE") { var c = this.document_, d = false, e = function () { if (!d) { d = true; b(); mti.DomHelper.contentAlreadyReady = true } }; (function () { try { c.documentElement.doScroll("left"); if (c.readyState != "complete") { setTimeout(arguments.callee, 50); return } } catch (f) { setTimeout(arguments.callee, 50); return } e() })(); c.onreadystatechange = function () { if (c.readyState == "complete") { c.onreadystatechange = null; e() } } } else if (this.userAgent_.getEngine() == "AppleWebKit" && this.userAgent_.getEngineVersion() < 525) (function () { if (["loaded", "complete"].indexOf(this.document_.readyState) > -1) { b(); mti.DomHelper.contentAlreadyReady = true } else setTimeout(arguments.callee, 50) })(); else if (this.document_.addEventListener) this.document_.addEventListener("DOMContentLoaded", function () { b(); mti.DomHelper.contentAlreadyReady = true }, false); else window.onload = function () { b(); mti.DomHelper.contentAlreadyReady = true } }; a.removeElement = function (b) { if (b.parentNode) { b.parentNode.removeChild(b); return true } return false }; a.createCssLink = function (b) { return this.createElement("link", { rel: "stylesheet", href: b }) }; a.createScriptSrc = function (b) { return this.createElement("script", { src: b }) }; a.appendClassName = function (b, c) { for (var d = b.className.split(/\s+/), e = 0, f = d.length; e < f; e++) if (d[e] == c) return; d.push(c); b.className = d.join(" ").replace(/^\s+/, "") }; a.removeClassName = function (b, c) { for (var d = b.className.split(/\s+/), e = [], f = 0, g = d.length; f < g; f++) d[f] != c && e.push(d[f]); b.className = e.join(" ").replace(/^\s+/, "").replace(/\s+$/, "") }; a.getComputedFontFamily = function (b) { if (typeof b != "undefined") if (b != null) return typeof b.currentStyle != "undefined" ? b.currentStyle.fontFamily : this.document_.defaultView.getComputedStyle(b, null).getPropertyValue("font-family"); return "" }; a.getComputedVisibility = function (b) { if (b) return typeof b.currentStyle != "undefined" ? b.currentStyle.visibility : this.document_.defaultView.getComputedStyle(b, null).getPropertyValue("visibility") }; a.getText = function (b) { var c = ""; b = b.childNodes || b; for (var d = 0; d < b.length; d++) if (b[d].nodeType != 8) c += b[d].nodeType != 1 ? b[d].nodeValue : this.getText(b[d].childNodes); return c }; a.getElementById = function (b) { return this.document_.getElementById(b) }; a.replaceFontFamily = function (b, c, d) { newFamilyVal = []; currFamily = b.style.fontFamily; currFamilyVal = currFamily.split(","); for (i = 0; i < d.length; i++) d[i] != "" && newFamilyVal.push(d[i]); for (j = 0; j < currFamilyVal.length; j++) currFamilyVal[j] != "" && newFamilyVal.push(currFamilyVal[j]); b.style.fontFamily = "" + newFamilyVal; return b.style.fontFamily }; a.isDescendant = function (b, c) { for (c = c.parentNode; c != null; ) { if (c == b) return true; c = c.parentNode } return false }; a.walkTheDOM = function (b, c) { c(b); for (b = b.firstChild; b; ) { this.walkTheDOM(b, c); b = b.nextSibling } }; a.getElementsByClassName = function (b) { if (document.getElementsByClassName) return document.getElementsByClassName(b); else { var c = []; this.walkTheDOM(document.body, function (d) { var e; e = d.className; var f; if (e) { e = e.split(" "); for (f = 0; f < e.length; f++) if (e[f] === b) { c.push(d); break } } }); return c } }; a.removeMTIElement = function (b) { var c = this.getElementsByClassName(b), d = this.userAgent_.getName(); d = d.toLowerCase(); var e = this.userAgent_.getVersion(); d = d == "msie" && e < 8 ? true : false; for (e = new RegExp(b, "ig"); c.length > 0; ) { for (i = 0; i < c.length; i++) if (c[i].className.split(" ").length == 1 && !d) c[i].removeAttribute("class"); else c[i].className = c[i].className.replace(e, " ").replace(/^\s+|\s+$/g, ""); c = this.getElementsByClassName(b) } }; mti.UserAgent = function (b, c, d, e, f, g) { this.name_ = b; this.version_ = c; this.engine_ = d; this.engineVersion_ = e; this.platform_ = f; this.webFontSupport_ = g }; a = mti.UserAgent.prototype; a.getName = function () { return this.name_ }; a.getVersion = function () { return this.version_ }; a.getEngine = function () { return this.engine_ }; a.getEngineVersion = function () { return this.engineVersion_ }; a.getPlatform = function () { return this.platform_ }; a.isSupportingWebFont = function () { return this.webFontSupport_ }; mti.UserAgentParser = function (b) { this.userAgent_ = b }; mti.UserAgentParser.UNKNOWN = "Unknown"; mti.UserAgentParser.UNKNOWN_USER_AGENT = new mti.UserAgent(mti.UserAgentParser.UNKNOWN, mti.UserAgentParser.UNKNOWN, mti.UserAgentParser.UNKNOWN, false); a = mti.UserAgentParser.prototype; a.parse = function () { return this.isIe_() ? this.parseIeUserAgentString_() : this.isOpera_() ? this.parseOperaUserAgentString_() : this.isWebKit_() ? this.parseWebKitUserAgentString_() : this.isGecko_() ? this.parseGeckoUserAgentString_() : mti.UserAgentParser.UNKNOWN_USER_AGENT }; a.getPlatform_ = function () { var b = this.getFirstMatchingGroup_(this.userAgent_, /(iPod|iPad|iPhone|Android)/); if (b != "") return b; b = this.getFirstMatchingGroup_(this.userAgent_, /(Linux|Mac_PowerPC|Macintosh|Windows)/); if (b != "") { if (b == "Mac_PowerPC") b = "Macintosh"; return b } return mti.UserAgentParser.UNKNOWN }; a.isIe_ = function () { return this.userAgent_.indexOf("MSIE") != -1 }; a.parseIeUserAgentString_ = function () { var b = this.getFirstMatchingGroup_(this.userAgent_, /(MSIE [\d\w\.]+)/); if (b != "") { var c = b.split(" "); b = c[0]; c = c[1]; return new mti.UserAgent(b, c, b, c, this.getPlatform_(), this.getMajorVersion_(c) >= 6) } return new mti.UserAgent("MSIE", mti.UserAgentParser.UNKNOWN, "MSIE", mti.UserAgentParser.UNKNOWN, this.getPlatform_(), false) }; a.isOpera_ = function () { return this.userAgent_.indexOf("Opera") != -1 }; a.parseOperaUserAgentString_ = function () { var b = mti.UserAgentParser.UNKNOWN, c = mti.UserAgentParser.UNKNOWN, d = this.getFirstMatchingGroup_(this.userAgent_, /(Presto\/[\d\w\.]+)/); if (d != "") { c = d.split("/"); b = c[0]; c = c[1] } else { if (this.userAgent_.indexOf("Gecko") != -1) b = "Gecko"; d = this.getFirstMatchingGroup_(this.userAgent_, /rv:([^\)]+)/); if (d != "") c = d } if (this.userAgent_.indexOf("Version/") != -1) { d = this.getFirstMatchingGroup_(this.userAgent_, /Version\/([\d\.]+)/); if (d != "") return new mti.UserAgent("Opera", d, b, c, this.getPlatform_(), this.getMajorVersion_(d) >= 10) } d = this.getFirstMatchingGroup_(this.userAgent_, /Opera[\/ ]([\d\.]+)/); if (d != "") return new mti.UserAgent("Opera", d, b, c, this.getPlatform_(), this.getMajorVersion_(d) >= 10); return new mti.UserAgent("Opera", mti.UserAgentParser.UNKNOWN, b, c, this.getPlatform_(), false) }; a.isWebKit_ = function () { return this.userAgent_.indexOf("AppleWebKit") != -1 }; a.parseWebKitUserAgentString_ = function () { var b = this.getPlatform_(), c = this.getFirstMatchingGroup_(this.userAgent_, /AppleWebKit\/([\d\.\+]+)/); if (c == "") c = mti.UserAgentParser.UNKNOWN; var d = mti.UserAgentParser.UNKNOWN; if (this.userAgent_.indexOf("Chrome") != -1) d = "Chrome"; else if (this.userAgent_.indexOf("Safari") != -1) d = "Safari"; var e = mti.UserAgentParser.UNKNOWN; if (this.userAgent_.indexOf("Version/") != -1) e = this.getFirstMatchingGroup_(this.userAgent_, /Version\/([\d\.\w]+)/); else if (d == "Chrome") e = this.getFirstMatchingGroup_(this.userAgent_, /Chrome\/([\d\.]+)/); var f = this.getFirstMatchingGroup_(c, /\d+\.(\d+)/); return new mti.UserAgent(d, e, "AppleWebKit", c, b, this.getMajorVersion_(c) >= 526 || this.getMajorVersion_(c) >= 525 && parseInt(f) >= 13) }; a.isGecko_ = function () { return this.userAgent_.indexOf("Gecko") != -1 }; a.parseGeckoUserAgentString_ = function () { var b = mti.UserAgentParser.UNKNOWN, c = mti.UserAgentParser.UNKNOWN, d = false; if (this.userAgent_.indexOf("Firefox") != -1) { b = "Firefox"; var e = this.getFirstMatchingGroup_(this.userAgent_, /Firefox\/([\d\w\.]+)/); if (e != "") { d = this.getFirstMatchingGroup_(e, /\d+\.(\d+)/); c = e; d = e != "" && this.getMajorVersion_(e) >= 3 && parseInt(d) >= 5 } } else if (this.userAgent_.indexOf("Mozilla") != -1) b = "Mozilla"; e = this.getFirstMatchingGroup_(this.userAgent_, /rv:([^\)]+)/); if (e == "") e = mti.UserAgentParser.UNKNOWN; else if (!d) { d = this.getMajorVersion_(e); var f = parseInt(this.getFirstMatchingGroup_(e, /\d+\.(\d+)/)), g = parseInt(this.getFirstMatchingGroup_(e, /\d+\.\d+\.(\d+)/)); d = d > 1 || d == 1 && f > 9 || d == 1 && f == 9 && g >= 2 || e.match(/1\.9\.1b[123]/) != null || e.match(/1\.9\.1\.[\d\.]+/) != null } return new mti.UserAgent(b, c, "Gecko", e, this.getPlatform_(), d) }; a.getMajorVersion_ = function (b) { b = this.getFirstMatchingGroup_(b, /(\d+)/); if (b != "") return parseInt(b); return -1 }; a.getFirstMatchingGroup_ = function (b, c) { if ((b = b.match(c)) && b[1]) return b[1]; return "" }; mti.EventDispatcher = function (b, c, d, e) { this.domHelper_ = b; this.htmlElement_ = c; this.callbacks_ = d; this.namespace_ = e || mti.EventDispatcher.DEFAULT_NAMESPACE; this.cssClassName_ = new mti.CssClassName("-") }; mti.EventDispatcher.DEFAULT_NAMESPACE = "mti"; mti.EventDispatcher.LOADING = "loading"; mti.EventDispatcher.ACTIVE = "active"; mti.EventDispatcher.INACTIVE = "inactive"; mti.EventDispatcher.FONT = "font"; a = mti.EventDispatcher.prototype; a.dispatchLoading = function () { this.domHelper_.appendClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, mti.EventDispatcher.LOADING)); this.dispatch_(mti.EventDispatcher.LOADING) }; a.dispatchFontLoading = function (b, c) { this.domHelper_.appendClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, b, c, mti.EventDispatcher.LOADING)); this.dispatch_(mti.EventDispatcher.FONT + mti.EventDispatcher.LOADING, b, c) }; a.dispatchFontActive = function (b, c) { this.domHelper_.appendClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, b, c, mti.EventDispatcher.ACTIVE)); this.dispatch_(mti.EventDispatcher.FONT + mti.EventDispatcher.ACTIVE, b, c); var d = this; setTimeout(function () { d.domHelper_.removeClassName(d.htmlElement_, d.cssClassName_.build(d.namespace_, b, c, mti.EventDispatcher.LOADING)) }, 500) }; a.dispatchFontInactive = function (b, c) { this.domHelper_.appendClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, b, c, mti.EventDispatcher.INACTIVE)); this.dispatch_(mti.EventDispatcher.FONT + mti.EventDispatcher.INACTIVE, b, c); var d = this; setTimeout(function () { d.domHelper_.removeClassName(d.htmlElement_, d.cssClassName_.build(d.namespace_, b, c, mti.EventDispatcher.LOADING)) }, 2E3) }; a.dispatchInactive = function () { this.domHelper_.appendClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, mti.EventDispatcher.INACTIVE)); this.domHelper_.removeClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, mti.EventDispatcher.LOADING)); setTimeout(function () { document.documentElement.className = document.documentElement.className.replace(/mti\-(.*?)loading/ig, "").replace(/^\s+|\s+$/g, "").replace(/\s+/g, " ") + " mti-repaint" }, 100); this.dispatch_(mti.EventDispatcher.INACTIVE) }; a.dispatchActive = function () { this.domHelper_.appendClassName(this.htmlElement_, this.cssClassName_.build(this.namespace_, mti.EventDispatcher.ACTIVE)); this.domHelper_.removeClassName(document.documentElement, this.cssClassName_.build(this.namespace_, mti.EventDispatcher.LOADING)); this.dispatch_(mti.EventDispatcher.ACTIVE); setTimeout(function () { document.documentElement.className = document.documentElement.className.replace(/mti\-(.*?)loading/ig, "").replace(/^\s+|\s+$/g, "").replace(/\s+/g, " ") + " mti-repaint" }, 100) }; a.dispatch_ = function (b, c, d) { this.callbacks_[b] && this.callbacks_[b](c, d) }; mti.FontModuleLoader = function () { this.modules_ = {} }; mti.FontModuleLoader.prototype.addModuleFactory = function (b, c) { this.modules_[b] = c }; mti.FontModuleLoader.prototype.getModules = function (b) { var c = []; for (var d in b) if (b.hasOwnProperty(d)) { var e = this.modules_[d]; e && c.push(e(b[d])) } return c }; mti.FontWatcher = function (b, c, d, e, f) { this.domHelper_ = b; this.eventDispatcher_ = c; this.fontSizer_ = d; this.asyncCall_ = e; this.getTime_ = f; this.currentlyWatched_ = 0; this.success_ = this.last_ = false; this.nameHelper_ = new mti.CssFontFamilyName; this.fvd_ = new mti.FontVariationDescription }; mti.FontWatcher.DEFAULT_FONT = "_,arial,helvetica"; mti.FontWatcher.DEFAULT_VARIATION = "n4"; a = mti.FontWatcher.prototype; a.watch = function (b, c, d) { for (var e = b.length, f = 0; f < e; f++) { var g = b[f]; c[g] || (c[g] = [mti.FontWatcher.DEFAULT_VARIATION]); this.currentlyWatched_ += c[g].length } if (d) this.last_ = d; for (f = 0; f < e; f++) { g = b[f]; d = c[g]; for (var h = 0, n = d.length; h < n; h++) { var m = d[h], l = this.getDefaultFontSize_(m); this.watch_(g, m, l) } } }; a.watch_ = function (b, c, d) { this.eventDispatcher_.dispatchFontLoading(b, c); var e = this.createHiddenElementWithFont_(this.nameHelper_.quote(b), c), f = this.fontSizer_.getWidth(e); if (d != f) { this.domHelper_.removeElement(e); this.eventDispatcher_.dispatchFontActive(b, c); this.success_ = true; this.decreaseCurrentlyWatched_() } else this.asyncCheck_(this.getTime_(), d, e, b, c) }; a.decreaseCurrentlyWatched_ = function () { if (--this.currentlyWatched_ == 0 && this.last_) this.success_ ? this.eventDispatcher_.dispatchActive() : this.eventDispatcher_.dispatchInactive() }; a.check_ = function (b, c, d, e, f) { var g = this.fontSizer_.getWidth(d); if (c != g) { this.domHelper_.removeElement(d); this.eventDispatcher_.dispatchFontActive(e, f); this.success_ = true; this.decreaseCurrentlyWatched_() } else if (this.getTime_() - b < mti.FontWatcherTimeout) this.asyncCheck_(b, c, d, e, f); else { this.domHelper_.removeElement(d); this.eventDispatcher_.dispatchFontInactive(e, f); this.decreaseCurrentlyWatched_() } }; a.asyncCheck_ = function (b, c, d, e, f) { this.asyncCall_(function (g, h) { return function () { h.call(g, b, c, d, e, f) } } (this, this.check_), 50) }; a.getDefaultFontSize_ = function (b) { b = this.createHiddenElementWithFont_(mti.FontWatcher.DEFAULT_FONT, b); var c = this.fontSizer_.getWidth(b); this.domHelper_.removeElement(b); return c }; a.createHiddenElementWithFont_ = function (b, c) { c = this.fvd_.expand(c); b = this.domHelper_.createElement("span", { style: "position:absolute;top:-999px;font-size:300px;font-family:" + b + "," + mti.FontWatcher.DEFAULT_FONT + ";" + c }, "Mm"); this.domHelper_.insertInto("body", b); return b }; mti.WebFont = function (b, c, d, e, f) { this.domHelper_ = b; this.fontModuleLoader_ = c; this.htmlElement_ = d; this.asyncCall_ = e; this.userAgent_ = f; this.moduleFailedLoading_ = this.moduleLoading_ = 0 }; a = mti.WebFont.prototype; a.addModule = function (b, c) { this.fontModuleLoader_.addModuleFactory(b, c) }; a.load = function (b) { var c = new mti.EventDispatcher(this.domHelper_, this.htmlElement_, b); this.userAgent_.isSupportingWebFont() ? this.load_(c, b) : c.dispatchInactive() }; a.isModuleSupportingUserAgent_ = function (b, c, d, e) { if (e) b.load(mti.bind(this, this.onModuleReady_, c, d)); else { b = --this.moduleLoading_ == 0; this.moduleFailedLoading_--; if (b) this.moduleFailedLoading_ == 0 ? c.dispatchInactive() : c.dispatchLoading(); d.watch([], {}, b) } }; a.onModuleReady_ = function (b, c, d, e) { var f = --this.moduleLoading_ == 0; f && b.dispatchLoading(); this.asyncCall_(mti.bind(this, function (g, h, n, m) { setTimeout(function () { g.watch(h, n || {}, m) }, 100) }, c, d, e, f)) }; a.load_ = function (b, c) { c = this.fontModuleLoader_.getModules(c); this.moduleFailedLoading_ = this.moduleLoading_ = c.length; for (var d = new mti.FontWatcher(this.domHelper_, b, { getWidth: function (h) { return h.offsetWidth } }, this.asyncCall_, function () { return (new Date).getTime() }), e = 0, f = c.length; e < f; e++) { var g = c[e]; g.supportUserAgent(this.userAgent_, mti.bind(this, this.isModuleSupportingUserAgent_, g, b, d)) } }; mti.CssClassName = function (b) { this.joinChar_ = b || mti.CssClassName.DEFAULT_JOIN_CHAR }; mti.CssClassName.DEFAULT_JOIN_CHAR = "-"; mti.CssClassName.prototype.sanitize = function (b) { return b.replace(/[\W_]+/g, "").toLowerCase() }; mti.CssClassName.prototype.build = function () { for (var b = [], c = 0; c < arguments.length; c++) b.push(this.sanitize(arguments[c])); return b.join(this.joinChar_) }; mti.CssFontFamilyName = function () { this.quote_ = '"' }; mti.CssFontFamilyName.prototype.quote = function (b) { var c = []; b = b.split(/,\s*/); for (var d = 0; d < b.length; d++) { var e = b[d].replace(/['"]/g, ""); e.indexOf(" ") == -1 ? c.push(e) : c.push(this.quote_ + e + this.quote_) } return c.join(",") }; mti.FontVariationDescription = function () { this.properties_ = mti.FontVariationDescription.PROPERTIES; this.values_ = mti.FontVariationDescription.VALUES }; mti.FontVariationDescription.PROPERTIES = ["font-style", "font-weight"]; mti.FontVariationDescription.VALUES = { "font-style": [["n", "normal"]], "font-weight": [["4", "normal"]] }; mti.FontVariationDescription.Item = function (b, c, d) { this.index_ = b; this.property_ = c; this.values_ = d }; mti.FontVariationDescription.Item.prototype.compact = function (b, c) { for (var d = 0; d < this.values_.length; d++) if (c == this.values_[d][1]) { b[this.index_] = this.values_[d][0]; return } }; mti.FontVariationDescription.Item.prototype.expand = function (b, c) { for (var d = 0; d < this.values_.length; d++) if (c == this.values_[d][0]) { b[this.index_] = this.property_ + ":" + this.values_[d][1]; return } }; mti.FontVariationDescription.prototype.compact = function (b) { var c = ["n", "4"]; b = b.split(";"); for (var d = 0, e = b.length; d < e; d++) { var f = b[d].replace(/\s+/g, "").split(":"); if (f.length == 2) { var g = f[1]; (f = this.getItem_(f[0])) && f.compact(c, g) } } return c.join("") }; mti.FontVariationDescription.prototype.expand = function (b) { if (b.length != 2) return null; for (var c = [null, null], d = 0, e = this.properties_.length; d < e; d++) { var f = this.properties_[d], g = b.substr(d, 1); (new mti.FontVariationDescription.Item(d, f, this.values_[f])).expand(c, g) } return c[0] && c[1] ? c.join(";") + ";" : null }; mti.FontVariationDescription.prototype.getItem_ = function (b) { for (var c = 0; c < this.properties_.length; c++) if (b == this.properties_[c]) return new mti.FontVariationDescription.Item(c, b, this.values_[b]); return null }; var globalName = "MonoTypeWebFonts"; window[globalName] = function () { var b = (new mti.UserAgentParser(navigator.userAgent)).parse(), c = new mti.DomHelper(document, b); return new mti.WebFont(c, new mti.FontModuleLoader, document.documentElement, function (d, e) { setTimeout(d, e) }, b) } (); window[globalName].load = window[globalName].load; window[globalName].addModule = window[globalName].addModule; var MTIConfig = window.MTIConfig || { isAsync: false, EnableCustomFOUTHandler: false, RemoveMTIClass: false }; mti.TextCollector = function (b, c, d) { this.root_ = b; this.domHelper_ = c; this.projectFontList_ = d; this.queryFontList_ = {}; this.elementCache_ = []; this.usedProjectFontList_ = [] }; a = mti.TextCollector.prototype; a.indexOf = function (b, c) { if (b.indexOf) return b.indexOf(c); else { for (var d = 0; d < b.length; d++) if (b[d] == c) return d; return -1 } }; a.getFontTexts = function (b, c) { var d = this.projectFontList_, e = this.domHelper_.getComputedFontFamily(b); e = (e || "").replace(/^\s|\s$/g, "").replace(/'|"/g, "").replace(/,\s*/g, "|"); if (e != "") { fontFamilies = e.split("|"); for (j = 0; j < fontFamilies.length; j++) { e = new RegExp("^(" + fontFamilies[j] + ")$", "ig"); for (i = 0; i < d.length; i++) { var f = d[i], g = f.fontfamily; if (e.test(g.replace(/^\s|\s$/g, ""))) { this.usedProjectFontList_.push(g.replace(/^\s|\s$/g, "")); if (MTIConfig.EnableCustomFOUTHandler == true) this.domHelper_.appendClassName(b, c ? "mti_font_element" + c : "mti_font_element"); this.elementCache_.push(b); if (f.enableSubsetting) if (this.queryFontList_[g.replace(/^\s|\s$/g, "")]) this.queryFontList_[g.replace(/^\s|\s$/g, "")] += this.domHelper_.getText(b); else this.queryFontList_[g.replace(/^\s|\s$/g, "")] = this.domHelper_.getText(b) } } } } }; a.getCollectedText = function (b, c) { b = "img,select,option,script,noscript,iframe,object,style,param,embed,link,meta,head,title,br,hr".split(","); var d = this.root_, e = null; do { e = d.firstChild; if (e == null) { if (d.nodeType == 1) if (this.indexOf(b, d.tagName.toLowerCase()) < 0) c ? this.getFontTexts(d, c) : this.getFontTexts(d); e = d.nextSibling } if (e == null) { d = d; do { e = d.parentNode; if (e == this.root_) { if (e.tagName.toLowerCase() != "body") if (this.indexOf(b, e.tagName.toLowerCase()) < 0) c ? this.getFontTexts(e, c) : this.getFontTexts(e); break } if (e != null) { if (e.nodeType == 1) if (this.indexOf(b, e.tagName.toLowerCase()) < 0) c ? this.getFontTexts(e, c) : this.getFontTexts(e); d = e; e = e.nextSibling } } while (e == null) } d = e } while (d != this.root_); c = false; for (p in this.queryFontList_) { c = true; break } if (c) return this.queryFontList_; return null }; a.getElements = function () { return this.elementCache_ }; a.getUsedProjectFonts = function () { return this.usedProjectFontList_ }; a.replaceFontFamily = function (b, c) { var d = "img,select,option,script,noscript,iframe,object,style,param,embed,link,meta,head,title,br,hr".split(","), e = this.root_, f = null; do { f = e.firstChild; if (f == null) { e.nodeType == 1 && this.indexOf(d, e.tagName.toLowerCase()) < 0 && this.getFontTexts(e); f = e.nextSibling } if (f == null) { e = e; do { f = e.parentNode; if (f == this.root_) break; f.nodeType == 1 && this.indexOf(d, f.tagName.toLowerCase()) < 0 && this.domHelper_.getComputedFontFamily(f).indexOf(b) > -1 && this.domHelper_.replaceFontFamily(f, b, c); e = f; f = f.nextSibling } while (f == null) } e = f } while (e != this.root_); b = false; for (p in this.queryFontList_) { b = true; break } if (b) return this.queryFontList_; return null }; mti.FontWatcherTimeout = 4E4; mti.MonotypeFontApi = function (b, c, d, e, f) { this.global_ = b; this.userAgent_ = c; this.domHelper_ = d; this.configuration_ = e; this.fontFamilies_ = []; this.fontVariations_ = {}; this.otfMain_ = f }; mti.MonotypeFontApi.NAME = "monotype"; a = mti.MonotypeFontApi.prototype; a.supportUserAgent = function (b, c) { var d = this, e = d.configuration_.projectId; if (e) { d.global_["__mti_fntLst" + e] = function () { return d.configuration_.pfL }; d.global_.mti_element_cache = []; d.appendDefinationStyleNode(); e = function () { var f = function () { n = new mti.TextCollector(document.body, d.domHelper_, d.configuration_.pfL); m = n.getCollectedText(); h && d.removeFakeFontFace(); for (fontfamily in m) m[fontfamily] = d.extractUniqueChars(m[fontfamily]); d.global_.mti_element_cache = n.elementCache_; d.appendFontFaceStyleNode(n.getUsedProjectFonts(), m); var l = n.getElements(); d.otfMain_ != null && mti.bind(d.otfMain_, d.otfMain_.load, l)(); for (var o = 0; o < l.length; o++) for (fontFamily in d.fontStack) d.domHelper_.getComputedFontFamily(l[o]).indexOf(fontFamily) > -1 && d.domHelper_.replaceFontFamily(l[o], fontFamily, d.fontStack[fontFamily]) }, g = d.userAgent_.getName(); g = g.toLowerCase(); var h = g == "opera" ? true : false; g = d.configuration_.reqSub; var n = null, m = null; if (h && g) { d.appendFakeFontFace(); d.whenFakeFontDetected(function () { f() }) } else if (!h && g) f(); else { n = new mti.TextCollector(document.body, d.domHelper_, d.configuration_.pfL); m = n.getCollectedText(); d.appendFontFaceStyleNode(n.getUsedProjectFonts()); d.global_.mti_element_cache = n.elementCache_; d.otfMain_ != null && mti.bind(d.otfMain_, d.otfMain_.load, n.elementCache_)() } c(b.isSupportingWebFont()) }; setTimeout(function () { document.documentElement.style.visibility = "" }, 750); if (MTIConfig.isAsync === true) MTIConfig.onReady = e; else d.configuration_.reqSub ? d.domHelper_.whenContentLoaded(e) : d.domHelper_.whenBodyExists(function () { var f = new mti.TextCollector(document.body, d.domHelper_, d.configuration_.pfL); f.getCollectedText(); d.appendFontFaceStyleNode(f.getUsedProjectFonts()); d.global_.mti_element_cache = f.elementCache_; d.otfMain_ != null && mti.bind(d.otfMain_, d.otfMain_.load, f.elementCache_)(); c(b.isSupportingWebFont()) }); if (MTIConfig.EnableCustomFOUTHandler == true) document.documentElement.style.visibility = "hidden" } else c(true) }; a.appendFakeFontFace = function (b) { var c = document.createElement("STYLE"); c.setAttribute("type", "text/css"); c.id = "monotype_fake_fontface_" + this.configuration_.projectId; var d = "", e = this.configuration_.pfL; if (e != null) { d += "@font-face{font-family:opera_testfont;src:url(data:font/opentype;base64,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)}"; for (var f = 0; f < e.length; f++) d += "@font-face{font-family:'" + e[f].fontfamily + (b ? b : "") + "';src:url(data:font/opentype;base64,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);}" } c.textContent = d; b = document.getElementsByTagName("HEAD"); b.length > 0 && b[0].appendChild(c) }; a.removeFakeFontFace = function () { var b = document.getElementById("monotype_fake_fontface_" + this.configuration_.projectId); b && b.parentNode.removeChild(b) }; a.whenFakeFontDetected = function (b) { var c = this, d = document.createElement("SPAN"); d.innerHTML = "MMMWWW"; d.style.position = "absolute"; d.style.left = "-32768px"; d.style.fontFamily = "opera_testfont"; document.documentElement.appendChild(d); var e = 0, f = (new Date).getTime(); e = window.setInterval(function () { if (c.domHelper_.getComputedFontFamily(d) === "opera_testfont" || (new Date).getTime() - f > 200) { try { document.documentElement.removeChild(d) } catch (g) { } b(); window.clearInterval(e) } }, 60) }; a.getFontExtension = function (b) { var c = this.configuration_.ffArray, d = this.userAgent_.getName(); d = d.toLowerCase(); if (d == "firefox") d = "mozilla"; if (/ipad|ipod|iphone/.test(this.userAgent_.getPlatform().toLowerCase())) d = "msafari"; var e = this.userAgent_.getVersion(); c = c[d]; d = ""; for (p in c) if (parseFloat(e) >= parseFloat(p)) if (b[c[p].toUpperCase()]) d = c[p]; return d }; a.calculateFontStackingInfo = function (b, c, d, e, f, g, h, n) { var m = b[n.toUpperCase()]; e = (window.location.protocol == "https:" ? "https://" : "http://") + e.replace("http://", "").replace("https://", ""); e = e + "?"; if (d) e += f + "&"; e += "fctypeId=" + this.configuration_.fctypeArray[n] + "&fcId=" + b.TTF + "&origId=" + m; e += "&projectId=" + c; e += "&content="; b = ""; c = this.userAgent_.getName(); c = c.toLowerCase(); this.userAgent_.getVersion(); c = c == "msie" ? true : false; if (h) { d = null; if (c) { if (h[g]) d = h[g].replace("\\", "").replace("#", "").replace("&", "").replace(">", "").replace("%", "").replace("<", "").replace('"', "").replace("'", "").replace("+", "").replace("/", "%2f") } else d = escape((h[g] || "").replace("\\", "").replace("/", "%2f")); b += (d || "") + "Mm" } g = e + b; h = this.getMaxSupportedCharacter(); if (g.length > h) { e = h - e.length; return { numberOfStacks: Math.ceil(g.length / e), numberOfCharsPerRequest: e} } return { numberOfStacks: 1} }; a.removeFromArray = function (b, c, d) { d = b.slice((d || c) + 1 || b.length); b.length = c < 0 ? b.length + c : c; return b.push.apply(b, d) }; a.fontStack = {}; a.appendFontFaceStyleNode = function (b, c, d) { var e = "TTF", f = this.configuration_.projectId, g = this.configuration_.ec, h = this.configuration_.fcURL, n = this.configuration_.dfcURL, m = this.domHelper_.createElement("style", { type: "text/css", id: "mti_fontface_" + (d ? "Aj_" : "") + this.configuration_.projectId }), l = "", o = false, r = {}, s = { TTF: "truetype", WOFF: "woff", SVG: "svg", MTX: "truetype", OTF: "opentype" }, v = this.userAgent_.getName(); v = v.toLowerCase(); e = this.userAgent_.getVersion(); v = v == "msie" && e < 8 ? true : false; b || (b = []); for (i = 0; i < this.configuration_.pfL.length; i++) { var t = this.configuration_.pfL[i], q = t.fontfamily, w = t.contentIds, B = t.enableOtf; e = this.getFontExtension(w); var u = true; if (b.length > 0) { u = false; for (j = 0; j < b.length; j++) if (b[j] == q) { u = true; break } if (u) { u = e != null && e.toUpperCase() == "EOT" || e.toUpperCase() == "MTX"; this.fontFamilies_.push(q); t = t.enableSubsetting; var A = this.calculateFontStackingInfo(w, f, g, n, this.configuration_.ck, q, c, e), x = A.numberOfStacks, y = false; if (v && x > 1) { x = 1; y = true; t = false } if (x > 1 || d) { if (c !== null) { o = true; r[q] || (r[q] = []); if (y = c[q]) { for (var C = [], z = 1; z <= x; z++) { newFontFamily = (d ? q.length > 25 ? q.substring(0, 20) : q : q) + (d ? d : "") + (x > 1 ? z : ""); r[q].push(newFontFamily); c[newFontFamily] = y.substr((z - 1) * A.numberOfCharsPerRequest, A.numberOfCharsPerRequest); l += '@font-face{\nfont-family:"' + newFontFamily + '";\nsrc:url("' + this.makeFontContentURL(w, f, t, g, h, n, this.configuration_.ck, newFontFamily, c, e, B) + '")'; u || (l += ' format("' + s[e.toUpperCase()] + '")'); l += ";}\n"; C.push("'" + newFontFamily + "'") } this.fontStack[q] = C } } } else { l += '@font-face{\nfont-family:"' + q + (d ? d : "") + '";\nsrc:url("' + this.makeFontContentURL(w, f, t, g, h, n, this.configuration_.ck, q + (d ? d : ""), y ? null : c, e, B) + '")'; if (!u) { q = w[e.toUpperCase()]; e = s[e.toUpperCase()]; q || (e = s.TTF); l += " format('" + e + "')" } l += ";}\n" } } } } if (o === true || d) { this.domHelper_.removeElement(this.domHelper_.getElementById("mti_stylesheet_" + (d ? "Aj_" : "") + this.configuration_.projectId) || {}); d ? this.appendDefinationStyleNode(r, d) : this.appendDefinationStyleNode(r) } l != "" && this.domHelper_.insertInto("head", m); if (m.styleSheet) m.styleSheet.cssText = l; else { b = document.createTextNode(l); m.appendChild(b) } }; a.appendDefinationStyleNode = function (b, c) { var d = new mti.CssClassName("-"), e = this.domHelper_.createElement("style", { type: "text/css", id: "mti_stylesheet_" + (c ? "Aj_" : "") + this.configuration_.projectId }), f = ""; if (MTIConfig.EnableCustomFOUTHandler == true) { var g = this.configuration_.pfL; f += "." + mti.EventDispatcher.DEFAULT_NAMESPACE + "-loading .mti_font_element" + (c ? "_Aj" : "") + "{visibility:hidden;}\n"; for (i = 0; i < g.length; i++) { var h = g[i].fontfamily; if (c) h += c; f += "." + d.build(mti.EventDispatcher.DEFAULT_NAMESPACE, h, mti.FontWatcher.DEFAULT_VARIATION, mti.EventDispatcher.LOADING) + " .mti_font_element" + (c ? c : "") + "{visibility:hidden;}\n" } } for (i in this.configuration_.selectorFontMap) { d = this.configuration_.selectorFontMap[i]; h = h = d.familyName; if (b && b[h] && b[h].length > 0) h = b[h].join("','"); if (!c) { f += i + "{font-family:'" + h + "';"; if (this.otfMain_ != null) if ((h = d.otf) && h != null && h != "") f += this.otfMain_.createOpenTypeFeatureCss(h); f += "}\n" } if (MTIConfig.EnableCustomFOUTHandler == true) { f += "/*fout specific code:*/\n"; h = i.split(","); for (k in h) f += "." + mti.EventDispatcher.DEFAULT_NAMESPACE + "-loading " + h[k] + "{visibility:hidden;}\n" } } f != "" && this.domHelper_.insertInto("head", e); if (e.styleSheet) e.styleSheet.cssText = f; else { b = document.createTextNode(f); e.appendChild(b) } }; a.extractUniqueChars = function (b) { if (b && typeof b == "string") { b = b.replace(/\s/g, "").replace(/\n/g, "").replace(/\r/g, ""); for (var c = "", d = b.length, e = null, f = 0; f < d; f++) { e = b.charAt(f); if (c.indexOf(e) == -1) c += e } return c } return "" }; a.makeFontContentURL = function (b, c, d, e, f, g, h, n, m, l, o) { var r = b[l.toUpperCase()], s = "http://"; if (window.location.protocol == "https:") s = "https://"; f = f.replace("http://", "").replace("https://", ""); g = g.replace("http://", "").replace("https://", ""); f = s + f + (o ? "ot/" : ""); g = s + g; if (d) { url = g + "?"; if (e) url += h + "&"; url += "fctypeId=" + this.configuration_.fctypeArray[l] + "&fcId=" + b.TTF + "&origId=" + r } else url = e ? r ? f + r + "." + l.toLowerCase() + "?" + h : f + b.TTF + ".ttf?" + h : f + "?fctypeId=" + this.configuration_.fctypeArray[l] + "&fcId=" + r; url += "&projectId=" + c; b = this.userAgent_.getName(); b = b.toLowerCase(); this.userAgent_.getVersion(); b = b == "msie" ? true : false; c = null; if (m) { if (b) { if (m[n]) c = m[n].replace("\\", "").replace("#", "").replace("&", "").replace(">", "").replace("%", "").replace("<", "").replace('"', "").replace("'", "").replace("+", "") } else c = escape(m[n] || ""); if (d) if (c.length > 0) url += "&content=" + (c || "") + "Mm"; else url = "" } if (l != null && l.toUpperCase() == "SVG") url += "#" + r; return url }; a.doRenderPartial = function (b) { var c = this, d = false, e = document.getElementById(b); d = e === null ? false : true; if (!d) return false; var f = c.getRandomChar(), g = null, h = null, n = function () { g = new mti.TextCollector(e, c.domHelper_, c.configuration_.pfL); h = g.getCollectedText({}, f); var m = c.userAgent_.getName(); m = m.toLowerCase(); (m == "opera" ? true : false) && c.removeFakeFontFace(); m = []; for (fontfamily in h) { if (h[fontfamily]) h[fontfamily] = c.extractUniqueChars(h[fontfamily]); fontfamily += f; m.push(fontfamily) } c.global_.mti_element_cache = g.elementCache_; var l = g.getElements(); c.appendFontFaceStyleNode(g.getUsedProjectFonts(), h, f); l = g.getElements(); c.otfMain_ != null && mti.bind(c.otfMain_, c.otfMain_.loadPartial, l)(); for (var o = 0; o < l.length; o++) for (fontFamily in c.fontStack) if (c.domHelper_.getComputedFontFamily(l[o]).indexOf(fontFamily) > -1) if (l[o].getAttribute("id") == b || c.domHelper_.isDescendant(c.domHelper_.getElementById(b), l[o])) c.domHelper_.replaceFontFamily(l[o], fontFamily, c.fontStack[fontFamily]); l = new mti.EventDispatcher(c.domHelper_, document.documentElement, c.configuration_); (new mti.FontWatcher(c.domHelper_, l, { getWidth: function (r) { return r.offsetWidth } }, function (r, s) { setTimeout(r, s) }, function () { return (new Date).getTime() })).watch(m, {}, true) }; d = c.userAgent_.getName(); d = d.toLowerCase(); if (d == "opera" ? true : false) { c.appendFakeFontFace(f); c.whenFakeFontDetected(function () { n() }) } else n(); MTIConfig.RemoveMTIClass == true && setTimeout(function () { c.domHelper_.removeMTIElement("mti_font_element" + f) }, mti.FontWatcherTimeout) }; a.load = function (b) { b(this.fontFamilies_, this.fontVariations_) }; mti.MonotypeDocumentHelper = function (b) { this.doc_ = b }; mti.MonotypeDocumentHelper.prototype.protocol = function () { var b = ["http:", "https:"], c = b[0]; if (this.doc_ && this.doc_.location && this.doc_.location.protocol) { var d = 0; for (d = 0; d < b.length; d++) if (this.doc_.location.protocol == b[d]) return this.doc_.location.protocol } return c }; mti.BannerHandler = function (b, c) { this.domHelper_ = b; this.configuration_ = c }; mti.BannerHandler.prototype.appendBannerScript = function () { var b = this.getCookieValue("WFS_MTI_SS"), c = this.configuration_.bannerHandlerURL; if (c) { c += "?projectId=" + this.configuration_.projectId; if (b !== false) c += "&WFS_MTI_SS=" + b; c += "&" + escape((new Date).getTime()); this.domHelper_.insertInto("head", this.domHelper_.createElement("Script", { type: "text/javascript", src: c })) } }; mti.BannerHandler.prototype.getCookieValue = function (b) { b = new RegExp(escape(b) + "=([^;]+)"); if (b.test(document.cookie + ";")) { b.exec(document.cookie + ";"); return unescape(RegExp.$1) } else return false }; mti.PartialRenderer = function (b) { this.module = b }; mti.PartialRenderer.prototype.render = function (b) { this.module.doRenderPartial(b) }; MonoTypeWebFonts.addModule(mti.MonotypeFontApi.NAME, function (b) { var c = (new mti.UserAgentParser(navigator.userAgent)).parse(), d = new mti.DomHelper(document, c), e = null; if (b.enableOtf) e = new mti.OtfMain(d, c, b); window.MonoTypeWebFonts.BannerHandler = new mti.BannerHandler(d, b); b = new mti.MonotypeFontApi(window, c, d, b, e); var f = new mti.PartialRenderer(b); window.MonoTypeWebFonts.renderPartial = function (g) { f.render(g) }; return b }); mti.MonotypeFontApi.prototype.getMaxSupportedCharacter = function () { var b = this.configuration_.bsmcArray, c = this.userAgent_.getName(); c = c.toLowerCase(); if (c == "firefox") c = "mozilla"; if (/ipad|ipod|iphone/.test(this.userAgent_.getPlatform().toLowerCase())) c = "msafari"; var d = this.userAgent_.getVersion(); b = b[c]; c = ""; for (p in b) if (parseFloat(d) >= parseFloat(p)) c = b[p]; return c }; mti.MonotypeFontApi.prototype.getRandomChar = function () { for (var b = "", c = 0; c < 5; c++) b += "abcdefghijklmnopqrstuvwxyz".charAt(Math.floor(Math.random() * 26)); return b }; })(this, document); if(window.addEventListener){ window.addEventListener('load', function(){MonoTypeWebFonts.cleanup(); MonoTypeWebFonts.loadColo();}, false);}else if(window.attachEvent){ window.attachEvent('onload', function(){MonoTypeWebFonts.cleanup(); MonoTypeWebFonts.loadColo();});}MonoTypeWebFonts.cleanupExecuted = false;MonoTypeWebFonts.cleanup = function(){if(MonoTypeWebFonts.cleanupExecuted === true){ return; }MonoTypeWebFonts.cleanupExecuted = (window['mti_element_cache'].length > 0);var className = document.documentElement.className;var MTIConfig = window['MTIConfig'] || { 'RemoveMTIClass': false };if(MTIConfig['RemoveMTIClass']==true){function walkTheDOM (node, func) {func(node);node = node.firstChild;while (node) {walkTheDOM(node, func);node = node.nextSibling;}}function getElementsByClassName (className) {if (document.getElementsByClassName){return document.getElementsByClassName(className);}else {var results = [];walkTheDOM(document.body, function (node) {var a, c = node.className, i;if (c) {a = c.split(' ');for (i=0; i -1 },b = (!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)), c=false;if((RegExp.$1==6)||(RegExp.$1==7)){ c=true; }while(mti_elements.length > 0){for(i=0; i< mti_elements.length; i++){var classList=mti_elements[i].className.split(' ');if(classList.length==1 && !c){mti_elements[i].removeAttribute('class');}else{mti_elements[i].className=mti_elements[i].className.replace(/mti_font_element/ig, ' ').replace(/^\s+|\s+$/g,'');}}mti_elements = getElementsByClassName('mti_font_element');}}className = className;if(!document.getElementById('MonoTypeFontApiFontTracker')){ var fontTrackingUrl = "http://fast.fonts.com/t/1.css"; if(window.location.protocol == 'https:'){ fontTrackingUrl = fontTrackingUrl.replace(/http:/,'https:'); } var head = document.getElementsByTagName('HEAD')[0]; var cssEle = document.createElement('LINK'); if(cssEle){ cssEle.setAttribute('id','MonoTypeFontApiFontTracker'); cssEle.setAttribute('type','text/css'); cssEle.setAttribute('rel','stylesheet'); cssEle.setAttribute('href',fontTrackingUrl + "?apiType=js&projectid=d433232a-fb72-4c27-8a82-49afc0a3a487"); head.appendChild(cssEle); }}window['mti_element_cache'] = [];};MonoTypeWebFonts._fontActiveEventList = [];MonoTypeWebFonts._fontLoadingEventList = [];MonoTypeWebFonts._activeEventList = [];MonoTypeWebFonts._inActiveEventList = [];MonoTypeWebFonts.addEvent = function(eventName, callbackFunction){ if(eventName.toLowerCase() == 'fontactive'){ MonoTypeWebFonts._fontActiveEventList.push(callbackFunction); }else if(eventName.toLowerCase() == 'fontloading'){ MonoTypeWebFonts._fontLoadingEventList.push(callbackFunction); }else if(eventName.toLowerCase() == 'inactive'){ MonoTypeWebFonts._inActiveEventList.push(callbackFunction); }else if(eventName.toLowerCase() == 'active'){ MonoTypeWebFonts._activeEventList.push(callbackFunction); }};MonoTypeWebFonts.loadFonts = function(){MonoTypeWebFonts.load({monotype:{ reqSub:false, enableOtf: false, otfJsParentUrl: 'http://fast.fonts.com/jsapi/otjs/',pfL:[{'fontfamily' : "Kabel W01 Black" ,contentIds :{EOT: '944176ba-e192-44c3-ba91-0998f0a1fb62',WOFF: 'f074dcc0-f50b-4798-be7c-0f1820a574e6',TTF: 'df9d0288-a7e1-424b-9a24-ec8ae4c1aa7b',SVG: 'e1519499-b1b6-4151-995e-3fb05c0c0916'}, enableSubsetting : false, enableOtf: false }],selectorFontMap:{'body' : {familyName:'Kabel W01 Black' }},ck:'d44f19a684109620e4841578ae90e8188df201cf787fc64fb5427350f0a0f51ca79fedcdececa16e8bd61f65a14a5955e41c762985e3b61f84055c08c8cd7c10a6b04a9614efec87b3cee49f18a6506aaad5b46966db35a91137f2e627e1dbe09dbeb5bdd4a51e6205bcb2d9a4452fd47461628b08b12d',ec:'true',fcURL:'http://fast.fonts.com/d/',dfcURL:'http://api2.fonts.com/FontSubsetter.ashx',sO:'True',ffArray:{safari: {'3.1': 'ttf','5.1':'woff'}, msafari: {'1' : 'svg', '4.2' : 'ttf'}, chrome: {'3' :'svg', '4' : 'ttf','5':'woff'}, opera: {'10' : 'ttf', '11.10' : 'woff'}, msie: {'4' : 'eot', '9' : 'woff', '10':'otf'}, mozilla: {'3.5' : 'ttf', '3.6' : 'woff'}},bsmcArray:{safari: {'3.1': '2000','5.0':'1650','5.1':'8190'}, msafari: {'1' : '8190'}, chrome: {'3' :'8190'}, opera: {'10' : '8190'}, msie: {'4' : '2064'}, mozilla: {'3.5' : '8190'}},fctypeArray:{'ttf':'1','eot':'2','woff':'3','svg': '11','otf':'13'},projectId:'d433232a-fb72-4c27-8a82-49afc0a3a487',EOD:null},fontloading:function(fontFamily, fontDescription){ for(var i=0; i";}if (/i(Pad|Pod|Phone)/.test(navigator.userAgent)) { var el = document.getElementById('mti_wfs_colophon'); if (el) { window.onscroll = function () { el.style.top = (window.pageYOffset + window.innerHeight - 40) + 'px' }; }}};setTimeout(function(){ MonoTypeWebFonts.cleanup(); }, 20000);