$(function() { globalEvents(); activateTabs(); $("body").removeClass("noJS").addClass("JS"); tb_detectMacXFF() && $("body").addClass("macff"); if ($("#nav ul.sf-menu").length > 0) { centerNav(); if ($.browser.msie) { $("#nav ul.sf-menu").superfish({ autoArrows: false, speed: 0 }); $.browser.version.substr(0, 1) < 7 && $("#nav li li:first-child").css("padding-top", "10px"); $("#nav li li:last-child").css({ "padding-bottom": "10px", "border-width": "0px 1px 1px" }) } else $("#nav ul.sf-menu").superfish({ autoArrows: false, speed: 400 }) } imgSwapper(); imgHover(); setupFAQs(); createPrintLinks("External Website Addresses in the Document") }); function globalEvents() { $("a[rel='ext']").attr("target", "_blank"); $("a.videoLink").click(function(b) { b.preventDefault(); cancelTheaterAutoRotation(); var a = $(this).attr("rel").split("::")[1].split("|"); playVideo($(this).attr("href"), "lbVideo", a[0], a[1], a[2], flashPrefix + "FlashVideoPlayer_scale.swf", "") }); $("a.top").length > 0 && $("a.top").hoverIntent(function() { $(this).parent("li").css("z-index", 199).siblings("li").css("z-index", 99); $(this).parent("li").parent("ul").css("z-index", 199).siblings("ul").css("z-index", 99) }, function() { $(this).parent("li").siblings("li").css("z-index", 99); $(this).parent("li").parent("ul").siblings("ul").css("z-index", 99) }); $(".print_button").click(function(a) { a.preventDefault(); window.print() }); $(".productCallout, .productUsed").length > 0 && $(".productCallout, .productUsed").equalHeights() } function activateTabs() { if ($("#productDetail").length > 0) { var a = $("#productDetail"); a.tabs(); SWFAddress.onChange = function() { handleChange(a) }; a.tabs({ select: function(c, b) { var a = b.tab.hash; a = a.replace("#", "/") + "/"; SWFAddress.setValue(a) } }) } } function handleChange(a) { var b = SWFAddress.getPath(); switch (b) { case "/" + tabIDs[0] + "/": a.tabs("select", 0); $("#shareBuyLinks").show(); $("#productDetail .imgWrapper img").show(); $("#productDetail h3").show(); break; case "/" + tabIDs[1] + "/": a.tabs("select", 1); $("#shareBuyLinks").show(); $("#productDetail .imgWrapper img").show(); $("#productDetail h3").show(); break; case "/" + tabIDs[2] + "/": a.tabs("select", 2); $("#shareBuyLinks").show(); $("#productDetail .imgWrapper img").show(); $("#productDetail h3").show(); break; case "/" + tabIDs[3] + "/": a.tabs("select", 3); $("#shareBuyLinks").hide(); $("#productDetail .imgWrapper img").hide(); $("#productDetail h3").hide(); break; default: a.tabs("select", 0); $("#shareBuyLinks").show(); $("#productDetail .imgWrapper img").show(); $("#productDetail h3").show() } } function parentWidth(a) { var b = 0; if (a.children().length > 0) a.children().each(function() { b += $(this).outerWidth() }); else b = a.outerWidth(); return b } function makeAnotherNav(b, c) { var d = parentWidth(b), a; a = $("<ul class='navline'></ul>"); while (d > c) { var e = b.children("li").eq(-1).prependTo(a); d = parentWidth(b) } a.insertAfter(b); b.children("li").add(a.children("li")).children("a").removeClass("top").removeClass("topLast").addClass("top"); b.children("li").eq(-1).add(a.children("li").eq(-1)).children("a.top").removeClass("top").addClass("topLast"); if (!($.browser.msie && $.browser.version.substr(0, 1) < 7)) parentWidth(a) > c && makeAnotherNav(a, c) } function centerNav() { var c = $("#nav ul:first-child"), b = 885; parentWidth(c) > b && makeAnotherNav(c, b); $("#nav").children("ul").length > 1 && $("#nav").children("ul").addClass($("#nav > ul:first-child").attr("class")); for (var a = 1; a <= $("#nav").children("ul").length; a++) $("#nav").children("ul").eq(-a).css("z-index", a * 100).children("li").css("z-index", a * 100); $("#nav > ul").each(function() { var a = $(this).outerWidth(); if (a < b + 1) $(this).css({ width: a + "px", "float": "none" }); else $(this).css({ width: b + "px", "float": "none" }) }) } function replaceDropdown(a) { for (var b = a.substring(1) + "LinkList", h = a.substring(1) + "Link", c = $(a + " option"), f = '<div id="' + b + '" class="ddlist">\n<a href="#" id="' + h + '">' + c.eq(0).text() + "</a>\n<ul>\n", e = 1; e < c.length; e++) f += '<li><a href="' + c.eq(e).val() + '">' + c.eq(e).text() + "</a></li>\n"; f += "</ul>\n</div>\n"; $(a).next("button").remove(); $(a).after(f); $(a).remove(); var g, d = $("#" + b); $("#" + h).click(function(a) { a.preventDefault(); if ($("#" + b + " ul").is(":visible")) { $("#" + b + " ul").slideUp("fast"); $(this).toggleClass("open"); clearTimeout(g) } else { $("#" + b + " ul").slideDown("fast"); $(this).toggleClass("open") } }); d.mouseleave(function() { if (d.children("ul").is(":visible")) g = setTimeout(function() { closeDropdown(d) }, 1e3) }); d.mouseenter(function() { clearTimeout(g) }) } function closeDropdown(a) { if (a.children("ul").is(":visible")) { a.children("ul").slideUp("fast"); a.children("a").toggleClass("open") } } function playVideo(r, e, b, a, q, j, n, u) { var i = $(window).height(), k = $(window).width(), t = false; b = parseInt(b); a = parseInt(a); if (b + 20 > k || a + 20 > i) { t = true; var c = b / a, m = b, l = a; if (a + 20 > i) { a = i * .75; b = m > l ? a * c : a / c; if (b + 20 > k) { b = k * .75; a = m > l ? b / c : b * c } } else { b = k * .75; a = m > l ? b / c : b * c; if (a + 20 > i) { a = i * .75; b = m > l ? a * c : a / c } } } if (r == "") return false; if (e == "") e = "lbVideo"; if (b == "") b = "532"; if (a == "") a = "420"; if (q == "") q = "9999"; if (j == null || j == "") j = flashPrefix + "FlashVideoPlayer_scale.swf"; var p = parseInt(b), o = parseInt(a) + 22; if (n == null || n == "") n = ""; var s = "9.0.115", d = $("#" + e); if (d.length == 0) d = createLBdiv(e, "body"); if (swfobject.hasFlashPlayerVersion(s)) { var w = e + "noflash", h = {}; h.videoUrl = r; h.videoWidth = b; h.videoHeight = a; h.videoDuration = q; var g = {}; g.menu = "false"; g.quality = "high"; g.wmode = "opaque"; g.bgcolor = "#3E3C3C"; var v = {}; swfobject.embedSWF(j, w, p, o, s, null, h, g, v) } else if (supports_html5_h264_video()) { var f = {}; f.src = r; f.width = b; f.height = a; f.controls = "true"; var x = $("<video></video>").attr(f); d.html(""); d.append(x) } if (!u) if (!t) $.fn.colorbox({ innerWidth: p, innerHeight: o, inline: true, href: "#" + e, onOpen: function() { $.browser.mozilla && ScrollFreeze.on(); $("html").css({ overflow: "hidden" }) }, onCleanup: function() { d.hide(); $("html").css({ overflow: "auto" }) }, onClosed: function() { d.remove(); $.browser.mozilla && ScrollFreeze.off() }, opacity: .5 }); else $.fn.colorbox({ innerWidth: p, innerHeight: o, inline: true, href: "#" + e, onOpen: function() { }, onCleanup: function() { d.hide() }, onClosed: function() { d.remove() }, opacity: .5 }) } function supports_html5_h264_video() { if (!document.createElement("video").canPlayType) return false; else { var a = document.createElement("video"); return a.canPlayType("video/mp4") } } function createLBdiv(d, f) { var a = $("<div></div>").attr({ id: d }), b = $("<div></div>").attr("id", d + "noflash").addClass("no-flash"), g = $("<p></p>").text(nonflashVideoContentPart1).attr("style", "padding-top:30px"), e = $("<a></a>").attr({ href: nonflashVideoContentPart2LinkUrl, target: "_blank" }).text(nonflashVideoContentPart2LinkText), c = $("<p></p>").text(nonflashVideoContentPart2Text); c.prepend(e); b.append(g).append(c); a.append(b); $(f).append(a); return a } function setupGTLCarousel() { var d = false, a = false, b = 6; if ($("#gtlSlider ul li").length > b) { var f = $("<p>Prev</p>").attr("id", "sliderPrev").insertAfter("#gtlSlider"), e = $("<p>Next</p>").attr("id", "sliderNext").insertAfter("#gtlSlider"); a = true; d = true } var c = 1; if ($("#gtlSlider a.current").length > 0) c = $("#gtlSlider a.current").parent("li").index(); $("#gtlSlider").jCarouselLite({ btnPrev: a ? "#" + f.attr("id") : "", btnNext: a ? "#" + e.attr("id") : "", mouseWheel: true, circular: d, visible: b, auto: 0, speed: 300, start: c }); $("#gtlSlider li a").click(function() { if ($(this).hasClass("current")) return false; $(this).parent("li").siblings().children("a").removeClass("current"); $(this).addClass("current") }) } var homepageTheaterCurrentIndex = -1, homepageTheaterAutoRotationIntervalId = 0, homepageTheaterAutoRotationWaitTime = 8e3, homepageJCarouselliteShownElements = 5; function setupHomepageTheater() { var e = false, a = false, b = homepageJCarouselliteShownElements; if ($("#theaterNavSlider ul li").length > b) { var d = $("<p>Prev</p>").attr("id", "sliderPrev").insertAfter("#theaterNavSlider"), c = $("<p>Next</p>").attr("id", "sliderNext").insertAfter("#theaterNavSlider"); a = true } $("#sliderPrev").click(function() { cancelTheaterAutoRotation() }); $("#sliderNext").click(function() { cancelTheaterAutoRotation() }); $("#theaterNavSlider").jCarouselLite({ btnPrev: a ? "#" + d.attr("id") : "", btnNext: a ? "#" + c.attr("id") : "", mouseWheel: true, circular: e, visible: b, auto: 0, speed: 300 }); $(".theaterDiv").hide(); $("#theaterDefault").show(); $("#theaterNavSlider li a").hoverIntent(function() { cancelTheaterAutoRotation(); showTheaterNavItem(this, true) }, function() { startHomepageTheaterAutorotation($(this).parent("li").index(), homepageTheaterAutoRotationWaitTime) }); $("a#navSliderClose").click(function(a) { a.preventDefault(); if ($(this).hasClass("open")) { $("#sliderWrap").animate({ bottom: -80 }, 1250, "easeOutBack"); $("#theaterNavSlider ul li a img").animate({ top: -66 }, 1250); $(this).css({ "background-position": "top right" }).toggleClass("open") } else { $("#sliderWrap").animate({ bottom: -1 }, 1250, "easeInBack"); $("#theaterNavSlider ul li a img").animate({ top: 0 }, 1250); $(this).css({ "background-position": "top left" }).toggleClass("open") } cancelTheaterAutoRotation() }) } function callJCarouselLiteGoFunction(b) { var a = 0; if (b >= homepageJCarouselliteShownElements) { a = b - homepageJCarouselliteShownElements + 1; parent.jcarousellitegofunction(a) } } function startHomepageTheaterAutorotation(b, a) { homepageTheaterAutoRotationIntervalId = setTimeout(function() { autoRotationShowNextHomepageTheaterIndex(b) }, a) } function autoRotationShowNextHomepageTheaterIndex(a) { if (a != homepageTheaterCurrentIndex) homepageTheaterCurrentIndex = a + 1; else homepageTheaterCurrentIndex++; if (homepageTheaterCurrentIndex > $("#theaterNavSlider ul li").length - 1) showDefaultImageAndCancelAutoRotation(); else { showTheaterNavIndex(homepageTheaterCurrentIndex); callJCarouselLiteGoFunction(homepageTheaterCurrentIndex) } homepageTheaterAutoRotationIntervalId = setTimeout(function() { autoRotationShowNextHomepageTheaterIndex(homepageTheaterCurrentIndex) }, homepageTheaterAutoRotationWaitTime) } function showDefaultImageAndCancelAutoRotation() { cancelTheaterAutoRotation(); homepageTheaterCurrentIndex = -1; $(".theaterDiv").fadeOut(1200); $("#theaterDefault").fadeIn(1200); $("#theaterNavSlider ul li a").each(function(b, a) { $(a).removeClass("current") }); $("#theaterNavSlider ul li").length > homepageJCarouselliteShownElements && parent.jcarousellitegofunction(0) } function cancelTheaterAutoRotation() { if (homepageTheaterAutoRotationIntervalId != undefined && homepageTheaterAutoRotationIntervalId != 0) { clearTimeout(homepageTheaterAutoRotationIntervalId); homepageTheaterAutoRotationIntervalId = 0 } } function showTheaterNavIndex(a) { showTheaterNavItem($("#ctl00_ContentPlaceHolder1_lvFilmStrip_ctrl" + a + "_hlFilmStripLink"), false) } function showTheaterNavItem(b) { if ($(b).hasClass("current")) return; $(b).parent("li").siblings().children("a").removeClass("current"); var d = "#theater", a = $(b).attr("className").split(" "); if (a.length >= 1) { for (var c = 0; c < a.length; c++) if (a[c].match(/sNav/i)) { d += a[c].replace(/sNav/i, ""); break } } else d += "Default"; $(b).addClass("current"); $(".theaterDiv").fadeOut(1200); $(d).fadeIn(1200) } function theaterTakeover(c, a, b) { setTimeout(function() { animateTheaterTakeover(a, b) }, c) } function animateTheaterTakeover(c, b) { var a = -1; switch (b) { case 920: a = -6; break; case 444: switch (c) { case 0: a = -6; break; case 1: a = 470 } break; case 286: switch (c) { case 0: a = -6; break; case 1: a = 311; break; case 2: a = 629 } } if (a != -1) { $(".homepageTakeover").parents("#hpTheater").css("overflow", "visible").end().animate({ height: [106, "swing"], top: [389, "linear"], width: [b, "swing"], left: [a, "easeOutSine"], opacity: [.5, "easeInQuint"] }, 1500, function() { $(this).parents("#hpTheater").css("overflow", "hidden").end().hide("slow", function() { startHomepageTheaterAutorotation(homepageTheaterCurrentIndex, homepageTheaterAutoRotationWaitTime) }) }); $(".homepageTakeover img").animate({ height: [106, "swing"], width: [b, "swing"] }, 1500) } else $("#homepageTakeover").fadeOut("slow", function() { startHomepageTheaterAutorotation(homepageTheaterCurrentIndex, homepageTheaterAutoRotationWaitTime) }) } var prodHairCareLandingPageAutoRotationCurrentIndex = 0, prodHairCareLandingPageAutoRotationIntervalId = 0, prodHairCareLandingPageAutoRotationWaitTime = 4e3, channelBrandingImgObjs = [], prodFamImgObjs = []; function imgSwapper() { if (typeof prodFamFileNames != "undefined" && typeof channelBrandingFileNames != "undefined") { var b = prodFamFileNames.length, c = channelBrandingFileNames.length; if (b == c) { for (var a = 0; a < b; a++) { channelBrandingImgObjs[a] = $("<img />").attr({ src: channelBrandingFileNames[a], "class": "channelBrandingImg" }).appendTo("#col1").hide(); prodFamImgObjs[a] = $("<img />").attr({ src: prodFamFileNames[a], "class": "productLineup", width: "229", height: "204" }).appendTo("#innerPLcol1").hide() } $("#productLinks li").eq(0).addClass("current"); channelBrandingImgObjs[0].add(prodFamImgObjs[0]).show(); $("#productLinks a").hoverIntent(function() { cancelProdHairCareLandingPageAutoRotation(); var a = $(this).parent("li").index(); $(this).parent("li").addClass("current").siblings().removeClass("current"); $(".productLineup,.channelBrandingImg").fadeOut("slow"); channelBrandingImgObjs[a].add(prodFamImgObjs[a]).fadeIn("slow") }, function() { }); startProdHairCareLandingPageAutoRotation(prodHairCareLandingPageAutoRotationWaitTime) } } if (typeof ourExpertsImageAutoRotation != "undefined" && ourExpertsImageAutoRotation == true) { $(".landing #col2 #contentWrap #innerCol1 #imageBlock a").eq(0).siblings().hide(); startOurExpertsLandingPageAutoRotation(ourExpertsLandingPageAutoRotationWaitTime) } } function startProdHairCareLandingPageAutoRotation(a) { prodHairCareLandingPageAutoRotationIntervalId = setInterval("prodHairCareLandingPageAutoRotationShowNextImgs()", a) } function prodHairCareLandingPageAutoRotationShowNextImgs() { prodHairCareLandingPageAutoRotationCurrentIndex++; if (prodHairCareLandingPageAutoRotationCurrentIndex >= $("#productLinks #innerPLcol2 ul li").length) { cancelProdHairCareLandingPageAutoRotation(); $("#productLinks li").removeClass("current"); $("#col1 img").last().siblings().add($("#innerPLcol1 img").last().siblings()).hide(); $("#col1 img").last().add($("#innerPLcol1 img").last()).fadeOut("slow"); $("#col1 img").first().add($("#innerPLcol1 img").first()).fadeIn("slow"); prodHairCareLandingPageAutoRotationCurrentIndex = -1 } else { $("#productLinks li").eq(prodHairCareLandingPageAutoRotationCurrentIndex).addClass("current").siblings().removeClass("current"); channelBrandingImgObjs[prodHairCareLandingPageAutoRotationCurrentIndex].add(prodFamImgObjs[prodHairCareLandingPageAutoRotationCurrentIndex]).fadeIn("slow") } } function cancelProdHairCareLandingPageAutoRotation() { if (prodHairCareLandingPageAutoRotationIntervalId != undefined && prodHairCareLandingPageAutoRotationIntervalId != 0) { clearInterval(prodHairCareLandingPageAutoRotationIntervalId); prodHairCareLandingPageAutoRotationIntervalId = 0 } } function imgHover() { if ($("div#whereToBuy").length > 0) { $("#whereToBuy #col1, #whereToBuy #col2").equalHeights(); $("#whereToBuy #col1 .innercol ul, #whereToBuy #col2 .innercol ul").equalHeights();$("#whereToBuy img").hover(function() { var a = $(this); a.attr("src").indexOf("-over") != -1 && a.attr("src", a.attr("src").replace("-over", "")); a.data("origSrc", $(this).attr("src")); var f = a.attr("src"), b = f.split("."), d = b.length, c = f.replace(b[d - 2] + "." + b[d - 1], ""), e = b[d - 2] + "-over." + b[d - 1]; if ($("img[src=" + c + e + "]").length < 1) { a.attr("src", c + e); $("<img />").attr({ src: c + e, style: "display: none;" }).appendTo("body").bind("load", function() { a.attr("src", c + e) }); } else { a.attr("src", c + e) } }, function() { $(this).attr("src") != $(this).data("origSrc") && $(this).attr("src", $(this).data("origSrc")) }) } } var ourExpertsLandingPageAutoRotationCurrentIndex = 0, ourExpertsLandingPageAutoRotationIntervalId = 0, ourExpertsLandingPageAutoRotationWaitTime = 4e3, ourExpertsRotatingImgObjs = []; function startOurExpertsLandingPageAutoRotation(a) { ourExpertsLandingPageAutoRotationIntervalId = setInterval("ourExpertsLandingPageAutoRotationShowNextImgs()", a) } function ourExpertsLandingPageAutoRotationShowNextImgs() { ourExpertsLandingPageAutoRotationCurrentIndex++; if (ourExpertsLandingPageAutoRotationCurrentIndex >= $(".landing #col2 #contentWrap #innerCol1 #imageBlock a").length) ourExpertsLandingPageAutoRotationCurrentIndex = 0; $(".landing #col2 #contentWrap #innerCol1 #imageBlock a").eq(ourExpertsLandingPageAutoRotationCurrentIndex).fadeIn("slow").siblings().fadeOut("slow") } function setupFAQs() { if ($("#faqContent").length > 0) { $("dl dd").hide(); $("dl dt").addClass("closedFAQ"); $("<a href='#' />").addClass("faqToggle").appendTo("dl dt").click(function(a) { a.preventDefault(); if ($(this).hasClass("open")) { $(this).parents("dt").next("dd").slideUp(); !$(this).parents("dt").prevAll("dt").first().children("a").hasClass("open") && $(this).parents("dt").addClass("closedFAQ").removeClass("openFAQ"); !$(this).parents("dt").nextAll("dt").first().children("a").hasClass("open") && $(this).parents("dt").nextAll("dt").first().addClass("closedFAQ").removeClass("openFAQ") } else $(this).parent("dt").addClass("openFAQ").removeClass("closedFAQ").next("dd").slideDown().next("dt").addClass("openFAQ").removeClass("closedFAQ"); $(this).toggleClass("open") }) } } function getQueryVariable(e) { var a = window.location.search.substring(1); a = a.replace("&amp;", ";AMP;"); for (var d = a.split("&"), b = 0; b < d.length; b++) { var c = d[b].split("="); if (c[0] == e) return c[1] } return "none" } function moveBTTLink() { var a = $("a#backToTop").click(function() { $("html, body").animate({ scrollTop: "0px" }, 700); return false }); a.hide(); if ($(window).scrollTop() > $(window).height()) { a.show(); $("html, body").animate({ scrollTop: $(window).scrollTop() + 1 }, 1) } var b = $("#discProdContent").offset().top + $("#discProdContent").height() + 5 + "px", c = "10px"; a.css({ position: "absolute", top: b, left: c }); $(window).bind("scroll", function() { $(".discProdItem").each(function() { if ($(window).scrollTop() + $(window).height() - $(this).height() > $(this).offset().top && $(window).scrollTop() > $(window).height() / 2) { a.show(); var c = 0; if ($.browser.msie && $.browser.version.substr(0, 1) < 7) c = 10; b = $(this).offset().top - $(this).height() + 35 - c + "px"; a.stop().animate({ top: b }) } }) }) } (function(a) { a.fn.equalHeights = function(c, b) { tallest = c ? c : 0; this.each(function() { a(this).height("auto") }); this.each(function() { if (a(this).height() > tallest) tallest = a(this).height() }); if (b && tallest > b) tallest = b; return this.each(function() { a(this).height(tallest) }) } })(jQuery); function validateOnBlur(b, c) { for (var a = 0; a < b.length; a++) if (b[a].id.indexOf(c.attr("id")) != -1) if (!b[a].isvalid) { var d = b[a].id.substring(b[a].id.length - 1) - 1; c.siblings("span").eq(d).css("display", "block"); c.siblings("span:visible").css("display", "block") } } function tb_detectMacXFF() { var a = navigator.userAgent.toLowerCase(); if (a.indexOf("mac") != -1 && a.indexOf("firefox") != -1) return true } function createPrintLinks(f) { var d = $('a[target="_blank"]'); if ($(d).length) { var b = $("<fieldset>", { css: { clear: "both"} }).addClass("print_only"), g = $("<legend>", { text: f }).appendTo(b), e = $("<ol>").appendTo(b), a = [], c = 0; $.each(d, function(h) { var k = $(this).text(), b = $(this).attr("href"); if (b.substring(0, 7) != "http://") if (b.substring(0, 1) != "/") b = "http://" + document.location.host + b; else b = "http://" + document.location.host + "/" + b; a[h] = b; var g = false, f = 0, d = -1; for (var i in a) if (a[i] == a[h]) { f++; d++; if (f > 1) { g = true; break } } if (d <= 0) c++; $("<span>", { text: " [" + c + "]" }).appendTo($(this)).addClass("print_only"); if (!g) var j = $("<li>", { text: b }).appendTo(e) }); $("body").append(b) } } ScrollFreeze = { propFlag: true, Ydisp: 0, Xdisp: 0, on: function() { this.getProp() && $(window).bind("scroll", function() { ScrollFreeze.setXY() }) }, off: function() { $(window).unbind("scroll"); $(window).scrollTop() != $(window).data("yOffset") && setTimeout(this.setXY, 5) }, getProp: function() { this.Ydisp = $(window).scrollTop(); $(window).data("yOffset", this.Ydisp); return this.propFlag }, setXY: function() { $(window).scrollTop($(window).data("yOffset")) } }; function riaTrack(a) { goToPage(a) } function goToPage(a) { dcsMultiTrack("DCS.dcsuri", a, "DCS.dcsqry", "", "WT.ti", a); firstTracker._trackPageview(a); secondTracker._trackPageview(a) } function getQuerystring(b, a) { if (a == null) a = ""; b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var d = new RegExp("[\\?&]" + b + "=([^&#]*)"), c = d.exec(window.location.href); return c == null ? a : c[1] };
