 var rrnl_cookies = { get: function(e) { var e = e + "="; var t = document.cookie.split(";"); for (var n = 0; n < t.length; n++) { var r = t[n]; while (r.charAt(0) == " ") r = r.substring(1, r.length); if (r.indexOf(e) == 0) { return r.substring(e.length, r.length) } } return null }, set: function(e, t, n) { if (n) { var r = new Date; r.setTime(r.getTime() + n * 24 * 60 * 60 * 1e3); var i = "; expires=" + r.toGMTString() } else { var i = "" } document.cookie = e + "=" + t + i + "; path=/;domain=runningroom.com" }, remove: function(e) { rrnl_cookies.set(e, "", -1) } }; var Modal = function() { this.create = function(o) { var i = this; return this.on_open(), window.modal = this, this.overlay = jQuery('<div class="rrnl_modal_overlay"></div>'), this.overlay.on("click", function(o) { o.stopPropagation(), i.remove() }), this.modal = jQuery('<div class="rrnl_modal"></div>'), this.modal.on("click", function(o) { o.stopPropagation() }), this.modal_close = jQuery('<div class="rrnl_modal_close"></div>'), this.modal_close.on("click", function(o) { o.stopPropagation(), i.remove() }), this.modal_inner = jQuery('<div class="rrnl_modal_inner"></div>'), this.modal_content = jQuery('<div class="rrnl_modal_content"></div>'), "object" == typeof o && this.modal_content.append(o), this.modal.append(this.modal_close), this.modal_inner.append(this.modal_content), this.modal.append(this.modal_inner), this.overlay.append(this.modal), jQuery("body").append(this.overlay), this.check_size(), window.addEventListener("resize", i.check_size), this }, this.remove = function() { null !== window.modal && (this.modal.remove(), this.overlay.remove(), this.on_close(), window.modal = null) }, this.check_size = function() { window.innerWidth > window.modal.modal.outerWidth() ? window.modal.modal.addClass("rrnl_modal_centered") : window.modal.modal.removeClass("rrnl_modal_centered") }, this.on_close = function() {}, this.on_open = function() {} }; jQuery(function($){ if(rrnl_cookies.get('modal__promo') != 'true'){ var css = '.rrnl_modal_overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;background:rgba(0, 0, 0, .75)}' + '.rrnl_modal{background:#fff;color:#333;box-shadow:0 3px 0 rgba(0, 0, 0, 0.075);text-align:left;position:fixed;z-index:10001;left:50%;top:50%;max-width:90%;max-height:90%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);box-sizing:border-box;}' + '.rrnl_modal *{box-sizing:border-box}' + '.rrnl_modal_inner{border:2px solid #fff;max-height:90vh;max-width:100%;overflow:auto;}' + '.rrnl_modal_content{background:#fff;color:#555}' + '.rrnl_form{display:block;margin:0;background-repeat:no-repeat;background-position:50% 0;width:600px;min-height:450px}' + '.rrnl_modal_content *{font:12px/1.5 "Myriad Pro", Myriad, "Lucida Grande", "Lucida Sans", Lucida, "Trebuchet MS", Arial, Helvetica, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}' + '.rrnl_title{font-size:27px;margin:0 0 30px;height:80px;line-height:82px;padding:0 40px;background:#e21836;color:#fff}' + '.rrnl_discount{line-height:1;float:left;margin:0 60px 20px 40px;width:20%;font-size:14px}' + '.rrnl_discount>em{display:block;font-style:normal;font-size:18px;line-height:1;text-transform:uppercase;margin-bottom:12px}' + '.rrnl_discount>strong{color:#e21836;line-height:1;font-weight:100;display:block;font-size:100px;position:relative;letter-spacing:-.1em;margin:-10px 0}' + '.rrnl_discount>strong>sup{font-size:30px;margin-left:15px;top:-10px;position:relative}' + '.rrnl_description{font-size:18px;color:#555;margin:0 40px;padding:15px 0}' + '.rrnl_fr .rrnl_description{padding:5px 0}' + '.rrnl_link{text-decoration:none !important;color:#e21836}' + '.rrnl_fieldset{clear:both;padding:20px 0;margin:20px 40px 0;border:none;border-top:1px solid #eee;border-bottom:1px solid #eee}' + '.rrnl_field{border:1px solid #ccc;height:32px;line-height:32px;padding:0 10px;margin:0;vertical-align:middle;background:#f8f8f8}' + '.rrnl_field:focus{outline:0}' + '.rrnl_firstname{width:49%;margin-bottom:10px}' + '.rrnl_lastname{width:49%;margin:0 0 10px 2%}' + '.rrnl_email{width:70%}' + '.rrnl_button{border:none;background:#e21836;color:#fff;width:27%;margin:0 0 0 2%;height:32px;line-height:32px;text-align:center;cursor:pointer;font-weight:700;vertical-align:middle}' + '.rrnl_footnote{font-size:12px;margin:0 40px;padding:20px 0}' + '.rrnl_modal_content iframe{display:block}' + '.rrnl_modal_content img{display:block}' + '.rrnl_modal_close{display:block;position:absolute;z-index:10001;width:24px;height:24px;cursor:pointer;text-indent:-8000px;overflow:hidden;right:-30px;top:-5px;background-size:24px auto;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASNJREFUeNrslrsKwjAYhVsXVxdx8VI38SU6Ojq7Cw7uPoCTt1V09x0cfAgHa8ULOPkSDhpPsAURmyZ/qgVJ4IMOPzkfLTmpzRiz0lwZK+VlBIyASKAL3AQyOqBFEaiBhWZ4FcxBIXKC90AEWbAGR8GMCIc910Q0J7PRBhwUwytB+CBuVnZDT+FNSIerCIQScW+iHIQPZfdV/a5bgYRyOEWA43+QKFHCqQKhxCl4zlHDObbGdbwEV5AHK9CnbKIjYIP7y/NP7wIH3EAbzIBP7krCdwvP+fitrEiNaSXYcJTGVBKQOeeeqkSS4TJlRRKglIy0RNxAUaNkeFntdQTcIHxEbEvODpxBLWpG1ANNMAU9jT+iOriAxjea0PyWG4H/EHgIMACEloKR5uyefQAAAABJRU5ErkJggg==)}' + '.rrnl_modal_error{padding:5px 30px}' + '@media only screen and (max-width: 680px){.rrnl_modal{width:90%}' + '.rrnl_modal_content img{max-width:100%}' + '.rrnl_form{width:100%;min-height:300px}' + '.rrnl_title{font-size:14px;margin:0 0 15px;padding:0;height:40px;line-height:40px;padding:0 15px}' + '.rrnl_discount{float:none;display:block;margin:0 15px;width:auto;font-size:12px;line-height:inherit}' + '.rrnl_discount>em{display:inline;font-size:12px;text-transform:none;margin:0}' + '.rrnl_discount>strong{color:#e21836;line-height:inherit;font-weight:700;display:inline;font-size:11px;letter-spacing:0;margin:0}' + '.rrnl_discount>strong>sup{font-size:inherit;margin:0;top:0;position:relative}' + '.rrnl_description{font-size:12px;margin:10px 15px 0;color:#000}' + '.rrnl_fieldset{padding:10px 0;margin:10px 15px 0;border:none;border-top:1px solid #eee;border-bottom:1px solid #eee}' + '.rrnl_email{width:100%;text-align:center}' + '.rrnl_button{width:100%;margin:5px 0 0}' + '.rrnl_footnote{font-size:11px;margin:0 15px;padding:10px 0 0}' + '.rrnl_modal_overlay .modal__promo{position:relative;top:auto:left:auto;}'; $('head').append('<style>'+css+'</style>'); var overlay = $('<div>'+ "<div class=\"modal__promo\"><form class=\"rrnl_form rrnl_en\" style=\"display: block;\" action=\"https:\/\/visitor.constantcontact.com\/d.jsp\" method=\"post\">\r\n<p><img src=\"https:\/\/d2fbmzf04vezg8.cloudfront.net\/img\/Lightbox\/email-signup_lightbox-0506.jpg\" alt=\"Get 15% off your first apparel purchase when you join our email list. Valid on regular price apparel only. Excludes sale items, footwear, socks and accessories.\"><\/p>\r\n<p class=\"rrnl_description\">Stay connected by joining our mailing list and be the first to know of our new arrivals, promotions and the latest race events!<\/p>\r\n<fieldset class=\"rrnl_fieldset\"><input id=\"newsletter\" class=\"rrnl_field rrnl_email\" name=\"ea\" type=\"text\"> <input name=\"m\" type=\"hidden\" value=\"1010990144290\"> <input name=\"p\" type=\"hidden\" value=\"oi\"> <button class=\"rrnl_button\">Subscribe<\/button><\/fieldset>\r\n<p class=\"rrnl_footnote\">Yes, I would like to join the Running Room mailing list. You can unsubscribe at any time. We take your privacy seriously and will not send your information to third parties. View our <a class=\"rrnl_link\" href=\"http:\/\/www.runningroom.com\/hm\/inside.php?id=3065\">privacy policy.<\/a><\/p>\r\n<\/form><\/div>" +'</div>'); var modal = new Modal(); modal.on_open = function(){ rrnl_cookies.set('modal__promo','true'); }; modal.create(overlay); }; }); 