﻿var mini = 'mini'; if (!console) { var console = { log: function(a) { return } } } function OpenPopUp(a) { window.open(a) } function OpenPrintWindow(b, a) { var c = "status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=1, scrollbars=1, width=568, height=690"; if (a && a.length > 0) { b += a } window.open(b, "print", c) } function gotoPage(a) { switch (a) { case "AboutNicorette": window.location = "/quit-smoking-products/nicorette-products.aspx"; break; case "quittingsucks": window.location = "/Quitting-Sucks/Default.aspx"; break; case "Nicorette5Dollar": case "Nicorette7Dollar": window.location = "/Promotions/Nicorette-7-Dollar/Default.aspx"; break; case "mini": window.location = "/quit-smoking-products/Nicorette-mini.aspx"; break; case "DrDrewMiniMoments": window.location = "/Promotions/Mini-Moments-With-Dr-Drew.aspx"; break } } function GoToPrivacy() { window.open("http://consumer.gsk-chus.com/legal/privacy.aspx") } function CurrencyFormat(b) { var a = b.indexOf("."); if (a < 0) { return ("$" + b + ".00") } else { if (a == (b.length - 2)) { return ("$" + b + "0") } else { return ("$" + b) } } } (function(c) { if (!document.defaultView || !document.defaultView.getComputedStyle) { var b = jQuery.curCSS; jQuery.curCSS = function(g, e, h) { if (e === "background-position") { e = "backgroundPosition" } if (e !== "backgroundPosition" || !g.currentStyle || g.currentStyle[e]) { return b.apply(this, arguments) } var f = g.style; if (!h && f && f[e]) { return f[e] } return b(g, "backgroundPositionX", h) + " " + b(g, "backgroundPositionY", h) } } var a = c.fn.animate; c.fn.animate = function(e) { if ("background-position" in e) { e.backgroundPosition = e["background-position"]; delete e["background-position"] } if ("backgroundPosition" in e) { e.backgroundPosition = "(" + e.backgroundPosition } return a.apply(this, arguments) }; function d(e) { e = e.replace(/auto/g, ".%"); e = e.replace(/left|top/g, "0px"); e = e.replace(/right|bottom/g, "100%"); e = e.replace(/([0-9\.]+)(\s|\)|$)/g, "$1px$2"); var f = e.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/); return [f[1], f[2], f[3], f[4]] } c.fx.step.backgroundPosition = function(e) { if (!e.bgPosReady) { var f = c.curCSS(e.elem, "backgroundPosition"); if (!f) { f = "0px 0px" } f = d(f); f[0] = parseFloat(f[0], 10); f[2] = parseFloat(f[2], 10); e.start = [f[0], f[2]]; var g = d(e.options.curAnim.backgroundPosition); if (g[0] == "." && g[1] == "%") { g[0] = f[0]; g[1] = f[1] } else { g[0] = parseFloat(g[0], 10) } if (g[2] == "." && g[3] == "%") { g[2] = f[2]; g[3] = f[3] } else { g[2] = parseFloat(g[2], 10) } e.end = [g[0], g[2]]; e.unit = [g[1], g[3]]; e.bgPosReady = true } var h = []; h[0] = ((e.end[0] - e.start[0]) * e.pos) + e.start[0] + e.unit[0]; h[1] = ((e.end[1] - e.start[1]) * e.pos) + e.start[1] + e.unit[1]; e.elem.style.backgroundPosition = h[0] + " " + h[1] } })(jQuery); var NicoretteApp = { trackingElement: "*", trackingDataAttribute: "rel", trackingDataPrefix: "tracking:", fireClickTracking: function(b) { var a = $(this).attr(NicoretteApp.trackingDataAttribute).substr(NicoretteApp.trackingDataPrefix.length); if (typeof (ntptEventTag) != "undefined") { ntptEventTag("ev=" + a) } }, GetDocumentTitle: function() { if (document.title != null && document.title != "") { return document.title } return "Nicorette.com" }, BindTracking: function(b, a) { if (b == null) { b = NicoretteApp.trackingElement } if (a == null) { a = document } if (NicoretteApp.trackingDataAttribute != null) { b += "[" + NicoretteApp.trackingDataAttribute; if (NicoretteApp.trackingDataPrefix != null) { b += "^='" + NicoretteApp.trackingDataPrefix + "'" } b += "]" } $(b, a).bind("click", NicoretteApp.fireClickTracking) }, init: function() { $("body").css("visibility", "visible"); $("#share > a").click(function(b) { b.preventDefault(); $(".shareThisContainer").show() }); $(".shareThisCloseWin").click(function(b) { b.preventDefault(); $(".shareThisContainer").hide() }); if (typeof (Querystring) != "undefined") { var a = new Querystring(); if (a.contains("printfriendly")) { setTimeout(function() { window.print() }, 2000) } } $(".add-overlabel label").addClass("overlabel"); $(".add-overlabel label.overlabel").overlabel(); return } }; $(document).ready(function() { NicoretteApp.init() });