/* Raycom - Redesign 2015 - custom-master.js */
/* Modernizr */
window.Modernizr = function (a, b, c) { function C(a) { j.cssText = a } function D(a, b) { return C(n.join(a + ";") + (b || "")) } function E(a, b) { return typeof a === b } function F(a, b) { return !! ~("" + a).indexOf(b) } function G(a, b) { for (var d in a) { var e = a[d]; if (!F(e, "-") && j[e] !== c) return "pfx" == b ? e : !0 } return !1 } function H(a, b, d) { for (var e in a) { var f = b[a[e]]; if (f !== c) return d === !1 ? a[e] : E(f, "function") ? f.bind(d || b) : f } return !1 } function I(a, b, c) { var d = a.charAt(0).toUpperCase() + a.slice(1), e = (a + " " + p.join(d + " ") + d).split(" "); return E(b, "string") || E(b, "undefined") ? G(e, b) : (e = (a + " " + q.join(d + " ") + d).split(" "), H(e, b, c)) } function J() { e.input = function (c) { for (var d = 0, e = c.length; e > d; d++) u[c[d]] = !!(c[d] in k); return u.list && (u.list = !(!b.createElement("datalist") || !a.HTMLDataListElement)), u } ("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), e.inputtypes = function (a) { for (var e, f, h, d = 0, i = a.length; i > d; d++) k.setAttribute("type", f = a[d]), e = "text" !== k.type, e && (k.value = l, k.style.cssText = "position:absolute;visibility:hidden;", /^range$/.test(f) && k.style.WebkitAppearance !== c ? (g.appendChild(k), h = b.defaultView, e = h.getComputedStyle && "textfield" !== h.getComputedStyle(k, null).WebkitAppearance && 0 !== k.offsetHeight, g.removeChild(k)) : /^(search|tel)$/.test(f) || (e = /^(url|email)$/.test(f) ? k.checkValidity && k.checkValidity() === !1 : k.value != l)), t[a[d]] = !!e; return t } ("search tel url email datetime date month week time datetime-local number range color".split(" ")) } var x, B, d = "2.7.0", e = {}, f = !0, g = b.documentElement, h = "modernizr", i = b.createElement(h), j = i.style, k = b.createElement("input"), l = ":)", m = {}.toString, n = " -webkit- -moz- -o- -ms- ".split(" "), o = "Webkit Moz O ms", p = o.split(" "), q = o.toLowerCase().split(" "), r = { svg: "http://www.w3.org/2000/svg" }, s = {}, t = {}, u = {}, v = [], w = v.slice, y = function (a, c, d, e) { var f, i, j, k, l = b.createElement("div"), m = b.body, n = m || b.createElement("body"); if (parseInt(d, 10)) for (; d--; ) j = b.createElement("div"), j.id = e ? e[d] : h + (d + 1), l.appendChild(j); return f = ["", '"].join(""), l.id = h, (m ? l : n).innerHTML += f, n.appendChild(l), m || (n.style.background = "", n.style.overflow = "hidden", k = g.style.overflow, g.style.overflow = "hidden", g.appendChild(n)), i = c(l, a), m ? l.parentNode.removeChild(l) : (n.parentNode.removeChild(n), g.style.overflow = k), !!i }, z = function () { function d(d, e) { e = e || b.createElement(a[d] || "div"), d = "on" + d; var f = d in e; return f || (e.setAttribute || (e = b.createElement("div")), e.setAttribute && e.removeAttribute && (e.setAttribute(d, ""), f = E(e[d], "function"), E(e[d], "undefined") || (e[d] = c), e.removeAttribute(d))), e = null, f } var a = { select: "input", change: "input", submit: "form", reset: "form", error: "img", load: "img", abort: "img" }; return d } (), A = {}.hasOwnProperty; B = E(A, "undefined") || E(A.call, "undefined") ? function (a, b) { return b in a && E(a.constructor.prototype[b], "undefined") } : function (a, b) { return A.call(a, b) }, Function.prototype.bind || (Function.prototype.bind = function (a) { var b = this; if ("function" != typeof b) throw new TypeError; var c = w.call(arguments, 1), d = function () { if (this instanceof d) { var e = function () { }; e.prototype = b.prototype; var f = new e, g = b.apply(f, c.concat(w.call(arguments))); return Object(g) === g ? g : f } return b.apply(a, c.concat(w.call(arguments))) }; return d }), s.flexbox = function () { return I("flexWrap") }, s.canvas = function () { var a = b.createElement("canvas"); return !(!a.getContext || !a.getContext("2d")) }, s.canvastext = function () { return !(!e.canvas || !E(b.createElement("canvas").getContext("2d").fillText, "function")) }, s.webgl = function () { return !!a.WebGLRenderingContext }, s.touch = function () { var c; return "ontouchstart" in a || a.DocumentTouch && b instanceof DocumentTouch ? c = !0 : y(["@media (", n.join("touch-enabled),("), h, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function (a) { c = 9 === a.offsetTop }), c }, s.geolocation = function () { return "geolocation" in navigator }, s.postmessage = function () { return !!a.postMessage }, s.websqldatabase = function () { return !!a.openDatabase }, s.indexedDB = function () { return !!I("indexedDB", a) }, s.hashchange = function () { return z("hashchange", a) && (b.documentMode === c || b.documentMode > 7) }, s.history = function () { return !(!a.history || !history.pushState) }, s.draganddrop = function () { var a = b.createElement("div"); return "draggable" in a || "ondragstart" in a && "ondrop" in a }, s.websockets = function () { return "WebSocket" in a || "MozWebSocket" in a }, s.rgba = function () { return C("background-color:rgba(150,255,150,.5)"), F(j.backgroundColor, "rgba") }, s.hsla = function () { return C("background-color:hsla(120,40%,100%,.5)"), F(j.backgroundColor, "rgba") || F(j.backgroundColor, "hsla") }, s.multiplebgs = function () { return C("background:url(https://),url(https://),red url(https://)"), /(url\s*\(.*?){3}/.test(j.background) }, s.backgroundsize = function () { return I("backgroundSize") }, s.borderimage = function () { return I("borderImage") }, s.borderradius = function () { return I("borderRadius") }, s.boxshadow = function () { return I("boxShadow") }, s.textshadow = function () { return "" === b.createElement("div").style.textShadow }, s.opacity = function () { return D("opacity:.55"), /^0.55$/.test(j.opacity) }, s.cssanimations = function () { return I("animationName") }, s.csscolumns = function () { return I("columnCount") }, s.cssgradients = function () { var a = "background-image:", b = "gradient(linear,left top,right bottom,from(#9f9),to(white));", c = "linear-gradient(left top,#9f9, white);"; return C((a + "-webkit- ".split(" ").join(b + a) + n.join(c + a)).slice(0, -a.length)), F(j.backgroundImage, "gradient") }, s.cssreflections = function () { return I("boxReflect") }, s.csstransforms = function () { return !!I("transform") }, s.csstransforms3d = function () { var a = !!I("perspective"); return a && "webkitPerspective" in g.style && y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function (b) { a = 9 === b.offsetLeft && 3 === b.offsetHeight }), a }, s.csstransitions = function () { return I("transition") }, s.fontface = function () { var a; return y('@font-face {font-family:"font";src:url("https://")}', function (c, d) { var e = b.getElementById("smodernizr"), f = e.sheet || e.styleSheet, g = f ? f.cssRules && f.cssRules[0] ? f.cssRules[0].cssText : f.cssText || "" : ""; a = /src/i.test(g) && 0 === g.indexOf(d.split(" ")[0]) }), a }, s.generatedcontent = function () { var a; return y(["#", h, "{font:0/0 a}#", h, ':after{content:"', l, '";visibility:hidden;font:3px/1 a}'].join(""), function (b) { a = b.offsetHeight >= 3 }), a }, s.video = function () { var a = b.createElement("video"), c = !1; try { (c = !!a.canPlayType) && (c = new Boolean(c), c.ogg = a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), c.h264 = a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), c.webm = a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "")) } catch (d) { } return c }, s.audio = function () { var a = b.createElement("audio"), c = !1; try { (c = !!a.canPlayType) && (c = new Boolean(c), c.ogg = a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), c.mp3 = a.canPlayType("audio/mpeg;").replace(/^no$/, ""), c.wav = a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), c.m4a = (a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;")).replace(/^no$/, "")) } catch (d) { } return c }, s.localstorage = function () { try { return localStorage.setItem(h, h), localStorage.removeItem(h), !0 } catch (a) { return !1 } }, s.sessionstorage = function () { try { return sessionStorage.setItem(h, h), sessionStorage.removeItem(h), !0 } catch (a) { return !1 } }, s.webworkers = function () { return !!a.Worker }, s.applicationcache = function () { return !!a.applicationCache }, s.svg = function () { return !!b.createElementNS && !!b.createElementNS(r.svg, "svg").createSVGRect }, s.inlinesvg = function () { var a = b.createElement("div"); return a.innerHTML = " ", (a.firstChild && a.firstChild.namespaceURI) == r.svg }, s.smil = function () { return !!b.createElementNS && /SVGAnimate/.test(m.call(b.createElementNS(r.svg, "animate"))) }, s.svgclippaths = function () { return !!b.createElementNS && /SVGClipPath/.test(m.call(b.createElementNS(r.svg, "clipPath"))) }; for (var K in s) B(s, K) && (x = K.toLowerCase(), e[x] = s[K](), v.push((e[x] ? "" : "no-") + x)); return e.input || J(), e.addTest = function (a, b) { if ("object" == typeof a) for (var d in a) B(a, d) && e.addTest(d, a[d]); else { if (a = a.toLowerCase(), e[a] !== c) return e; b = "function" == typeof b ? b() : b, "undefined" != typeof f && f && (g.className += " " + (b ? "" : "no-") + a), e[a] = b } return e }, C(""), i = k = null, function (a, b) { function l(a, b) { var c = a.createElement("p"), d = a.getElementsByTagName("head")[0] || a.documentElement; return c.innerHTML = "x", d.insertBefore(c.lastChild, d.firstChild) } function m() { var a = s.elements; return "string" == typeof a ? a.split(" ") : a } function n(a) { var b = j[a[h]]; return b || (b = {}, i++, a[h] = i, j[i] = b), b } function o(a, c, d) { if (c || (c = b), k) return c.createElement(a); d || (d = n(c)); var g; return g = d.cache[a] ? d.cache[a].cloneNode() : f.test(a) ? (d.cache[a] = d.createElem(a)).cloneNode() : d.createElem(a), !g.canHaveChildren || e.test(a) || g.tagUrn ? g : d.frag.appendChild(g) } function p(a, c) { if (a || (a = b), k) return a.createDocumentFragment(); c = c || n(a); for (var d = c.frag.cloneNode(), e = 0, f = m(), g = f.length; g > e; e++) d.createElement(f[e]); return d } function q(a, b) { b.cache || (b.cache = {}, b.createElem = a.createElement, b.createFrag = a.createDocumentFragment, b.frag = b.createFrag()), a.createElement = function (c) { return s.shivMethods ? o(c, a, b) : b.createElem(c) }, a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function (a) { return b.createElem(a), b.frag.createElement(a), 'c("' + a + '")' }) + ");return n}")(s, b.frag) } function r(a) { a || (a = b); var c = n(a); return !s.shivCSS || g || c.hasCSS || (c.hasCSS = !!l(a, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")), k || q(a, c), a } var g, k, c = "3.7.0", d = a.html5 || {}, e = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, f = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, h = "_html5shiv", i = 0, j = {}; !function () { try { var a = b.createElement("a"); a.innerHTML = " ", g = "hidden" in a, k = 1 == a.childNodes.length || function () { b.createElement("a"); var a = b.createDocumentFragment(); return "undefined" == typeof a.cloneNode || "undefined" == typeof a.createDocumentFragment || "undefined" == typeof a.createElement } () } catch (c) { g = !0, k = !0 } } (); var s = { elements: d.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video", version: c, shivCSS: d.shivCSS !== !1, supportsUnknownElements: k, shivMethods: d.shivMethods !== !1, type: "default", shivDocument: r, createElement: o, createDocumentFragment: p }; a.html5 = s, r(b) } (this, b), e._version = d, e._prefixes = n, e._domPrefixes = q, e._cssomPrefixes = p, e.hasEvent = z, e.testProp = function (a) { return G([a]) }, e.testAllProps = I, e.testStyles = y, e.prefixed = function (a, b, c) { return b ? I(a, b, c) : I(a, "pfx") }, g.className = g.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + v.join(" ") : ""), e } (this, this.document), function (a, b, c) { function d(a) { return "[object Function]" == o.call(a) } function e(a) { return "string" == typeof a } function f() { } function g(a) { return !a || "loaded" == a || "complete" == a || "uninitialized" == a } function h() { var a = p.shift(); q = 1, a ? a.t ? m(function () { ("c" == a.t ? B.injectCss : B.injectJs)(a.s, 0, a.a, a.x, a.e, 1) }, 0) : (a(), h()) : q = 0 } function i(a, c, d, e, f, i, j) { function k(b) { if (!o && g(l.readyState) && (u.r = o = 1, !q && h(), l.onload = l.onreadystatechange = null, b)) { "img" != a && m(function () { t.removeChild(l) }, 50); for (var d in y[c]) y[c].hasOwnProperty(d) && y[c][d].onload() } } var j = j || B.errorTimeout, l = b.createElement(a), o = 0, r = 0, u = { t: d, s: c, e: f, a: i, x: j }; 1 === y[c] && (r = 1, y[c] = []), "object" == a ? l.data = c : (l.src = c, l.type = a), l.width = l.height = "0", l.onerror = l.onload = l.onreadystatechange = function () { k.call(this, r) }, p.splice(e, 0, u), "img" != a && (r || 2 === y[c] ? (t.insertBefore(l, s ? null : n), m(k, j)) : y[c].push(l)) } function j(a, b, c, d, f) { return q = 0, b = b || "j", e(a) ? i("c" == b ? v : u, a, b, this.i++, c, d, f) : (p.splice(this.i++, 0, a), 1 == p.length && h()), this } function k() { var a = B; return a.loader = { load: j, i: 0 }, a } var A, B, l = b.documentElement, m = a.setTimeout, n = b.getElementsByTagName("script")[0], o = {}.toString, p = [], q = 0, r = "MozAppearance" in l.style, s = r && !!b.createRange().compareNode, t = s ? l : n.parentNode, l = a.opera && "[object Opera]" == o.call(a.opera), l = !!b.attachEvent && !l, u = r ? "object" : l ? "script" : "img", v = l ? "script" : u, w = Array.isArray || function (a) { return "[object Array]" == o.call(a) }, x = [], y = {}, z = { timeout: function (a, b) { return b.length && (a.timeout = b[0]), a } }; B = function (a) { function b(a) { var e, f, g, a = a.split("!"), b = x.length, c = a.pop(), d = a.length, c = { url: c, origUrl: c, prefixes: a }; for (f = 0; d > f; f++) g = a[f].split("="), (e = z[g.shift()]) && (c = e(c, g)); for (f = 0; b > f; f++) c = x[f](c); return c } function g(a, e, f, g, h) { var i = b(a), j = i.autoCallback; i.url.split(".").pop().split("?").shift(), i.bypass || (e && (e = d(e) ? e : e[a] || e[g] || e[a.split("/").pop().split("?")[0]]), i.instead ? i.instead(a, e, f, g, h) : (y[i.url] ? i.noexec = !0 : y[i.url] = 1, f.load(i.url, i.forceCSS || !i.forceJS && "css" == i.url.split(".").pop().split("?").shift() ? "c" : c, i.noexec, i.attrs, i.timeout), (d(e) || d(j)) && f.load(function () { k(), e && e(i.origUrl, h, g), j && j(i.origUrl, h, g), y[i.url] = 2 }))) } function h(a, b) { function c(a, c) { if (a) { if (e(a)) c || (j = function () { var a = [].slice.call(arguments); k.apply(this, a), l() }), g(a, j, b, 0, h); else if (Object(a) === a) for (n in m = function () { var c, b = 0; for (c in a) a.hasOwnProperty(c) && b++; return b } (), a) a.hasOwnProperty(n) && (!c && ! --m && (d(j) ? j = function () { var a = [].slice.call(arguments); k.apply(this, a), l() } : j[n] = function (a) { return function () { var b = [].slice.call(arguments); a && a.apply(this, b), l() } } (k[n])), g(a[n], j, b, n, h)) } else !c && l() } var m, n, h = !!a.test, i = a.load || a.both, j = a.callback || f, k = j, l = a.complete || f; c(h ? a.yep : a.nope, !!i), i && c(i) } var i, j, l = this.yepnope.loader; if (e(a)) g(a, 0, l, 0); else if (w(a)) for (i = 0; i < a.length; i++) j = a[i], e(j) ? g(j, 0, l, 0) : w(j) ? B(j) : Object(j) === j && h(j, l); else Object(a) === a && h(a, l) }, B.addPrefix = function (a, b) { z[a] = b }, B.addFilter = function (a) { x.push(a) }, B.errorTimeout = 1e4, null == b.readyState && b.addEventListener && (b.readyState = "loading", b.addEventListener("DOMContentLoaded", A = function () { b.removeEventListener("DOMContentLoaded", A, 0), b.readyState = "complete" }, 0)), a.yepnope = k(), a.yepnope.executeStack = h, a.yepnope.injectJs = function (a, c, d, e, i, j) { var l, o, k = b.createElement("script"), e = e || B.errorTimeout; k.src = a; for (o in d) k.setAttribute(o, d[o]); c = j ? h : c || f, k.onreadystatechange = k.onload = function () { !l && g(k.readyState) && (l = 1, c(), k.onload = k.onreadystatechange = null) }, m(function () { l || (l = 1, c(1)) }, e), i ? k.onload() : n.parentNode.insertBefore(k, n) }, a.yepnope.injectCss = function (a, c, d, e, g, i) { var j, e = b.createElement("link"), c = i ? h : c || f; e.href = a, e.rel = "stylesheet", e.type = "text/css"; for (j in d) e.setAttribute(j, d[j]); g || (n.parentNode.insertBefore(e, n), m(c, 0)) } } (this, document), Modernizr.load = function () { yepnope.apply(window, [].slice.call(arguments, 0)) };
/* httprequest */
if (typeof (wng_includesTracker) == 'undefined') { var wng_includesTracker = {}; } wng_includesTracker['/global/interface/httprequest/httprequest.js'] = 1; if (!wng_includesTracker['/global/interface/globals.js']) { var wng_includesDomain = ''; var wng_includesVersion = ''; try { wng_includesDomain = wng_pageInfo.contentDomain; wng_includesVersion = wng_pageInfo.includesVersion; } catch (e) { wng_includesDomain = 'http://content.worldnow.com'; wng_includesVersion = '20070120'; } document.writeln(' '); } var wng_doc = document; var WNHttpRequestManager = function () { var _PROXY_URL = '/global/interface/httprequest/hrproxy.asp'; var _PROXY_PARAM_URL = 'url'; var _METHODS = { GET: 1, HEAD: 1, POST: 1, PUT: 1, DELETE: 1 }; var _METHOD_DEFAULT = 'GET'; var _POST_MIMETYPE_DEFAULT = 'application/x-www-form-urlencoded'; var _XMLPARSER_LIBVERSIONS = [['MSXML2', '3.0'], ['MSXML2', '2.6'], ['Microsoft', '']]; var _RESPONSE_HEADERS_DELIMITER = new RegExp(':\\s+|\\n', 'g'); var _READYSTATE_HANDLERS = { onSuccess: true, onError: true, onCompleted: 4, onInteractive: 3, onLoaded: 2, onLoading: 1, onUninitialized: 0 }; var _encodeURIComponent = (typeof (encodeURIComponent) != 'undefined') ? encodeURIComponent : escape; function _convertXMLParserObjectType(libraryName, objectType) { if (libraryName != 'Microsoft') { return objectType; } switch (objectType) { case 'DOMDocument': { return 'XMLDOM'; break; } case 'FreeThreadedDOMDocument': { return 'FreeThreadedXMLDOM'; break; } case 'DSOControl': { return 'XMLDSO'; break; } default: { return objectType; break; } } } function _getProgId(libraryName, objectType, version) { var progId = ''; if (libraryName && objectType) { progId = libraryName + '.' + objectType; if (version) { progId += '.' + version; } } return progId; } function _getXMLParserActiveXControl(objectType) { if (!objectType || !window.ActiveXObject) { return; } var libraryName = _getXMLParserActiveXControl.libraryName; if (libraryName) { objectType = _convertXMLParserObjectType(libraryName, objectType); return new ActiveXObject(_getProgId(libraryName, objectType, _getXMLParserActiveXControl.version)); } var libVersion, libraryName, version, tempObjectType, xmlHttp, xmlParserObj; for (var i = 0, v = _XMLPARSER_LIBVERSIONS, l = v.length; i < l; i++) { libVersion = v[i], libraryName = libVersion[0], version = libVersion[1]; try { tempObjectType = _convertXMLParserObjectType(libraryName, objectType); xmlParserObj = new ActiveXObject(_getProgId(libraryName, tempObjectType, version)); _getXMLParserActiveXControl.libraryName = libraryName; _getXMLParserActiveXControl.version = version; return xmlParserObj; } catch (e) { } } } function _getXMLHttpRequest() { var request = null; try { if (window.XMLHttpRequest) { request = new XMLHttpRequest(); } else { request = _getXMLParserActiveXControl('XMLHTTP'); } } catch (e) { request = null; } return request; } function _loadXMLDocFromString(text) { var xmlDoc = null; if (text) { if (window.DOMParser) { var parser = new DOMParser(); xmlDoc = parser.parseFromString(text, 'text/xml'); if (xmlDoc.documentElement.nodeName == 'parsererror') { xmlDoc = null; } } else { xmlDoc = _getXMLParserActiveXControl('DOMDocument'); if (xmlDoc) { xmlDoc.async = false; loaded = xmlDoc.loadXML(text); if (!loaded) { xmlDoc = null; } } } } return xmlDoc; } function _setRequestHeaders(request, headers) { try { for (var header in headers) { request.setRequestHeader(header, headers[header]); } } catch (e) { } } function _extractResponseHeaders(headersText) { var values = headersText.split(_RESPONSE_HEADERS_DELIMITER); var headers = {}; var l = headers.length; if (l) { var i = 0; do { headers[values[i++]] = values[i++]; } while (i < l); } return headers; } function _XMLHttpResponse(request) { this.status = request.status; this.statusText = request.statusText; this.responseText = request.responseText; responseXML = request.responseXML; if (!responseXML || !responseXML.documentElement) { responseXML = _loadXMLDocFromString(this.responseText); } this.responseXML = responseXML; this._headersText = request.getAllResponseHeaders(); this._headers = null; } _XMLHttpResponse.prototype = { getResponseHeader: function (header) { if (!this._headers) { this._headers = _extractResponseHeaders(this._headersText); } return this._headers[header]; }, getAllResponseHeaders: function () { return this._headersText; } }; function _XMLHttpWrapper(url, options) { this.url = url; this.setOptions(options); this._statesHandled = {}; var self = this; this._handleRequestChange = function () { try { var readyState = self.request.readyState; } catch (e) { self.onRequestError(e); } switch (readyState) { case 0: { self._performCallback('onUninitialized'); break; } case 1: { self._performCallback('onLoading'); break; } case 2: { self._performCallback('onLoaded'); break; } case 3: { self._performCallback('onInteractive'); break; } case 4: { self._onRequestStateCompleted(); break; } } }; } _XMLHttpWrapper.prototype = { PROXY_URL: _PROXY_URL, setOptions: function (options) { if (typeof (options) != 'object' || options instanceof Array) { options = {}; } options.async = true; if (!_METHODS[options.method]) { options.method = _METHOD_DEFAULT; } if (!options.requestHeaders) { options.requestHeaders = {}; } if (options.method == 'POST') { if (!options.postData) { options.postData = ''; } if (!options.requestHeaders['Content-Type']) { options.requestHeaders['Content-Type'] = _POST_MIMETYPE_DEFAULT; } } if (!options.parameters) { options.parameters = ''; } this.options = options; }, getRequestUrl: function () { var url = this.url, useProxy = false; if (!url || typeof (url) != 'string') { return null; } var domainStart = url.indexOf('//'), slashIndex = url.indexOf('/'), urlLen = url.length; var hostEnd = (slashIndex > -1) ? slashIndex : urlLen; if (domainStart > -1 || (url.substring(0, hostEnd)).indexOf('.') > -1) { var protocol = url.substring(0, url.indexOf(':') + 1); if (protocol && protocol != window.location.protocol) { useProxy = true; } else { var domainEnd = url.indexOf('/', domainStart + 2); domainStart = (domainStart != -1) ? domainStart + 2 : 0, domainEnd = (domainEnd != -1) ? domainEnd : urlLen; var domain = url.substring(domainStart, domainEnd); if (window.location.host != domain) { useProxy = true; } } } var separator = (url.indexOf('?') == -1) ? '?' : '&'; var options = this.options; if (options.method == 'GET') { var parameters = this.getRequestParameters(); if (parameters.length) { url += separator + parameters; } } var fullUrl = ''; if (useProxy) { url = _encodeURIComponent(url); fullUrl += this.PROXY_URL; var separator = (fullUrl.indexOf('?') == -1) ? '?' : '&'; var parameters = this.getRequestParameters('proxyParameters'); if (parameters.length) { fullUrl += separator + parameters; separator = '&'; } fullUrl += separator + _PROXY_PARAM_URL + '='; } fullUrl += url; var separator = (fullUrl.indexOf('?') == -1) ? '?' : '&'; fullUrl += separator + 'rand=' + (Math.floor(Math.random() * 999999)); return fullUrl; }, getRequestParameters: function (type) { var parameters = (type != 'proxyParameters') ? this.options['parameters'] : this.options['proxyParameters']; var paramsTypeOf = typeof (parameters); var paramsStr = ''; if (parameters && paramsTypeOf == 'string') { var params = parameters.split('&'); for (var i = 0, l = params.length, param; i < l; i++) { param = params[i].split('='); paramsStr += '&' + _encodeURIComponent(param[0]) + '=' + _encodeURIComponent(param[1]); } } else if (paramsTypeOf == 'object' && !(parameters instanceof Array)) { for (var key in parameters) { paramsStr += '&' + _encodeURIComponent(key) + '=' + _encodeURIComponent(parameters[key]); } } if (paramsStr) { paramsStr = paramsStr.substr(1); } return paramsStr; }, makeRequest: function () { try { var request = _getXMLHttpRequest(); if (request) { var url = this.getRequestUrl(); if (url) { this.request = request; var options = this.options, method = options.method, headers = options.requestHeaders; var content = null; if (method == 'POST') { content = options.postData; if (headers.mimetype == _POST_MIMETYPE_DEFAULT) { var parameters = this.getRequestParameters(); if (parameters) { if (content) { content += '&'; } content += parameters; } } headers['Content-Length'] = content.length; headers['Connection'] = 'close'; } request.onreadystatechange = this._handleRequestChange; if (typeof (WNClosureTracker) != 'undefined') { WNClosureTracker.add(this.request, 'onreadystatechange', true); WNClosureTracker.add(this, 'request'); } request.open(method, url, options.async); _setRequestHeaders(request, headers); request.send(content); } else { throw new Error('Invalid request url'); } } else { throw new Error('XMLHTTPRequest not supported by this browser'); } } catch (e) { this.onRequestError(e); } }, _performCallback: function (name) { try { if (this._statesHandled[name]) { return; } this._statesHandled[name] = true; var callback = this.options[name]; if (callback) { var handler, args = []; if (typeof (callback) == 'function') { handler = callback; } else if (callback instanceof Array) { handler = callback[0]; if (callback.length > 1) { args = callback[1]; } } else if (typeof (callback) == 'object') { handler = callback.callback; if (typeof (callback.args) != 'undefined') { args = callback.args; } } if (!(args instanceof Array)) { args = [args]; } if (arguments.length > 1) { var al = args.length; for (var i = 1, l = arguments.length; i < l; i++) { args[al++] = arguments[i]; } } if (typeof (handler) == 'function') { if (handler.apply) { handler.apply(this, args); } else { var arg; for (var i = 0, l = args.length, arg; i < l; i++) { arg = args[i]; if (typeof (arg) == 'string') { args[i] = "'" + arg + "'"; } } eval('handler(' + args.toString() + ')'); } } } } catch (e) { if (name != 'onError') { this.onRequestError(e); } else { } } }, onRequestError: function (e) { this.errorMessage = (e.message || e); this._performCallback('onError', e); }, _onRequestStateCompleted: function () { try { if (this._statesHandled['onCompleted']) { return; } this.response = new _XMLHttpResponse(this.request); this._performCallback('onCompleted'); var status = this.response.status; delete this.request['onreadystatechange']; this.request = null; if (status == 200 || status == 304) { this._performCallback('onSuccess'); } else { throw new Error('XMLHTTPRequest status was ' + status); } } catch (e) { this.onRequestError(e); } } }; var Manager = { Handlers: {}, makeRequest: function (url, options) { var xmlHttpRequest = new _XMLHttpWrapper(url, options); xmlHttpRequest.makeRequest(); return xmlHttpRequest; }, transferNodeData: function (parent, nodeName, target) { var result = false; try { var source = parent.getElementsByTagName(nodeName); source = (source.length) ? source[0] : this.retrieveChildElement(parent, nodeName); if (source) { var hasInnerHTML = typeof (target.innerHTML) != 'undefined'; var nLen = source.childNodes.length; if (hasInnerHTML && nLen == 1) { target.innerHTML = source.firstChild.nodeValue; result = true; } else if (hasInnerHTML && typeof (source.xml) != 'undefined' && nLen) { if (nLen == 1) { target.innerHTML = source.firstChild.xml; } else { var htmlStr = ''; var child = source.firstChild; if (child) { do { htmlStr += child.xml; } while (child = child.nextSibling); } target.innerHTML = htmlStr; } result = true; } else { try { target.appendChild(wng_doc.importNode(source, true)); result = true; } catch (e) { } } } } catch (e) { } if (!result && target && target.style) { target.style.display = 'none'; } return result; }, retrieveChildElement: function (parent, nodeName) { if (!parent.childNamesIndex) { parent.childNamesIndex = { _index: 0 }; } var namesIndex = parent.childNamesIndex; var nIndex = (!recalculate) ? namesIndex._index : 0; var nodes = parent.childNodes, nLen = nodes.length; if (nIndex === nLen) { var cIndex = namesIndex[nodeName]; return (typeof (cIndex) == 'number') ? nodes[cIndex] : null; } var node; while (nIndex < nLen) { node = nodes[nIndex]; if (node.nodeType === 1) { namesIndex[node.nodeName] = nIndex; if (node.nodeName === nodeName) { break; } } nIndex++; } namesIndex._index = nIndex; parent.childNamesIndex = namesIndex; var cIndex = namesIndex[nodeName]; return (typeof (cIndex == 'number')) ? nodes[cIndex] : null; } }; Manager.Handlers.RSS = function () { var _RSS_TARGET_DEFAULT = '_blank'; var _RSS_REQUIRED_NODES_DEFAULT = { link: 1, title: 1 }; function _createItemStructure(target) { var item = wng_doc.createElement('DIV'); item.className = 'rssItem'; var href = wng_doc.createElement('A'); href.setAttribute('target', target); item.appendChild(href); var desc = wng_doc.createElement('DIV'); desc.className = 'rssItemDesc'; item.appendChild(desc); return item; } return { onSuccess: function (targetId, options) { try { if (!options) { options = {}; } var wrapper = wng_doc.getElementById(targetId); if (options.clearTarget) { var child = wrapper.firstChild; while (child) { wrapper.removeChild(child); child = wrapper.firstChild; } } var xmlDoc = this.response.responseXML; var nodes = xmlDoc.documentElement.getElementsByTagName('item'), nLen = nodes.length; if (nLen == 0 && options.hideEmpty) { return; } var limit = options.limit; if (typeof (limit) != 'number' || limit > nLen) { limit = nLen; } var bucket = wng_doc.createElement('DIV'); bucket.className = 'rssBucket'; var header = wng_doc.createElement('DIV'); header.className = 'rssHeader'; var oHeader = options.header; if (oHeader) { if (typeof (header.innerHTML) != 'undefined') { header.innerHTML = oHeader; } else { oHeader = (oHeader.nodeType) ? oHeader.cloneNode(true) : wng_doc.createTextNode(oHeader); header.appendChild(oHeader); } } var footer = wng_doc.createElement('DIV'); footer.className = 'rssFooter'; var oFooter = options.footer; if (oFooter) { if (typeof (footer.innerHTML) != 'undefined') { footer.innerHTML = oFooter; } else { oFooter = (oFooter.nodeType) ? oFooter.cloneNode(true) : wng_doc.createTextNode(oFooter); footer.appendChild(oFooter); } } var items = wng_doc.createElement('DIV'); items.className = 'rssItems'; var displayWhileLoading = options.displayWhileLoading; if (displayWhileLoading) { bucket.appendChild(header); bucket.appendChild(items); wrapper.appendChild(bucket); } var itemClone = _createItemStructure(options.target || _RSS_TARGET_DEFAULT); var requiredNodes = options.requiredNodes || _RSS_REQUIRED_NODES_DEFAULT; var transfer = WNHttpRequestManager.transferNodeData; var retrieve = WNHttpRequestManager.retrieveChildElement; for (var i = 0, node, item, linkVal; i < limit; i++) { node = nodes[i]; item = itemClone.cloneNode(true); linkVal = node.getElementsByTagName('link'); linkVal = (linkVal.length) ? linkVal[0] : retrieve(node, 'link'); linkVal = (linkVal) ? linkVal.firstChild : null; if (linkVal && linkVal.nodeValue) { item.firstChild.setAttribute('href', linkVal.nodeValue); } else if (requiredNodes['link']) { continue; } if (!transfer(node, 'title', item.firstChild) && requiredNodes['title']) { continue; } if (!transfer(node, 'description', item.lastChild) && requiredNodes['description']) { continue; } items.appendChild(item); } if (!displayWhileLoading) { bucket.appendChild(header); bucket.appendChild(items); } bucket.appendChild(footer); if (!displayWhileLoading) { wrapper.appendChild(bucket); } } catch (e) { this.onRequestError(e); } }, onError: function (targetId, options, e) { try { if (!options) { options = {}; } if (options.hideTarget) { var wrapper = wng_doc.getElementById(targetId); wrapper.style.display = 'none'; } } catch (e) { } } }; } (); return Manager; } ();
/*
* jQuery dotdotdot 1.6.16
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Plugin website:
* dotdotdot.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var f=this,h=t(f);if("undefined"==typeof f||3==f.nodeType&&0==t.trim(f.data).length)return!0;if(h.is(u))e.append(h);else{if(s)return!0;e.append(h),l&&e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==f.nodeType?o(h,n,i,d,l):r(h,n,i,d,l),s||(h.detach(),s=!0)),s||l&&l.detach()}}),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var f=s(c),h=-1!==f.indexOf(" ")?" ":" ",p="letter"==o.wrap?"":h,g=f.split(p),v=-1,w=-1,b=0,y=g.length-1;for(o.fallbackToLetter&&0==b&&0==y&&(p="",g=f.split(p),y=g.length-1);y>=b&&(0!=b||0!=y);){var m=Math.floor((b+y)/2);if(m==w)break;w=m,l(c,g.slice(0,w+1).join(p)+o.ellipsis),a(r,o)?(y=w,o.fallbackToLetter&&0==b&&0==y&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,y=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var T=d&&d.closest(x).length?d.length:0;x.contents().length>T?c=u(x.contents().eq(-1-T),n):(c=u(x,n,!0),T||x.detach()),c&&(f=i(s(c),o),l(c,f),T&&d&&t(c).parent().append(d))}else f=i(g.slice(0,v+1).join(p),o),l(c,f);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function f(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function h(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this;o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){e.preventDefault(),e.stopPropagation(),l.maxHeight="number"==typeof l.height?l.height:h(o),l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||d instanceof HTMLElement)&&(d=t("
").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('
').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith(" ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setInterval(function(){if(o.is(":visible")){var t=d(o);(c.width!=t.width||c.height!=t.height)&&(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var i=o.contents(),l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=f(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" "," ",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("
").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery);
/* Avoid `console` errors in browsers that lack a console. */
(function () {
var method;
var noop = function () { };
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
var length = methods.length;
var console = (window.console = window.console || {});
while (length--) {
method = methods[length];
// Only stub undefined methods.
if (!console[method]) {
console[method] = noop;
}
}
} ());
/* most popular config - ugly but needed
var MostPopularStoriesCategoryNumber = "188087";
var MostPopularVideosCategoryNumber = "188088";
var MostPopularNumberOfItems = "5";
var VideoLandingPage = "/video?autoStart=true&clipId=";
var FeaturedVideoFormat = false;
var MPslideshowURL = "/category/272402/slide-shows";
*/
var MostPopularInitType = "v";
var CDEVRAYCOM = {
options: {
},
loadHelper: function () {
document.write('');
},
checkIE: function () {
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer'){
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null){
rv = parseFloat( RegExp.$1 );
}
} else if (navigator.appName == 'Netscape'){
var ua = navigator.userAgent;
var re = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null){
rv = parseFloat( RegExp.$1 );
}
}
if(rv !== -1){
$wn('html').addClass('ie ie' + rv);
}
return;
},
memberCenter: function (){
var $container,
memberDiv,
//memberLink = [],
i;
if (window.memberLink === undefined) {
// the variable is not defined
memberLink = [
["/link/556954/registration?function=manageprofile&mode=login", "Log In"],
["/link/556954/registration?function=manageprofile&mode=create", "Sign Up"]
];
}
$wn('#WNHeader').addClass('cdev-member-center');
$container = $wn('.cdev-member-center');
$container.prepend('');
memberDiv = '";
$wn('.cdev-member-center-content').append(memberDiv);
return;
},
memberCenterWN: function (){
var $container;
$wn('#WNHeader').addClass('cdev-member-center cdev-member-center-wn');
$container = $wn('.cdev-member-center');
$container.prepend('');
if($wn('#WNContainerMemberSearch-headertop').length > 0){
$wn('.cdev-member-center-content').append($wn('#WNContainerMemberSearch-headertop'));
$wn(window).load(function(){
$wn('.cdev-member-center-content #WNMemberCenter-headertop strong').text('Member Center:').addClass('ready');
});
}
return;
},
headerSearchBox: function () {
var $container;
$wn('#WNBranding').addClass('cdev-header-search');
$container = $wn('.cdev-header-search');
$container.append($wn('#WNSearchBox-headertop'));
$wn('#WNSearchBox-headertop').find('.wnQueryText').attr('placeholder', 'Search');
return;
},
menuNavigation: function () {
var $nav,
navScroll,
wScroll,
currentContainerId = wng_pageInfo.containerId;
function getLinkNumber(st){
st = parseInt(st.replace( /(^.+\D)(\d+)(\D.+$)/i,'$2'), 10);
return st;
}
if(Worldnow.MenuMan.menus[0].removedNodes.length > 0){
$wn.each(Worldnow.MenuMan.menus[0].removedNodes, function(index, value) {
$wn('#WNMenuCol1').find('.wnLevel1').append(this.outerHTML);
if(this.innerHTML.indexOf('wnLevel2') > -1){
$wn('#' + this.id).addClass('wnHasSublevel');
}
});
$wn('#WNMenuCol1 .wnLevel1 > .wnHide').removeClass('wnHide');
}
$wn('#WNMenuCol1').addClass('cdev-menu-nav');
$nav = $wn('.cdev-menu-nav');
$nav.find('.wnLevel1 > li:last').addClass('cdev-main-last');
$wn('.wnLevel1 > li').each(function(i){
var $this = $wn(this),
anchorLink = $this.find('a').attr('href'),
linkNumber = getLinkNumber(anchorLink);
if(anchorLink === '/' /*|| window.location.pathname === '/'*/ || anchorLink.indexOf('/default.asp') !== -1){
linkNumber = 7849;
}
if(anchorLink.indexOf('/weather') !== -1 /*|| window.location.pathname === '/weather'*/){
linkNumber = 7850;
}
//console.log(anchorLink)
//console.log(anchorLink.indexOf('/weather'))
//console.log(anchorLink.indexOf('/weather') !== -1)
if(linkNumber === currentContainerId){
$this.addClass('current');
return;
}
});
/* set sticky */
navScroll = $nav.offset().top;
if(!Modernizr.touch){
$wn(window).scroll(function(e){
wScroll = $wn(window).scrollTop();
if(wScroll >= navScroll){
if(!$nav.hasClass('sticky')){
$nav.addClass('sticky');
}
return;
}
if(wScroll < navScroll){
if($nav.hasClass('sticky')){
$nav.removeClass('sticky');
}
}
return;
});
}
return;
},
bnMega: function (inputImg) {
var backupImg = inputImg || 'http://raycom.images.worldnow.com/images/6128805_G.jpg',
$container = $wn('#WNAd85'),
$target = $wn('#DisplaySizeId-30'),
customHTLML = '',
$bnContainer,
$p1,
totalBN,
k,
secondaryStories = '';
if($target.length === 0){
return;
}
$target.addClass('cdev-hidden');
$wn('#CDEV-bn-mega-temp').closest('.wnDVUtilityBlock').addClass('cdev-hidden');
if($container.length > 0){
$container.after(customHTLML);
} else {
$wn('#WNCols23-4').prepend(customHTLML);
}
$bnContainer = $wn('#CDEV-bn-mega');
$p1 = $bnContainer.find('.priority-1');
$p1.html($target.find('.priority-1').html());
if($p1.find('.summaryImage:not(".abridged")').length === 0){
$p1.prepend('');
} else {
$p1.find('.summaryImage:not(".abridged") img').attr('src', $p1.find('.summaryImage:not(".abridged") img').attr('data-path'));
}
if($p1.find('.wn-icon-video-included').length > 0){
$p1.find('.summaryImage:not(".abridged") a').append('');
}
$p1.find('.headline:not(".abridged")').append('Read More ');
$p1.find('.summary:not(".abridged")').before('Breaking News
');
$p1.find('.summary:not(".abridged")').after('Read More ');
totalBN = $target.find('.feature').length;
if(totalBN > 1){
for(k=1;k 2){
break;
}
secondaryStories = '' + $target.find('.feature:eq(' + k +')').html() + '
';
$bnContainer.find('.contentGroup').append(secondaryStories);
var $thisItem = $bnContainer.find('.priority-' + (k+1)),
$thisImgDiv = $thisItem.find('.summaryImage:not(".abridged")'),
$thisImg = $thisImgDiv.find('img');
if($thisImgDiv.length === 0){
$thisItem.prepend('');
} else {
$thisImg.attr('src', $bnContainer.find('.priority-' + (k+1)).find('.summaryImage:not(".abridged") img').attr('data-path'));
}
if($thisItem.find('.wn-icon-video-included').length > 0 || $thisItem.find('.wn-icon-clip').length > 0){
$thisItem.find('.summaryImage:not(".abridged") a').append('');
}
}
}
return;
},
tsr: function (inputImg) {
var backupImg = inputImg || 'http://raycom.images.worldnow.com/images/6128805_G.jpg',
$container = $wn('#DisplaySizeId-10'),
tsrHTML = '';
$container.addClass('cdev-hidden');
$wn('#CDEV-tsr').html(tsrHTML);
if($container.find('.priority-1').find('.summaryImage:not(".abridged")').length === 0){
$container.find('.priority-1').prepend('');
} else {
$container.find('.priority-1').find('.summaryImage:not(".abridged") img').after('
');
}
if($container.find('.priority-1 .wn-icon-video-included').length > 0){
$container.find('.priority-1').find('.summaryImage:not(".abridged") a').append('');
}
$container.find('.priority-1 .headline:not(".abridged")').append('Read More ');
$container.find('.priority-1').appendTo($wn('#CDEV-tsr').find('.left-panel'));
$container.find('.feature:lt(7)').appendTo($wn('#CDEV-tsr').find('.right-panel'));
if($wn('#CDEV-tsr .left-panel .priority-1').find('.sectionTitle .text').text().toLowerCase().indexOf('breaking') > -1){
$wn('#CDEV-tsr .left-panel').addClass('breaking');
$wn('#CDEV-tsr .breaking').prepend('');
}
$container.removeClass('cdev-hidden');
return;
},
topHeadline: function (containerId) {
var toMatch = function (ds) { return ds.attr('class').match(/displaySizeId([0-9-]+)/); };
$wn(containerId).addClass('cdev-top-headline');
$wn('.cdev-top-headline').find('.contentGroup').each(function () {
var $that = $wn(this);
//$that.find('.feature:eq(7)').addClass('last');
//$that.find('.feature:gt(7)').remove();
$that.find('.feature').each(function (item) {
var $this = $wn(this);
/*
if (item > 7) {
return;
};
*/
$this.find('.more .text').text('More');
var foundClass = toMatch($this);
if (foundClass !== null && foundClass[0] !== 'displaySizeId-7') {
$this.removeClass(foundClass[0]).addClass('displaySizeId-7');
} else if (foundClass === null) {
$this.addClass('displaySizeId-7');
}
});
});
Worldnow.EventMan.event('bodydone', function () {
$wn('.cdev-top-headline').find('.feature:eq(7)').addClass('last');
$wn('.cdev-top-headline').find('.feature:gt(7)').remove();
});
return;
},
hb2a: function (containerId,inputImg) {
var backupImg = inputImg || 'http://raycom.images.worldnow.com/images/6128805_G.jpg',
toMatch = function (ds) { return ds.attr('class').match(/displaySizeId([0-9-]+)/); };
$wn(containerId).addClass('cdev-hbox2a');
$wn('.cdev-hbox2a').find('.contentGroup').each(function () {
var $that = $wn(this);
$that.find('.feature:eq(6)').addClass('last');
$that.find('.feature:gt(6)').remove();
$that.find('.feature').each(function (item) {
var $this = $wn(this);
if (item > 6) {
return;
};
var foundClass = toMatch($this);
if(item === 0){
if (foundClass !== null && foundClass[0] !== 'displaySizeId-7') {
$this.removeClass(foundClass[0]).addClass('displaySizeId-7');
}
if($this.find('.summaryImage.abridged').length > 0){
$this.find('.summaryImage.abridged').prependTo($this);
} else {
$this.prepend(' ');
}
if($this.find('.wn-icon-video-included').length > 0){
$this.find('.summaryImage.abridged a').append('');
}
}
if(item > 0){
if (foundClass !== null && foundClass[0] !== 'displaySizeId-1') {
$this.removeClass(foundClass[0]).addClass('displaySizeId-1');
}
}
});
try{
$that.find('.feature.priority-1')
.find('.headline.abridged a').dotdotdot({
wrap : 'word',
height : 24
});
}catch(err){
console.log('hb2a Error: ' + err.message);
}
});
return;
},
headlineOnlyGrid: function (containerId) {
var toMatch = function (ds) { return ds.attr('class').match(/displaySizeId([0-9-]+)/); };
$wn(containerId).addClass('cdev-headline-only-grid');
$wn('.cdev-headline-only-grid').find('.contentGroup').each(function () {
var $that = $wn(this);
$that.find('.feature:eq(7)').addClass('last');
$that.find('.feature:gt(7)').remove();
$that.find('.feature').each(function (item) {
var $this = $wn(this);
if (item > 7) {
return;
};
var foundClass = toMatch($this);
if (foundClass !== null && foundClass[0] !== 'displaySizeId-1') {
$this.removeClass(foundClass[0]).addClass('displaySizeId-1');
}
});
});
return;
},
threeColumnGrid: function (containerId) {
var toMatch = function (ds) { return ds.attr('class').match(/displaySizeId([0-9-]+)/); };
$wn(containerId).addClass('cdev-three-column-grid');
$wn('.cdev-three-column-grid').find('.contentGroup').each(function () {
var $that = $wn(this);
$that.find('.feature:eq(5)').addClass('last');
$that.find('.feature:gt(5)').remove();
$that.find('.feature').each(function (item) {
var $this = $wn(this);
if (item > 5) {
return;
};
if (item%3 === 0){
$this.addClass('cdev-row');
$this.before(' ');
}
if (item%3 === 2){
$this.addClass('cdev-third');
}
if($this.find('.sectionTitle').length > 0){
$this.find('.summaryImage:not(".abridged")').insertAfter($this.find('.sectionTitle'));
} else {
$this.prepend(' ');
$this.find('.summaryImage:not(".abridged")').insertAfter($this.find('.sectionTitle'));
}
$this.find('.summaryImage:not(".abridged") a').prepend('
');
$this.find('.cdev-summary-info')
.prepend('
')
.prepend($this.find('.summary:not(".abridged") > .text'));
var foundClass = toMatch($this);
if (foundClass !== null && foundClass[0] !== 'displaySizeId-7') {
$this.removeClass(foundClass[0]).addClass('displaySizeId-7');
}
});
$that.find('.feature.last').after(' ');
});
try{
$wn(".cdev-three-column-grid")
.find('.headline:not(".abridged") a, .cdev-summary-info .text').dotdotdot({
// configuration goes here
ellipsis : ' ...',
wrap : 'word'
});
}catch(err){
console.log('threeColumnGrid Error: ' + err.message);
}
$wn('.cdev-three-column-grid').appendTo($wn('#CDEV-three-grid'));
return;
},
videoGrid: function (containerId,inputImg,count) {
var backupImg = inputImg || 'http://raycom.images.worldnow.com/images/6128805_G.jpg',
toMatch = function (ds) { return ds.attr('class').match(/displaySizeId([0-9-]+)/); },
targetCount = (count===null || count > 9) ? (8) : (count - 1);
$wn(containerId).addClass('cdev-video-grid');
$wn('.cdev-video-grid').find('.contentGroup').each(function () {
var $that = $wn(this);
$that.find('.feature:eq(' + targetCount + ')').addClass('last');
$that.find('.feature:gt(' + targetCount + ')').remove();
$that.find('.feature').each(function (item) {
var $this = $wn(this);
/* PS-2910 - START */
var videoURL = $this.find('.headline.abridged').find('a').attr('href');
if (videoURL == undefined){
videoURL = $this.find('.headline').not('.abridged').find('a').attr('href');
}
$this.find('.headline.abridged a').attr('href', videoURL);
$this.find('.summaryImage.abridged a').attr('href', videoURL);
/* PS-2910 - END */
/*
if (item > 5) {
return;
};
*/
if (item%3 === 0){
$this.addClass('cdev-row');
$this.before(' ');
}
if (item%3 === 2){
$this.addClass('cdev-third');
}
if($this.find('.summaryImage.abridged').length > 0){
$this.find('.summaryImage.abridged').prependTo($this);
} else {
$this.prepend(' ');
}
if($this.find('.sectionTitle').length > 0){
$this.find('.summaryImage.abridged').insertAfter($this.find('.sectionTitle'));
} else {
$this.prepend(' ');
$this.find('.summaryImage.abridged').insertAfter($this.find('.sectionTitle'));
}
$this.find('.summaryImage.abridged a').prepend('
');
if($this.find('.wn-icon-video-included').length > 0 || $this.find('.wn-icon-clip').length > 0){
$this.find('.summaryImage.abridged a')
.prepend('
')
}
$this.find('.cdev-summary-info')
.prepend('
')
.prepend($this.find('.summary:not(".abridged") > .text'));
var foundClass = toMatch($this);
if (foundClass !== null && foundClass[0] !== 'displaySizeId-7') {
$this.removeClass(foundClass[0]).addClass('displaySizeId-7');
}
});
$that.find('.feature.last').after(' ');
});
//console.log('before dot')
try {
$wn('.cdev-video-grid')
.find('.headline.abridged a, .cdev-summary-info .text').dotdotdot({
// configuration goes here
ellipsis : ' ...',
wrap : 'word'
});
} catch(err) {
console.log('videoGrid Error: ' + err.message);
}
//console.log('after dot')
$wn('.cdev-video-grid').appendTo($wn('#CDEV-video-grid'));
return;
},
moveHB4: function () {
var $target = $wn('#DisplaySizeId78');
if($target.length === 0){
return;
}
$target.insertAfter($wn('#WNAd43'));
return;
},
pollStyle: function () {
var $container = $wn('.wnItem.poll');
$container.each(function(){
var $this = $wn(this),
$contentGroup = $this.closest('.contentGroup');
$contentGroup.addClass('cdev-poll');
if($contentGroup.find('.header').length < 1){
$contentGroup.prepend('');
$contentGroup.css('margin-bottom', '15px');
return;
}
if(!$contentGroup.find('.header').is(':visible')){
$contentGroup.find('.header')
.removeClass('hide')
.css('display', 'block');
}
});
return;
},
formStyle: function (className){
var $container = $wn(className);
$container.each(function(){
var $this = $wn(this),
$contentGroup = $this.closest('.contentGroup'),
headline = $this.find('.headline .text').text();
$contentGroup.addClass('cdev-form');
if($contentGroup.find('.header').length < 1){
$contentGroup.prepend('');
$contentGroup.css('margin-bottom', '15px');
return;
}
if(!$contentGroup.find('.header').is(':visible')){
$contentGroup.find('.header')
.removeClass('hide')
.css('display', 'block');
}
});
return;
},
moreRibbon: function () {
var $header = $wn('.wnItem.header'),
$moreLink;
$header
.find('.more.enabled').each(function () {
var $this = $wn(this);
$this.find('.text').html('More');
$this.closest('.contentGroup').addClass('cdev-more-ribbon');
if (!$wn('html').hasClass('ie7')) {
if($this.closest('.contentGroup').find('.toggle').length === 0){
$this.closest('.contentGroup').find('.wnItem:last').after('');
}
$this.closest('.contentGroup').find('.toggle').addClass('cdev-more-link').prepend($this);
} else {
$this.closest('.contentGroup').find('.toggle').addClass('cdev-more-link').appendTo($this.closest('.contentGroup')).prepend($this);
}
});
$moreLink = $wn('.cdev-more-link .more.enabled');
$moreLink
.append(' ')
.find('.text').text('See More Articles');
$wn('#CDEV-video-grid .cdev-more-link .more.enabled .text').text('See More Videos');
return;
},
subscribeSignUp: function (signupId, targetPos) {
if($wn(signupId).length === 0){
return;
}
var $target = $wn(signupId);
$target.closest('.contentGroup').addClass('cdev-subscribe-signup');
/* var textHTML = '';
var fb = '
';
var twit = '';
var rss = '';*/
var subscr = '';
var affiliateName = wng_pageInfo.affiliateName;
if ( ( affiliateName == "KOLD" || affiliateName == "KAIT" || affiliateName == "KPLC" ||
affiliateName == "KTRE" || affiliateName == "WAFB" || affiliateName == "WALB" ||
affiliateName == "WAVE" || affiliateName == "WCSC" ||
affiliateName == "KFVS12" || affiliateName == "KLTV" || affiliateName == "WDAM" || affiliateName == "WFIE" ||
affiliateName == "WISTV" || affiliateName == "WMBF" || affiliateName == "WMCTV" || affiliateName == "KCBD" ||
affiliateName == "WLOX" || affiliateName == "WOIO" || affiliateName == "WTOL" || affiliateName == "WTVM" ||
affiliateName == "WVUE" || affiliateName == "WWBT" || affiliateName == "WXIX" )){
subscr = 'SUBSCRIBE
';
}else {
subscr = textHTML + '
SUBSCRIBE
';
}
subscr += fb + twit + rss;
subscr += '
';
$target.find('.wnSubmit.wnFormField').after(subscr);
if(targetPos.indexOf('DisplaySize') === -1){
var newDiv = '
';
$wn(targetPos).prepend(newDiv);
$wn('#CustomSubscribeDisplaySize').prepend($wn('.cdev-subscribe-signup'));
} else {
$wn(targetPos).prepend($wn('.cdev-subscribe-signup'));
}
return;
},
mostPopular: function (pageType) {
if($wn('#wnMostPopularTabbed').length > 0){
return;
}
var buildHTML = '';
buildHTML += '
';
buildHTML += '
';
/* BEGIN CUSTOMIZATION
===========================================================*/
buildHTML += '';
buildHTML += '
';
buildHTML += '
Videos
';
buildHTML += '
Stories
';
buildHTML += '
Slideshows
';
buildHTML += '
';
buildHTML += '
';
buildHTML += '
Videos
';
buildHTML += '
Notas
';
buildHTML += '
Galería de fotos
';
buildHTML += '
';
/*===========================================================
*/
buildHTML += '
';
buildHTML += '
';
buildHTML += '
';
buildHTML += '
Evangelist Franklin Graham prayed on a sidewalk outside the Pentagon Thursday after his invitation to a prayer service inside was withdrawn because of comments that insulted people of other religions. More>>
Posted: May 06, 2010 10:34 AM EDT
';
buildHTML += '
';
buildHTML += '
loading...
';
buildHTML += '
';
buildHTML += '
';
buildHTML += '
';
//buildHTML += '
Stories
';
//buildHTML += '
Videos
';
//buildHTML += '
Slideshows
';
buildHTML += '
';
buildHTML += '
';
buildHTML += '
';
/* BEGIN CUSTOMIZATION
===========================================================*/
switch(pageType) {
case 'story':
$wn('#DisplaySizeId78').after(buildHTML);
MostPopularInitType = (typeof raycomCustomInfo.MostPopularInitType == "undefined") ? "s" : raycomCustomInfo.MostPopularInitType;
break;
case 'clip':
$wn('#WNCol4').append(buildHTML);
MostPopularInitType = (typeof raycomCustomInfo.MostPopularInitType == "undefined") ? "v" : raycomCustomInfo.MostPopularInitType;
break;
default:
$wn('#DisplaySizeId78').after(buildHTML);
}
/*===========================================================
*/
document.write('
');
document.write('');
return;
},
extraAd: function (adNum, w, h, $container, method) {
var newOwnerInfo = $wn.parseJSON('{"' + wng_pageInfo.affiliateName.toLowerCase() + '": {"share":1 }}'),
$ad = '
',
wncc = wng_pageInfo.contentClassification.toLowerCase();
while (wncc.indexOf(" ") != -1) {
wncc = wncc.replace(" ", "");
}
$container[method]($ad);
var ad = new Worldnow.Ad({
id: adNum,
ownerinfo: newOwnerInfo,
width: w,
height: h,
wncc: wncc,
type: 'dom',
application: 'banner',
parent: 'WNAd' + adNum
});
ad.load();
return;
},
sectionHeadline: function () {
var $target = $wn('#WNCol23Top'),
buildHTML = '';
$target.prepend(buildHTML);
CDEVRAYCOM.extraAd('158', '120', '30', $wn('.section-header-ad'), 'append');
return;
},
teamFeed: function (parent, xmlFeed) {
WNHttpRequestManager.makeRequest(xmlFeed, {
onSuccess: function() {
var $data = $wn(this.response.responseXML),
$group = $data.find('group'),
$persons = $group.find('person'),
totalPerson = $persons.length,
buildHTML,
containerTitle,
containerId,
i;
if(totalPerson === 0){
return;
}
containerTitle = $group.attr('title') || '',
containerId = containerTitle.replace(/\s+/g, '-').toLowerCase() || '';
buildHTML = '
';
buildHTML += '
';
buildHTML += '';
for(i=1;i<=totalPerson;i++){
var $thisPerson = $wn($persons[(i-1)]),
name = $thisPerson.find('name').text() || '',
title = $thisPerson.find('title').text() || '',
image = $thisPerson.find('image').text() || '',
bio = $thisPerson.find('bio').text() || '',
facebook = $thisPerson.find('facebook-url').text() || '',
twitter = $thisPerson.find('twitter-url').text() || '',
email = $thisPerson.find('email').text() || '';
buildHTML += '';
buildHTML += '';
buildHTML += '
';
buildHTML += '
';
buildHTML += ' ';
buildHTML += ' ';
buildHTML += '
';
buildHTML += '
';
buildHTML += '
' + title + '
';
buildHTML += '
';
buildHTML += '
Facebook ';
buildHTML += '';
buildHTML += '
E-mail ';
buildHTML += '
';
buildHTML += '
';
buildHTML += '
';
buildHTML += ' ';
}
buildHTML += '
';
$wn('#' + parent).html(buildHTML);
return;
},
onError: function() {
console.log('error');
return;
}
});
return;
},
storyPage: function () {
$wn('#WNStoryUtils').addClass('cdev-social-icons clearfix').insertAfter($wn('#WNStoryHeader'));
return;
},
storyFeed: function (inputImg) {
var dataURLprefix = window.location.protocol + '//' + window.location.host + '/',
$body = $wn('body'),
hideAndShow,
windowWidth = 0,
t;
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};
/*
function getData(turl) {
return $wn.ajax({
dataType : 'xml',
url : turl,
type: 'GET'
});
}
*/
function handleData(jqXHR) {
var responseXML = jqXHR.response.responseXML,
$response = $wn(responseXML),
currentStoryId = wng_pageInfo.containerId,
$item = $response.find('item'),
itemLength = $item.length,
$prevtItem,
$nextItem,
i,
j,
itemSearched = 0,
gotPrev = false,
gotNext = false,
prevStory = {},
nextStory = {},
testPrev,
testNext,
backupImage = inputImg || 'http://ftpcontent.worldnow.com/wncustom/custom/raycom/2015/default_image.jpg';
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getStoryNumber(st){
st = parseInt(st.replace( /(^.+\D)(\d+)(\D.+$)/i,'$2'), 10);
return st;
}
function checkStoryNumber($item){
var thisStoryLink = $item.find('link').text();
thisStoryId = getStoryNumber(thisStoryLink);
if(thisStoryId === currentStoryId){
return true;
}
return false;
}
function getStoryInfo($item, obj){
// manage domain workaround
obj['url'] = $item.find('link').text().replace($item.find('link').text().substring(0, $item.find('link').text().indexOf('.com') + 5), dataURLprefix);
// should use this instead
//obj['url'] = $item.find('link').text();
obj['id'] = getStoryNumber($item.find('link').text());
obj['title'] = $item.find('title:first').text();
obj['image'] = $item.find('enclosure:first').attr('url') || backupImage;
}
if(itemLength > 0){
/* loop through to check prev item */
function getPrevStory(){
i = randomNumber(0, itemLength-1);
$prevtItem = $response.find('item:eq(' + i + ')');
testPrev = checkStoryNumber($prevtItem);
if(testPrev === false){
itemSearched = i;
gotPrev = true;
getStoryInfo($prevtItem, prevStory);
getNextStory();
return;
} else {
getPrevStory();
}
/*
for(i=0;i
';
buildHTML += '';
buildHTML += '
';
buildHTML += '
' + obj.title + ' ';
buildHTML += '
';
buildHTML += '';
$wn('.cdev-story-feed-arrows').append(buildHTML);
try{
$wn('.story-feed-headline').dotdotdot({
// configuration goes here
ellipsis : ' ...',
wrap : 'word'
});
}catch(err){
console.log('storyFeed Error: ' + err.message);
}
return;
}
$body.addClass('cdev-story-feed-arrows');
getPrevStory();
if(gotPrev === true){
renderStories('storyFeedprev', prevStory);
}
if(gotNext === true){
renderStories('storyFeednext', nextStory);
}
hideAndShow = debounce(function() {
windowWidth = $wn(window).width();
if(windowWidth < 1076){
$wn('.story-feed').removeClass().addClass('story-feed hidden');
} else if(windowWidth < 1305){
$wn('.story-feed').removeClass().addClass('story-feed narrow');
} else {
$wn('.story-feed').removeClass().addClass('story-feed');
}
}, 250);
window.addEventListener('resize', hideAndShow);
windowWidth = $wn(window).width();
if(windowWidth < 1076){
$wn('.story-feed').removeClass().addClass('story-feed hidden');
} else if(windowWidth < 1305){
$wn('.story-feed').removeClass().addClass('story-feed narrow');
} else {
$wn('.story-feed').removeClass().addClass('story-feed');
}
$wn('.story-feed').mouseenter(function(e){
var $this = $wn(this);
clearTimeout(t);
t = setTimeout(function(){
if(windowWidth > 1076 && windowWidth < 1305){
$this.removeClass('narrow');
}
},350);
return;
});
$wn('.story-feed').mouseleave(function(e){
clearTimeout(t);
if(windowWidth > 1076 && windowWidth < 1305){
$wn(this).addClass('narrow');
}
return;
});
}
return;
}
WNHttpRequestManager.makeRequest(dataURLprefix + '?clienttype=rss', {
onSuccess: function() {
handleData(this);
return;
},
onError: function() {
console.log('error');
return;
}
});
/*
getData(dataURLprefix + '?clienttype=rss')
.done(handleData)
.fail(function(){
console.log('story function error');
//alert('Sorry, there is an error processing your request. Please try again later.');
});
*/
return;
}
}
CDEVRAYCOM.loadHelper();
CDEVRAYCOM.checkIE();
Worldnow.EventMan.event('WNCol23done', function () {
//CDEVRAYCOM.sectionHeadline();
});
Worldnow.EventMan.event('WNCol4done', function () {
CDEVRAYCOM.moveHB4();
//csCustom2x2();
CDEVRAYCOM.extraAd('122', '2', '2', $wn('#WNCol4'), 'append');
});
Worldnow.EventMan.event('WNMenuCol1done', function () {
/*
if(wng_pageInfo.affiliateName !== 'WAFB'){
CDEVRAYCOM.memberCenter();
}
*/
CDEVRAYCOM.memberCenterWN();
CDEVRAYCOM.headerSearchBox();
CDEVRAYCOM.menuNavigation();
});
Worldnow.EventMan.event('bodydone', function () {
CDEVRAYCOM.moreRibbon();
CDEVRAYCOM.pollStyle();
CDEVRAYCOM.formStyle('.wnItem.quicksignup');
CDEVRAYCOM.formStyle('.wnItem.form');
if(wng_pageInfo.containerType === "S"){
CDEVRAYCOM.storyPage();
}
if(wng_pageInfo.containerClass === "story" || wng_pageInfo.containerClass === "clip"){
CDEVRAYCOM.mostPopular(wng_pageInfo.containerClass);
}
});
$wn(document).ready(function(){
if(wng_pageInfo.containerType === "S"){
CDEVRAYCOM.storyFeed('http://ftpcontent.worldnow.com/wncustom/custom/raycom/2015/default_image.jpg');
}
$wn('.displaySize .summary .more .text').text('More');
// if(wng_pageInfo.affiliateName !== 'WTOC' && wng_pageInfo.affiliateName !== 'WMCTV' && wng_pageInfo.affiliateName !== 'WWBT'){
// CDEVRAYCOM.extraAd('156', '120', '30', $wn('#WNAd156'), 'append');
// }
if($wn('#WNCol4').length > 0){
//start ps-2690 sinh
if(wng_pageInfo.affiliateId == 128){
if(!wng_pageInfo.containerId == 298316)
CDEVRAYCOM.extraAd('247', '300', '250', $wn('#WNCol4'), 'append');
}else
CDEVRAYCOM.extraAd('247', '300', '250', $wn('#WNCol4'), 'append');
//end ps-2690 sinh
}
if(wng_pageInfo.containerType === "C"){
if($wn('#DisplaySizeId-10').length > 0){
CDEVRAYCOM.extraAd('240', '300', '250', $wn('#DisplaySizeId-10'), 'after');
}
if($wn('body').hasClass('home')){
CDEVRAYCOM.extraAd('241', '300', '250', $wn('#DisplaySizeId82 .contentGroup:eq(1)'), 'after');
}
if($wn('#DisplaySizeId64').length > 0){
//start ps-2690 sinh
if(wng_pageInfo.affiliateId == 128){
if(!wng_pageInfo.containerId == 298316)
CDEVRAYCOM.extraAd('242', '300', '250', $wn('#DisplaySizeId64'), 'after');
}else
CDEVRAYCOM.extraAd('242', '300', '250', $wn('#DisplaySizeId64'), 'after');
//end ps-2690 sinh
}
if($wn('#WNDS64').length > 0){
//start ps-2690 sinh
if(wng_pageInfo.affiliateId == 128){
if(!wng_pageInfo.containerId == 298316)
CDEVRAYCOM.extraAd('242', '300', '250', $wn('#WNDS64'), 'after');
}else
CDEVRAYCOM.extraAd('242', '300', '250', $wn('#WNDS64'), 'after');
//end ps-2690 sinh
}
}
Worldnow.ColumnMan.resizeColumns();
$('#WNStoryHeader time').css('display', 'block'); // to hide the DST switch running in platform.load.js
});
$wn(window).load(function(){
Worldnow.ColumnMan.resizeColumns();
});
/*
function csCustom2x2() {
console.log('custom1')
$wn('#WNCol4').append('
');
console.log('custom2')
var ad = new Worldnow.Ad({
id: '122',
ownerinfo: {
aff: wng_pageInfo.affiliateName,
share: 1
},
width: '2',
height: '2',
wncc: wnAd_wncc,
type: 'dom',
application: 'banner',
parent: 'WNAd122'
});
console.log('custom3')
ad.load();
console.log('custom4')
};
*/