if (typeof (Adk) == "undefined" || !Adk) { Adk = {} } if (typeof (Adk.Video) == "undefined" || !Adk.Video) { Adk.Video = {} } (function() { var d = new Date(); d.setMinutes(d.getMinutes() - (d.getMinutes() % 5)); var e = d.getFullYear().toString() + (d.getMonth() + 1).toString() + d.getDate().toString() + "-" + d.getHours().toString() + d.getMinutes().toString(); Adk.AdConfig = []; Adk.QueueAds = true; Adk.ExecuteQueue = function() { var i = jQuery; Adk.QueueAds = false; i.each(Adk.AdConfig, function(o, p) { Adk.RetrieveAd(p) }) }; Adk.Wait = function(r, q, o) { if (r() === true) { q() } else { var p = 0; var i = window.setInterval(function() { p += 200; if (r() === true) { window.clearInterval(i); q() } else { if (p >= o) { window.clearInterval(i) } } }, 200) } }; Adk.Ready = function(o) { var i = function() { return typeof (jQuery) != "undefined" && typeof (jQuery.writeCapture) != "undefined" && typeof (swfobject) != "undefined" }; if (i() === true) { o() } else { Adk.Wait(i, o, 10000) } }; Adk.ShowAd = function(p, o) { if (typeof (p) == "string") { p = document.getElementById(p) } o.eid = Adk.AdConfig.length; var i = [728, 90]; if (o.adsize) { i = o.adsize.split("x") } var r = document.createElement("div"); r.setAttribute("class", "adk"); var q = "width:" + i[0] + "px;height:" + i[1] + "px;position:relative;overflow:hidden;display:inline-block;padding:0;margin:0;"; if (r.style && r.style.cssText) { r.style.cssText = q } else { r.setAttribute("style", q) } r.id = "adk-ad-" + o.eid; p.appendChild(r); Adk.AdConfig.push(o) }; Adk.RetrieveAd = function(p) { var q = jQuery; var o = document.location.protocol; var i = o + "//social.bidsystem.com/async.axd?"; if (typeof (p) == "string") { i = p; p = {} } else { var r = q("#adk-ad-" + p.eid).offset(); p = q.extend({ pid: 0, appid: 0, plid: 23458, adsize: "", channel: "", backC: "", textC: "", linkC: "", placement: "", x: r.left, y: r.top }, p) } q.ajax({ url: i, data: p, async: false, cache: false, timeout: 10000, dataType: "jsonp", success: function(w, y, v) { if (w) { var x = q("#adk-ad-" + p.eid); if (w.Error) { x.html(w.Error) } else { if (w.Ads && w.Ads.length > 0) { if (p.adsize) { var t = p.adsize.split("x"); x.width(t[0]).height(t[1]) } x.css("display", "inline-block").css("overflow", "hidden"); var u = w.Ads[0]; var s = "<script type='text/javascript'>new Adk.Report('" + u.ReportId + "', " + p.pid + ", " + p.appid + ", '#adk-ad-" + p.eid + "');<\/script>"; x.writeCapture().html("<div class='ad'>" + u.Markup + "</div>" + s, { asyncAll: false, fixUrls: true, writeOnGetElementById: false, done: function() { } }); if (u.RefreshTime && u.RefreshTime > 0) { window.setTimeout(function() { Adk.RetrieveAd(u.RefreshUrl) }, u.RefreshTime) } } } } }, error: function(s, u, t) { } }) }; Adk.Click = function(i) { window.open(i) }; Adk.Akamstar = function(p, o) { var q = jQuery; var i = new Date().getTime(); q(window).unload(function() { var s = new Date().getTime() - i; var r = document.location.protocol; if (s < 1000) { q.ajax({ url: r + "//socpix.net/onAdRedirect.php?", data: { delta: s, iv: o, vd: p }, async: true, mothod: "GET", error: function(t, v, u) { } }) } }) }; Adk.FitImage = function(q, p, o) { var i = function() { var s = jQuery; q = s(q); var r = function() { if (o > p) { var t = q.width() / q.height(); var u = p / o; if (t >= u) { q.width(t * o); q.height(o) } else { q.height(q.height() / q.width() * p); q.width(p) } } else { var t = q.height() / q.width(); var u = o / p; if (t <= u) { q.height(t * p); q.width(p) } else { q.width(q.width() / q.height() * o); q.height(o) } } }; if (q.width() > 0 && q.height() > 0) { r() } else { q.load(r) } }; Adk.Ready(function() { i() }) }; Adk.ScaleResize = function(p, o, i) { Adk.FitImage(p, o, i) }; Adk.Feedback = function(i, q, o) { var p = jQuery; this.config = { element: (o == null) ? p("body") : p(o), adId: i, applicationId: q }; this.init() }; Adk.Feedback.prototype = { init: function() { var o = this; var p = jQuery; this.config.element.append("<div class='feedback'><ul class='feedback-menu'></ul></div>"); var i = p(".feedback", this.config.element); var q = p(".feedback-menu", i); this.config.element.hover(function() { i.show() }, function() { i.hide() }); i.css("left", this.config.element.width() - i.outerWidth() + "px").hover(function() { q.show() }, function() { q.hide() }); q.append("<li><a class='feedback-thumbUp'></a></li>"); p(".feedback-thumbUp", q).click(function() { console.log("test click succceeded") }); q.append("<li><a class='feedback-report'></a></li>") }, thumbUp: function() { }, report: function() { } }; Adk.Report = function(o, i, r, q) { var p = jQuery; this.target = (q == null) ? p("body") : p(q); this.adId = o; this.publisherId = i; this.applicationId = r; this.element = null; this.content = null; this.ad = null; this.other = null; this.otherContent = null; this.pubContent = null; this.init() }; Adk.Report.prototype = { init: function() { var i = this; var o = jQuery; this.ad = o(".ad", this.target); if (this.ad.size() == 0) { this.target.wrapInner("<div class='ad'></div>"); this.ad = o(".ad", this.target) } this.ad.append("<a class='report' href='javascript:void(0);'></a>"); this.element = o(".report", this.target); this.element.css("left", this.target.width() - 12 + "px"); this.element.hover(function() { i.element.addClass("report-hover") }, function() { i.element.removeClass("report-hover") }); this.element.click(function() { i.report() }) }, report: function() { var i = this; var o = jQuery; if (this.content == null) { o(this.target).append("<div class='report-form'><a class='report-undo' href='javascript:void(0);'>Undo</a><p>Please tell us why you don't like this ad.</p></div>"); this.content = o(".report-form", this.target); this.content.append("<a class='report-do' href='javascript:void(0);'><input type='radio' name='report-reason' value='Uninteresting' />Irrelevant</a>"); this.content.append("<a class='report-do' href='javascript:void(0);'><input type='radio' name='report-reason' value='Misleading' />Misleading</a>"); this.content.append("<a class='report-do' href='javascript:void(0);'><input type='radio' name='report-reason' value='Offensive' />Offensive</a>"); this.content.append("<a class='report-do' href='javascript:void(0);'><input type='radio' name='report-reason' value='Repetitive' />Repetitive</a>"); this.content.append("<a class='report-doOther' href='javascript:void(0);'><input type='radio' name='report-reason' value='Other' />Other</a>"); this.content.append("<div class='report-other'><textarea></textarea><button>Okay</button></div>"); this.content.append("<p><a class='report-pub' href='javascript:void(0);'>Publisher Controls</a></p>"); this.other = o(".report-doOther", this.content); this.otherContent = o(".report-other", this.content); this.other.click(function() { i.showOther() }); o("button", this.otherContent).click(function() { i.submitReport(i.other) }); o(".report-do", this.content).click(function() { i.hideOther(); i.submitReport(this) }); o(".report-undo", this.content).click(function() { i.cancel() }); o(".report-pub", this.content).click(function() { i.pubControl() }); this.hideOther() } if (this.ad.height() > 150) { o(".report-do", this.content).addClass("report-doTall"); o(".report-doOther", this.content).addClass("report-doTall") } this.element.hide(); this.ad.hide(); this.content.show() }, showOther: function() { var i = jQuery; this.otherContent.show(); i("textarea", this.otherContent).focus() }, hideOther: function() { var i = jQuery; i("textarea", this.otherContent).val(""); this.otherContent.hide() }, cancel: function() { var i = jQuery; if (this.content != null) { this.content.hide() } if (this.pubContent != null) { this.pubContent.hide() } this.ad.show(); this.element.show() }, pubControl: function() { var o = jQuery; var i = this; this.content.hide(); if (this.pubContent == null) { o(this.target).append("<div class='report-form' id='report-pub'><a class='report-undo' href='javascript:void(0);'>Undo</a><p>Publisher Controls</p></div>"); this.pubContent = o("#report-pub"); this.pubContent.append("<a class='report-do' href='javascript:void(0);'><input type='radio' name='report-reason' value='Block' />Block Ad</a>"); this.pubContent.append("<a class='report-do' href='javascript:void(0);'><input type='radio' name='report-reason' value='Broken' />Bug</a>"); this.pubContent.append("<div class='report-pubForm'><div class='report-pubFieldGroup'><span class='report-pubField'>Email</span><input type='text' size='10' id='email' /></div><div class='report-pubFieldGroup'><span class='report-pubField'>Password</span><input type='password' size='10' id='password' /></div><button>Okay</button></div>"); o("button", this.pubContent).click(function() { i.submitPubReport() }); o(".report-do", this.pubContent).click(function() { o("input", this).attr("checked", true) }); o(".report-undo", this.pubContent).click(function() { i.cancel(); i.report() }) } this.pubContent.show() }, submitPubReport: function(o) { var p = jQuery; var i = this; p.ajax({ url: "http://advertiser.cubics.com/reportAd.aspx?", dataType: "jsonp", jsonp: "callback", data: { adId: this.adId, publisherId: this.publisherId, applicationId: this.applicationId, reason: p("input[name=report-reason]:checked", this.pubContent).val(), email: p("#email", this.pubContent).val(), password: p("#password", this.pubContent).val(), other: "" }, success: function(r, s, q) { if (r && r.ok === true) { p(".report-done").hide(); p(".report-form").html("Request received. Please allow 24 hours for your request to be processed.").addClass("report-done") } else { p(".report-done").hide(); p(".report-form").append("<div class='report-done'>Unable to process your request.</div>") } }, error: function(r, s, q) { p(".report-done").hide(); p(".report-form").append("<div class='report-done'>Unable to process your request.</div>") } }) }, submitReport: function(i) { var o = jQuery; o.ajax({ url: "http://advertiser.cubics.com/reportAd.aspx?", dataType: "jsonp", jsonp: "callback", data: { adId: this.adId, publisherId: this.publisherId, applicationId: this.applicationId, reason: o("input", i).val(), other: o("textarea", this.otherContent).val()} }); this.content.html("Thanks for your feedback. Over time, this information helps us deliver more relevant ads to you."); this.content.addClass("report-done") } }; Adk.Video.DefaultConfig = { debug: false, title: "", description: "", player: { element: null, width: 400, height: 300, initCallback: null, completeUrl: null, completeCallback: null }, tag: { pid: 0, appid: 0, plid: 23458, channel: "", placement: "", ref: escape(window.location.href), duration: 30, isVpaid: true, adkext: true, backfill: true }, companions: [] }; Adk.Video.Config = Adk.Video.DefaultConfig; Adk.Video.IsActive = false; Adk.Video.BuildConfig = function(i) { var p = jQuery; Adk.Video.DefaultConfig.title = p("title").text(); Adk.Video.DefaultConfig.description = p("meta[property=description]").text(); if (typeof (i) != "undefined") { Adk.Video.Config = p.extend(true, Adk.Video.DefaultConfig, i) } var o = Adk.Video.UrlParameterByName("AdkAdId"); if (!isNaN(parseFloat(o)) && isFinite(o)) { Adk.Video.Config.tag.sadid = o } console.log(Adk.Video.Config) }; Adk.Video.UrlParameterByName = function(o) { var i = RegExp("[?&]" + o + "=([^&]*)").exec(window.location.search); return i && decodeURIComponent(i[1].replace(/\+/g, " ")) }; Adk.Video.ShowAd = function(i) { Adk.Ready(function() { if (!Adk.Video.IsActive) { Adk.Video.IsActive = true; var o = jQuery; Adk.Video.BuildConfig(i); var p = function() { Adk.Video.OnComplete(); window.setTimeout(function() { o("#" + Adk.Video.Config.player.element).empty(); o("#" + Adk.Video.Config.companions[0].element).empty() }, 5000) }; Adk.Video.BindEvent("complete", p); Adk.Video.BindEvent("error", p); if ((i.callbacks != null) && i.callbacks.noAdsCallback != null) { Adk.Video.BindEvent("NoAdsFound", i.callbacks.noAdsCallback) } Adk.Video.Embed(p) } }) }; Adk.Video.ShowModal = function(i) { Adk.Ready(function() { if (!Adk.Video.IsActive) { Adk.Video.IsActive = true; var v = jQuery; Adk.Video.BuildConfig(i); var q = Math.floor(Math.random() * 9999999); Adk.Video.Config.player.element = q + "-player"; Adk.Video.Config.companions = [{ element: q + "-companion", width: 300, height: 250}]; var E = Adk.Video.Config.tag.showSkipButton != null ? Adk.Video.Config.tag.showSkipButton : false; var D = Adk.Video.Config.tag.skipVisibilityDelay != null ? Adk.Video.Config.tag.skipVisibilityDelay : 0; if (E) { v("body").append("<div id='" + q + "' class='adk adk-hidden'><div class='videoModal-bg'></div><div class='videoModal'><div id='skip' class='skiplink'>&nbsp;</div><div id='" + q + "-companion' class='companion'></div><div id='" + q + "-player' class='player'></div><div id='" + q + "-like' class='like'></div></div><div class='videoModal-border'></div></div>"); v("#skip").hide() } else { v("body").append("<div id='" + q + "' class='adk adk-hidden'><div class='videoModal-bg'></div><div class='videoModal'><div id='" + q + "-companion' class='companion'></div><div id='" + q + "-player' class='player'></div><div id='" + q + "-like' class='like'></div></div><div class='videoModal-border'></div></div>") } var p = v("#" + q); var B = v(".videoModal", p); var w = v(".videoModal-bg", p); var u = v(".videoModal-border", p); var A = v(".player", B); var y = v(".companion", B); var o = v(".like", B); if (v.browser.msie && v.browser.version.substr(0, 1) == "6") { w.hide() } var z = function() { var H = 300; if (y.is(":empty")) { H = 0 } B.width(A.outerWidth() + H + 12 + "px"); u.width(B.width() + 16 + "px"); var G = (v(window).height() - B.height()) / 2 + v(window).scrollTop(); var F = (v(window).width() - B.width()) / 2 + v(window).scrollLeft(); B.css("top", G + "px").css("left", F + "px"); u.css("top", G - 8 + "px").css("left", F - 8 + "px"); w.width(v(window).width()).height(v(window).height()) }; var t = function() { z(); v("#" + q).removeClass("adk-hidden") }; Adk.Video.BindEvent("start", t); var s = function() { Adk.Video.OnComplete(); v("#" + q).addClass("adk-hidden").css("left", "-9000px"); window.setTimeout(function() { v("#" + q).remove(); v(Adk.Video.Config.companions).empty() }, 10000) }; Adk.Video.BindEvent("complete", s); Adk.Video.BindEvent("error", s); if ((i.callbacks != null) && i.callbacks.noAdsCallback != null) { Adk.Video.BindEvent("NoAdsFound", i.callbacks.noAdsCallback) } Adk.Video.Embed(s); z(); v(".videoModal-border").css("height", "316px"); v(".videoModal").css("height", "300px"); if (E) { v(".videoModal-border").css("height", "355px"); v(".videoModal").css("height", "345px"); var x = function() { if (v("#fb-like").length > 0) { v(".videoModal-border").css("height", "375px"); v(".videoModal").css("height", "360px") } }; jQuery(".videoModal-border").bind("ResizeForSkip.Adk.Video", x); var C = function() { v("#" + q).empty() }; var r = v("#skip"); r.bind("click", C); r.delay(D).queue(function() { r.show(); jQuery(".videoModal-border").trigger("ResizeForSkip.Adk.Video") }) } } }) }, Adk.Video.Embed = function(i) { var q = jQuery; q("#" + Adk.Video.Config.player.element).html("<div id='" + Adk.Video.Config.player.element + "-content'></div>"); var o = document.location.protocol; var p = Adk.Video.Config.debug === true ? "http://localhost:4491/client/Adk.Video.swf?" : o + "//icons.cubics.com/flash/Adk.Video.swf?g"; swfobject.embedSWF(p + e, Adk.Video.Config.player.element + "-content", Adk.Video.Config.player.width, Adk.Video.Config.player.height, "9.0.0", null, { config: escape(JSON.stringify(Adk.Video.Config)) }, { allowScriptAccess: "always", wmode: "transparent" }, null, function(r) { if (!r.success) { if (typeof (i) == "function") { i() } } }) }, Adk.Video.BindEvent = function(i, o) { var p = jQuery; p("#" + Adk.Video.Config.player.element).bind(i + ".Adk.Video", o) }; Adk.Video.UnbindEvent = function(i) { var o = jQuery; o("#" + Adk.Video.Config.player.element).bind(i + ".Adk.Video") }; Adk.Video.OnInit = function(i) { if (typeof (Adk.Video.Config.player.initCallback) == "function") { Adk.Video.Config.player.initCallback(i) } }; Adk.Video.OnEvent = function(i) { var o = jQuery; o("#" + Adk.Video.Config.player.element).trigger(i + ".Adk.Video") }; Adk.Video.OnComplete = function() { var o = jQuery; try { o("#" + Adk.Video.Config.player.element).unbind() } catch (i) { console.error("Unable to unbind video event handlers."); console.error(i) } if (typeof (Adk.Video.Config.player.completeCallback) == "function") { Adk.Video.Config.player.completeCallback() } Adk.Video.IsActive = false; if (Adk.Video.Config.player.completeUrl && Adk.Video.Config.player.completeUrl != "") { document.location = Adk.Video.Config.player.completeUrl } }; Adk.Video.AddLibrary = function(i) { var o = document.createElement("script"); o.type = "text/javascript"; o.src = i; o.async = true; n.appendChild(o) }; Adk.Video.ShowLike = function(o, i) { console.log("like: " + unescape(o)); console.log("like impression: " + unescape(i)); jQuery(".videoModal .like").empty().show().append("<div id='fb-root'></div>").append("<fb:like href='" + unescape(o) + "' send='false' width='400' show_faces='false'></fb:like>").css("position", "relative").css("margin-top", "5px").css("float", "left"); jQuery(".videoModal").css("width", "400px"); jQuery(".videoModal-border").css("height", "355px"); jQuery(".videoModal").css("height", "340px"); jQuery("html").attr("xmlns:fb", "http://ogp.me/ns/fb#"); window.fbAsyncInit = function() { FB.init({ appId: "140094339404393", status: true, cookie: true, xfbml: true }); FB.Event.subscribe("edge.create", function(p) { var q = jQuery.ajax({ url: unescape(i), type: "GET", dataType: "text" }) }) }; (function(t, p, u) { var r, q = t.getElementsByTagName(p)[0]; if (t.getElementById(u)) { return } r = t.createElement(p); r.id = u; r.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=140094339404393"; q.parentNode.insertBefore(r, q) } (document, "script", "facebook-jssdk")) }; Adk.Video.PlaceCompanionSimple = function(p, i) { var o = jQuery; o("#" + p).empty().writeCapture().append(unescape(i)).show().children().show() }; var n = document.getElementsByTagName("head")[0]; function g() { jQuery.noConflict(); if (typeof (jQuery.writeCapture) == "undefined") { c() } } function k() { var o = document.createElement("script"); var i = document.location.protocol; o.type = "text/javascript"; o.src = i + "//icons.cubics.com/script/jquery-1.5.2.min.js"; o.async = true; if (o.attachEvent) { o.attachEvent("onload", g) } else { o.addEventListener("load", g, false) } o.onreadystatechange = function() { if (o.readyState == "loaded" || o.readyState == "complete") { g() } }; n.appendChild(o) } function c() { var i = document.createElement("script"); var o = document.location.protocol; i.type = "text/javascript"; i.src = o + "//icons.cubics.com/script/jquery.writeCapture.min.js"; i.async = true; n.appendChild(i) } function b() { var o = document.createElement("script"); var i = document.location.protocol; o.type = "text/javascript"; o.src = i + "//icons.cubics.com/script/swfobject.js"; o.async = true; n.appendChild(o) } function m() { var i = document.createElement("script"); var o = document.location.protocol; i.type = "text/javascript"; i.src = o + "//icons.cubics.com/script/tremor.js"; i.async = true; n.appendChild(i) } if (typeof (jQuery) != "function") { k() } else { if (typeof (jQuery.writeCapture) == "undefined") { c() } } if (typeof (swfobject) == "undefined") { b() } m(); var l = false; var a = "icons.cubics.com/css/Adk.Ad.css"; var j = "//icons.cubics.com/css/Adk.Ad.css"; for (var h = 0; h < n.childNodes.length; h++) { if (n.childNodes[h].href && n.childNodes[h].href.indexOf(a) == 0) { l = true } } if (l === false) { var f = document.createElement("link"); f.rel = "stylesheet"; f.type = "text/css"; f.href = j + "?h" + e; n.appendChild(f) } Adk.Ready(function() { Adk.ExecuteQueue() }) })(); function nextWin(a) { window.open(a) } var JSON; if (!JSON) { JSON = {} } (function() { function f(n) { return n < 10 ? "0" + n : n } if (typeof Date.prototype.toJSON !== "function") { Date.prototype.toJSON = function(key) { return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function(key) { return this.valueOf() } } var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, rep; function quote(string) { escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function(a) { var c = meta[a]; return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + string + '"' } function str(key, holder) { var i, k, v, length, mind = gap, partial, value = holder[key]; if (value && typeof value === "object" && typeof value.toJSON === "function") { value = value.toJSON(key) } if (typeof rep === "function") { value = rep.call(holder, key, value) } switch (typeof value) { case "string": return quote(value); case "number": return isFinite(value) ? String(value) : "null"; case "boolean": case "null": return String(value); case "object": if (!value) { return "null" } gap += indent; partial = []; if (Object.prototype.toString.apply(value) === "[object Array]") { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || "null" } v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]"; gap = mind; return v } if (rep && typeof rep === "object") { length = rep.length; for (i = 0; i < length; i += 1) { if (typeof rep[i] === "string") { k = rep[i]; v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } else { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}"; gap = mind; return v } } if (typeof JSON.stringify !== "function") { JSON.stringify = function(value, replacer, space) { var i; gap = ""; indent = ""; if (typeof space === "number") { for (i = 0; i < space; i += 1) { indent += " " } } else { if (typeof space === "string") { indent = space } } rep = replacer; if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) { throw new Error("JSON.stringify") } return str("", { "": value }) } } if (typeof JSON.parse !== "function") { JSON.parse = function(text, reviver) { var j; function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === "object") { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v } else { delete value[k] } } } } return reviver.call(holder, key, value) } text = String(text); cx.lastIndex = 0; if (cx.test(text)) { text = text.replace(cx, function(a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) } if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { j = eval("(" + text + ")"); return typeof reviver === "function" ? walk({ "": j }, "") : j } throw new SyntaxError("JSON.parse") } } } ()); if (typeof console == "undefined") { console = { log: function() { }, debug: function() { }, info: function() { }, warn: function() { }, error: function() { }, group: function() { }, groupEnd: function() { }, trace: function() { } } };
