From 28b9262fcbbd60329f184e2e3eb77ce149c4bbdc Mon Sep 17 00:00:00 2001 From: Kevin Fitzgerald Date: Fri, 9 Sep 2016 13:11:22 -0500 Subject: [PATCH] Tagged as v0.8.4 --- bower.json | 2 +- dist/okanjo-bundle.js | 37 ++++++++++++++++++-------------- dist/okanjo-bundle.min.js | 18 ++++++++-------- dist/okanjo-bundle.min.js.map | 2 +- dist/okanjo-metrics.js | 4 ++-- dist/okanjo-metrics.min.js | 10 ++++----- dist/okanjo-metrics.min.js.map | 2 +- dist/okanjo-templates.js | 6 +++--- dist/okanjo-templates.min.js | 6 +++--- dist/okanjo-templates.min.js.map | 2 +- dist/okanjo.js | 31 +++++++++++++++----------- dist/okanjo.min.js | 14 ++++++------ dist/okanjo.min.js.map | 2 +- package.json | 2 +- 14 files changed, 74 insertions(+), 64 deletions(-) diff --git a/bower.json b/bower.json index 51beaa2..1ac4391 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "okanjo", "main": "dist/okanjo-bundle.min.js", - "version": "0.8.3", + "version": "0.8.4", "authors": [ "Okanjo Partners Inc" ], diff --git a/dist/okanjo-bundle.js b/dist/okanjo-bundle.js index a30da15..44c1c1f 100644 --- a/dist/okanjo-bundle.js +++ b/dist/okanjo-bundle.js @@ -1,4 +1,4 @@ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ (function(root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); @@ -25,7 +25,7 @@ okanjo = ok || {}; // Override version with this version - okanjo.version = "0.8.3"; + okanjo.version = "0.8.4"; // Override these later okanjo.qwery = noop; @@ -4677,7 +4677,7 @@ if (typeof JSON !== 'object') { // Load the container with placeholders to see how big we expand to. var size, items = [], i = 0, //sizes = '980x120|980x90|970x250|970x90|970x66|960x90|950x90|930x180|750x300|750x200|750x100|728x90|580x400|468x60|336x280|320x100|320x50|300x1050|300x600|300x250|300x100|300x50|300x31|292x30|250x360|250x250|240x400|240x133|234x60|220x90|200x446|200x200|180x150|160x600|125x125|120x600|120x240|120x60|88x31'.split('|'), - sizes = '300x250|728x90|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60'.split('|'), + sizes = '728x90|300x250|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60'.split('|'), sizeInstance, sizeInstanceWidth, sizeInstanceHeight; for ( ; i < this.config.take; i++) { @@ -4756,9 +4756,10 @@ if (typeof JSON !== 'object') { * @param size */ proto.loadAd = function(size) { - var adxframe = document.createElement('iframe'), + var adxContainer = document.createElement('div'), + adxFrame = document.createElement('iframe'), frameAttributes = { - 'class': 'okanjo-inline-buy-frame', + 'class': 'okanjo-adx-frame', frameborder: 0, vspace: 0, hspace: 0, @@ -4779,21 +4780,25 @@ if (typeof JSON !== 'object') { '<'+'/script>' + '<' +'script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"><'+'/script>'; + adxContainer.className = "okanjo-adx-container"; + adxContainer.appendChild(adxFrame); + this.element.innerHTML = ""; - this.element.appendChild(adxframe); - adxframe.contentWindow.document.open(); - adxframe.contentWindow.document.write(adxframeContent); - adxframe.contentWindow.document.close(); + this.element.appendChild(adxContainer); + + adxFrame.contentWindow.document.open(); + adxFrame.contentWindow.document.write(adxframeContent); + adxFrame.contentWindow.document.close(); for (var i in frameAttributes) { if (frameAttributes.hasOwnProperty(i)) { - adxframe.setAttribute(i, frameAttributes[i]); + adxFrame.setAttribute(i, frameAttributes[i]); } } - adxframe.className = "okanjo-ad-backfill"; - adxframe.setAttribute('width', size.width + "px"); - adxframe.setAttribute('height', size.height + "px"); + adxFrame.className = "okanjo-ad-backfill"; + adxFrame.setAttribute('width', size.width + "px"); + adxFrame.setAttribute('height', size.height + "px"); // Track backfill impression var eventData = okanjo.util.deepClone(this.metricBase, {}); @@ -5224,7 +5229,7 @@ if (typeof JSON !== 'object') { return okanjo; })); -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ (function(okanjo) {okanjo.mvc.registerCss("ad.block", ".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}", { id: 'okanjo-ad-block' }); okanjo.mvc.registerTemplate("ad.block", "
", function(data, options) { @@ -5246,7 +5251,7 @@ okanjo.mvc.registerCss("okanjo.modal", ".okanjo-expansion-root{position:relative okanjo.mvc.registerTemplate("okanjo.error", "{{ message }} {{#code}} Reference: {{ code }} {{/code}}", { css: ['okanjo.core'] }); - okanjo.mvc.registerCss("product.block", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\" \";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block' }); + okanjo.mvc.registerCss("product.block", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\" \";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block' }); var product_block = "
"; @@ -5275,7 +5280,7 @@ okanjo.mvc.registerTemplate("okanjo.error", "{{ message - okanjo.mvc.registerCss("product.block2", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\" \";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block2' }); + okanjo.mvc.registerCss("product.block2", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\" \";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block2' }); var product_block2 = "", blockId = 0; diff --git a/dist/okanjo-bundle.min.js b/dist/okanjo-bundle.min.js index f6713d0..0b93927 100644 --- a/dist/okanjo-bundle.min.js +++ b/dist/okanjo-bundle.min.js @@ -1,22 +1,22 @@ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ -!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.okanjo=e()}(this,function(){var okanjo=function(t){function e(t){for(var e,o,n,i,r={},a=t.split("&"),c=0;ci?(o=decodeURIComponent(e),n=null):(o=decodeURIComponent(e.substring(0,i)),n=decodeURIComponent(e.substring(i+1))),o&&(r[o]=n)}catch(s){console.error("[Okanjo] Failed to parse URL parameter:",e,s)}return r}var o=void 0!==window.pageXOffset,n="CSS1Compat"===(document.compatMode||""),i=window.navigator.userAgent,r=function(){},a=t||{};a.version="0.8.4",a.qwery=r,a.metrics={trackEvent:r,trackPageView:r},a.routes={products:"/products",products_id:"/products/:product_id",products_sense:"/products/sense",metrics:"/metrics/:object_type/:event_type"},a.getRoute=function(t,e){if(e)for(var o in e)e.hasOwnProperty(o)&&(t=t.replace(":"+o,e[o]+""));return a.config.ads.apiUri+t},a.exec=function(t,e,o){e=e||{},a.JSONP({url:t,data:e,error:function(t){var e={statusCode:500,error:"Communication Error",message:t.message||"JSONP communication failure."};a.report("core-jsonp",t.error||new Error(e.message)),o(e,null)},success:function(t){var e,n;t?t.error?e=t:n=t:(e={statusCode:500,error:"Invalid Response",message:"Could not interpret the JSONP response."},a.report("core-jsonp",new Error(e.message))),o(e,n)}})},a.report=function(t,e){var o;"string"==typeof e?o=new Error("[Okanjo"+(t?" "+t:"")+"] "+e):"object"==typeof e&&e instanceof Error&&(o=e),console.error(o)};var c=a.util=a.util||{};/*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */ /*! based on shortid https://github.com/dylang/shortid */ -return c.trim=function(t){return(t||"").replace(/^\s+|\s+$/g,"")},c.empty=function(t){return null===t||void 0===t||"string"==typeof t&&""===c.trim(t)},c.clone=function(t){var e={};t=t||{};for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},c.hash=function(t){var e=0;if(0===t.length)return""+e;for(var o=0;o=0;n--)0===o[n].name.indexOf("data-")&&(e[o[n].name.substr(5)]=o[n].value);return e},c.copyIfSet=function(t,e,o,n,i){function r(n){!e||void 0===e[n]||i.stripEmpty&&c.empty(e[n])||(t[o]=e[n])}if(n=n||o,i=i||{},"object"==typeof n&&Array.isArray(n))for(var a=0;ar||a&&i>a;return{vw:c?r:n,vh:c?a:i}},c.getEventPosition=function(t){var e=t.pageX,o=t.pageY,n=document,i=n.body,r=n.documentElement,a="scrollLeft",c="scrollTop";return{ex:void 0===e?t.clientX+i[a]+r[a]:e,ey:void 0===o?t.clientY+i[c]+r[c]:o}},c.ellipsify=function(t,e){for(var o=e||t.parentNode,n=c.getElementSize(o).height,i=void 0!==t.textContent,r=i?t.textContent:t.innerText,a="",s=5e3,l=function(t){return a=t.substr(0,t.length-3)+a,"..."};c.getElementSize(t).height>n&&r.length>0&&s-- >0;)r=i?t.textContent:t.innerText,r=r.replace(/[\s\S](?:\.\.\.)?$/,l),i?t.textContent=r:t.innerText=r;if(a.length>0){var d=document.createElement("span"),p=document.createElement("span");d.setAttribute("class","okanjo-ellipses"),p.setAttribute("class","okanjo-visually-hidden"),i?(d.textContent=r.substr(0,r.length-3),p.textContent=a):(d.innerText=r.substr(0,r.length-3),p.innerText=a),t.innerHTML="",t.appendChild(d),t.appendChild(p)}},c.detectClasses=function(){var t=[];return navigator.appVersion.indexOf("MSIE 9.")!=-1?t.push("lt-ie10"):navigator.appVersion.indexOf("MSIE 8.")!=-1?t.push("lt-ie9"):navigator.appVersion.indexOf("MSIE 7.")!=-1?t.push("lt-ie8"):navigator.appVersion.indexOf("MSIE 6.")!=-1&&t.push("lt-ie7"),t},c.isFramed=function(){return window.top!==window.self},c.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(i)},c.isAndroid=function(){return/Android/.test(i)},c.isMobile=function(){return c.isiOS()||c.isAndroid()},c.getPageArguments=function(t){var o=e(window.location.search.substring(window.location.search.indexOf("?")+1));if(t){var n=e(window.location.hash.substring(Math.max(window.location.hash.indexOf("#")+1,window.location.hash.indexOf("#!")+2)));for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])}return o},c.deepClone=function(t,e){var o,n=0;if(Array.isArray(t))for(e=e||[];n>4*o&15|r()],e=t0&&(n+=a(e)),n+=a(i)}}(),a}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */ +return c.trim=function(t){return(t||"").replace(/^\s+|\s+$/g,"")},c.empty=function(t){return null===t||void 0===t||"string"==typeof t&&""===c.trim(t)},c.clone=function(t){var e={};t=t||{};for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},c.hash=function(t){var e=0;if(0===t.length)return""+e;for(var o=0;o=0;n--)0===o[n].name.indexOf("data-")&&(e[o[n].name.substr(5)]=o[n].value);return e},c.copyIfSet=function(t,e,o,n,i){function r(n){!e||void 0===e[n]||i.stripEmpty&&c.empty(e[n])||(t[o]=e[n])}if(n=n||o,i=i||{},"object"==typeof n&&Array.isArray(n))for(var a=0;ar||a&&i>a;return{vw:c?r:n,vh:c?a:i}},c.getEventPosition=function(t){var e=t.pageX,o=t.pageY,n=document,i=n.body,r=n.documentElement,a="scrollLeft",c="scrollTop";return{ex:void 0===e?t.clientX+i[a]+r[a]:e,ey:void 0===o?t.clientY+i[c]+r[c]:o}},c.ellipsify=function(t,e){for(var o=e||t.parentNode,n=c.getElementSize(o).height,i=void 0!==t.textContent,r=i?t.textContent:t.innerText,a="",s=5e3,l=function(t){return a=t.substr(0,t.length-3)+a,"..."};c.getElementSize(t).height>n&&r.length>0&&s-- >0;)r=i?t.textContent:t.innerText,r=r.replace(/[\s\S](?:\.\.\.)?$/,l),i?t.textContent=r:t.innerText=r;if(a.length>0){var d=document.createElement("span"),p=document.createElement("span");d.setAttribute("class","okanjo-ellipses"),p.setAttribute("class","okanjo-visually-hidden"),i?(d.textContent=r.substr(0,r.length-3),p.textContent=a):(d.innerText=r.substr(0,r.length-3),p.innerText=a),t.innerHTML="",t.appendChild(d),t.appendChild(p)}},c.detectClasses=function(){var t=[];return-1!=navigator.appVersion.indexOf("MSIE 9.")?t.push("lt-ie10"):-1!=navigator.appVersion.indexOf("MSIE 8.")?t.push("lt-ie9"):-1!=navigator.appVersion.indexOf("MSIE 7.")?t.push("lt-ie8"):-1!=navigator.appVersion.indexOf("MSIE 6.")&&t.push("lt-ie7"),t},c.isFramed=function(){return window.top!==window.self},c.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(i)},c.isAndroid=function(){return/Android/.test(i)},c.isMobile=function(){return c.isiOS()||c.isAndroid()},c.getPageArguments=function(t){var o=e(window.location.search.substring(window.location.search.indexOf("?")+1));if(t){var n=e(window.location.hash.substring(Math.max(window.location.hash.indexOf("#")+1,window.location.hash.indexOf("#!")+2)));for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])}return o},c.deepClone=function(t,e){var o,n=0;if(Array.isArray(t))for(e=e||[];n>4*o&15|r()],e=t0&&(n+=a(e)),n+=a(i)}}(),a}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */ /*! Okanjo Local Storage Polyfill v1.0.0 | (c) 2013 Okanjo Partners Inc | Based on https://gist.github.com/juliocesar/926500/ddb28fb72903be87cb9044a945c6edbe1aa28b3a */ /*! Okanjo Cookie Helper v1.0.0 | (c) 2013 Okanjo Partners Inc */ -return config.key=config.key||void 0,config.marketplace={uri:"https://shop.okanjo.com",apiUri:"https://api.okanjo.com",routerUri:"https://shop.okanjo.com/widgets/router/",balancedMarketplacePath:"/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy",socketIOUri:"https://mke-rt.okanjo.com:13443"},config.ads={apiUri:"https://ads-api.okanjo.com"},okanjo.configure=function(t){Object.keys(t).every(function(e){return config[e]&&"object"==typeof config[e]&&"object"==typeof t[e]?Object.keys(t[e]).every(function(o){return config[e][o]=t[e][t[o]],!0}):config[e]=t[e],!0})},function(t,e){var o=t.TemplateEngine=function(e){e=e||{templates:{},css:{}},this._templates=e.templates||{},this._css=e.css||{},this.classDetects=t.util.detectClasses(),this.classDetects=this.classDetects.join(" ")};o.prototype={constructor:o,registerTemplate:function(e,o,n,i){if("object"==typeof o){if(void 0===o.nodeType)throw new Error("Parameter template must be a string or a DOM element");t.Mustache.parse(o)}else if("string"!=typeof o)throw new Error("Parameter template must be a string or a DOM element");if(3===arguments.length&&"object"==typeof n?(i=n,n=void 0):i=i||{},void 0!==n&&"function"!=typeof n)throw new Error("Parameter viewClosure must be a function");this._templates[e]={markup:o,options:i,viewClosure:n||null}},registerCss:function(t,e,o){if(o=o||{},"object"==typeof e){if(void 0===e.nodeType)throw new Error("Parameter css must be a string or a DOM element")}else if("string"!=typeof e)throw new Error("Parameter css must be a string or a DOM element");this._css[t]={markup:e,options:o}},isTemplateRegistered:function(t){return!!this._templates[t]},isCssRegistered:function(t){return!!this._css[t]},ensureCss:function(e){if(this._css[e]){var o=this._css[e],n=void 0===o.markup.nodeType?o.options.id||"okanjo-css-"+e:null;if(n){var i=t.qwery("#"+n);if(0===i.length){var r=t.qwery("head"),a=document.createElement("style");if(a.id=n,a.setAttribute("type","text/css"),a.hasOwnProperty?a.innerHTML=o.markup:a.styleSheet.cssText=o.markup,r.length>0)r[0].appendChild(a);else{var c=t.qwery("body");c.length>0&&c[0].appendChild(a)}}}}else console.warn('[Okanjo.Template] Attempted to add CSS template "'+e+'" to the DOM, however it does not appear to be registered?')},render:function(e,o,n,i){i=i||{};var r=this._templates[e],a=n;if(r.viewClosure&&(a=r.viewClosure.call(o,n,i)),a.okanjoConfig=t.config,a.okanjoMetricUrl=t.config.ads.apiUri.replace(/^https?:\/\//,""),a.now=function(){return(new Date).getTime()},a.classDetects=this.classDetects,i.blockClasses&&Array.isArray(i.blockClasses)&&(a.classDetects=a.classDetects+=" "+i.blockClasses.join(" ")),i.css!==!1&&r.options.css&&r.options.css.length>0)for(var c=0;c3?a%3:0,i+(a?r.substr(0,a)+n:"")+r.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+n)+(e?o+Math.abs(t-r).toFixed(e).slice(2):"")},product:function(e){if("object"==typeof e&&Array.isArray(e)){for(var o=[],n=0;n>>0;if(0===i)return-1;var r=+e||0;if(Math.abs(r)===1/0&&(r=0),r>=i)return-1;for(o=Math.max(r>=0?r:i-Math.abs(r),0);o>>0;if("function"!=typeof t)throw new TypeError;for(arguments.length>1&&(o=e),n=0;n>>0;if("function"!=typeof t)throw new TypeError;for(var n=[],i=arguments.length>=2?arguments[1]:void 0,r=0;r0)r[0].appendChild(a);else{var c=t.qwery("body");c.length>0&&c[0].appendChild(a)}}}}else console.warn('[Okanjo.Template] Attempted to add CSS template "'+e+'" to the DOM, however it does not appear to be registered?')},render:function(e,o,n,i){i=i||{};var r=this._templates[e],a=n;if(r.viewClosure&&(a=r.viewClosure.call(o,n,i)),a.okanjoConfig=t.config,a.okanjoMetricUrl=t.config.ads.apiUri.replace(/^https?:\/\//,""),a.now=function(){return(new Date).getTime()},a.classDetects=this.classDetects,i.blockClasses&&Array.isArray(i.blockClasses)&&(a.classDetects=a.classDetects+=" "+i.blockClasses.join(" ")),i.css!==!1&&r.options.css&&r.options.css.length>0)for(var c=0;ct?"-":"",r=parseInt(t=Math.abs(+t||0).toFixed(e))+"",a=r.length;return a=a>3?a%3:0,i+(a?r.substr(0,a)+n:"")+r.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+n)+(e?o+Math.abs(t-r).toFixed(e).slice(2):"")},product:function(e){if("object"==typeof e&&Array.isArray(e)){for(var o=[],n=0;na;a++)t.call(i,o[a])&&c.push(o[a]);return c}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var o;if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),i=n.length>>>0;if(0===i)return-1;var r=+e||0;if(Math.abs(r)===1/0&&(r=0),r>=i)return-1;for(o=Math.max(r>=0?r:i-Math.abs(r),0);i>o;){if(o in n&&n[o]===t)return o;o++}return-1}),Array.prototype.every||(Array.prototype.every=function(t,e){"use strict";var o,n;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),r=i.length>>>0;if("function"!=typeof t)throw new TypeError;for(arguments.length>1&&(o=e),n=0;r>n;){var a;if(n in i){a=i[n];var c=t.call(o,a,n,i);if(!c)return!1}n++}return!0}),Array.prototype.filter||(Array.prototype.filter=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=[],i=arguments.length>=2?arguments[1]:void 0,r=0;o>r;r++)if(r in e){var a=e[r];t.call(i,a,r,e)&&n.push(a)}return n}),function(){if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),!Element.prototype.addEventListener){var t=[],e=function(e,o){var n=this,i=function(t){t.target=t.srcElement,t.currentTarget=n,o.handleEvent?o.handleEvent(t):o.call(n,t)};if("DOMContentLoaded"==e){var r=function(t){"complete"==document.readyState&&i(t)};if(document.attachEvent("onreadystatechange",r),t.push({object:this,type:e,listener:o,wrapper:r}),"complete"==document.readyState){var a=new Event;a.srcElement=window,r(a)}}else this.attachEvent("on"+e,i),t.push({object:this,type:e,listener:o,wrapper:i})},o=function(e,o){for(var n=0;nt?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var o,n,i,r,a,c=gap,s=e[t];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(t)),"function"==typeof rep&&(s=rep.call(e,t,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(s)){for(r=s.length,o=0;r>o;o+=1)a[o]=str(o,s)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+c+"]":"["+a.join(",")+"]",gap=c,i}if(rep&&"object"==typeof rep)for(r=rep.length,o=0;r>o;o+=1)"string"==typeof rep[o]&&(n=rep[o],i=str(n,s),i&&a.push(quote(n)+(gap?": ":":")+i));else for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i=str(n,s),i&&a.push(quote(n)+(gap?": ":":")+i));return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+c+"}":"{"+a.join(",")+"}",gap=c,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){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(){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","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,o){var n;if(gap="",indent="","number"==typeof o)for(n=0;o>n;n+=1)indent+=" ";else"string"==typeof o&&(indent=o);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var o,n,i=t[e];if(i&&"object"==typeof i)for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n=walk(i,o),void 0!==n?i[o]=n:delete i[o]);return reviver.call(t,e,i)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\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,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),function(){/*! * @preserve Qwery - A Blazing Fast query selector engine * https://github.com/ded/qwery * copyright Dustin Diaz 2012 * MIT License */ -!function(t,e,o){"undefined"!=typeof module&&module.exports?module.exports=o():"function"==typeof define&&define.amd?define(o):e[t]=o()}("qwery",this,function(){function t(){this.c={}}function e(t){return K.g(t)||K.s(t,"(^|\\s+)"+t+"(\\s+|$)",1)}function o(t,e){for(var o=0,n=t.length;o~+]/,L=/^\s+|\s*([,\s\+\~>]|$)\s*/g,D=/[\s\>\+\~]/,U=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,R=/([.*+?\^=!:${}()|\[\]\/\\])/g,q=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,B=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,J=new RegExp(I.source+"|"+P.source+"|"+N.source),W=new RegExp("("+D.source+")"+U.source,"g"),$=new RegExp(D.source+U.source),V=new RegExp(q.source+"("+B.source+")?("+H.source+")?"),F={" ":function(t){return t&&t!==x&&t.parentNode},">":function(t,e){return t&&t.parentNode==e.parentNode&&t.parentNode},"~":function(t){return t&&t.previousSibling},"+":function(t,e,o,n){return!!t&&((o=r(t))&&(n=r(e))&&o==n&&o)}};t.prototype={g:function(t){return this.c[t]||void 0},s:function(t,e,o){return e=o?new RegExp(e):e,this.c[t]=e}};var K=new t,Y=new t,Q=new t,X=new t,G="compareDocumentPosition"in x?function(t,e){return 16==(16&e.compareDocumentPosition(t))}:"contains"in x?function(t,e){return e=9===e[T]||e==window?x:e,e!==t&&e.contains(t)}:function(t,e){for(;t=t.parentNode;)if(t===e)return 1;return 0},Z=function(){var t=v.createElement("p");return(t.innerHTML='x')&&"#x"!=t.firstChild.getAttribute("href")?function(t,e){return"class"===e?t.className:"href"===e||"src"===e?t.getAttribute(e,2):t.getAttribute(e)}:function(t,e){return t.getAttribute(e)}}(),tt=!!v[w],et=v.querySelector&&v[C],ot=function(t,e){var n,r,a=[];try{return 9!==e[T]&&M.test(t)?(o(n=t.split(","),y(e,function(t,e){r=t[C](e),1==r.length?a[a.length]=r.item(0):r.length&&(a=a.concat(i(r)))})),n.length>1&&a.length>1?f(a):a):i(e[C](t))}catch(c){}return nt(t,e)},nt=function(t,n){var i,r,a,c,s,l,p=[];if(t=t.replace(L,"$1"),r=t.match(z)){for(s=e(r[2]),i=n[_](r[1]||"*"),a=0,c=i.length;a1&&p.length>1?f(p):p},it=function(t){"undefined"!=typeof t[E]&&(j=t[E]&&et?ot:nt)};return it({useNativeQSA:!0}),b.configure=it,b.uniq=f,b.is=p,b.pseudos={},b}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */ +!function(t,e,o){"undefined"!=typeof module&&module.exports?module.exports=o():"function"==typeof define&&define.amd?define(o):e[t]=o()}("qwery",this,function(){function t(){this.c={}}function e(t){return K.g(t)||K.s(t,"(^|\\s+)"+t+"(\\s+|$)",1)}function o(t,e){for(var o=0,n=t.length;n>o;o++)e(t[o])}function n(t){for(var e=[],o=0,n=t.length;n>o;++o)m(t[o])?e=e.concat(t[o]):e[e.length]=t[o];return e}function i(t){for(var e=0,o=t.length,n=[];o>e;e++)n[e]=t[e];return n}function r(t){for(;(t=t.previousSibling)&&1!=t[T];);return t}function a(t){return t.match(V)}function c(t,o,n,i,r,a,c,s,d,p,u){var h,f,m,g,k;if(1!==this[T])return!1;if(o&&"*"!==o&&this[O]&&this[O].toLowerCase()!==o)return!1;if(n&&(f=n.match(A))&&f[1]!==this.id)return!1;if(n&&(k=n.match(S)))for(h=k.length;h--;)if(!e(k[h].slice(1)).test(this.className))return!1;if(d&&b.pseudos[d]&&!b.pseudos[d](this,u))return!1;if(i&&!c){g=this.attributes;for(m in g)if(Object.prototype.hasOwnProperty.call(g,m)&&(g[m].name||m)==r)return this}return i&&!l(a,Z(this,r)||"",c)?!1:this}function s(t){return Y.g(t)||Y.s(t,t.replace(R,"\\$1"))}function l(t,e,o){switch(t){case"=":return e==o;case"^=":return e.match(Q.g("^="+o)||Q.s("^="+o,"^"+s(o),1));case"$=":return e.match(Q.g("$="+o)||Q.s("$="+o,s(o)+"$",1));case"*=":return e.match(Q.g(o)||Q.s(o,s(o),1));case"~=":return e.match(Q.g("~="+o)||Q.s("~="+o,"(?:^|\\s+)"+s(o)+"(?:\\s+|$)",1));case"|=":return e.match(Q.g("|="+o)||Q.s("|="+o,"^"+s(o)+"(-|$)",1))}return 0}function d(t,e){var n,i,r,s,l,d,p,h=[],f=[],m=e,g=X.g(t)||X.s(t,t.split($)),b=t.match(W);if(!g.length)return h;if(s=(g=g.slice(0)).pop(),g.length&&(r=g[g.length-1].match(I))&&(m=k(e,r[1])),!m)return h;for(d=a(s),l=m!==e&&9!==m[T]&&b&&/^[+~]$/.test(b[b.length-1])?function(t){for(;m=m.nextSibling;)1==m[T]&&(d[1]?d[1]==m[O].toLowerCase():1)&&(t[t.length]=m);return t}([]):m[_](d[1]||"*"),n=0,i=l.length;i>n;n++)(p=c.apply(l[n],d))&&(h[h.length]=p);return g.length?(o(h,function(t){u(t,g,b)&&(f[f.length]=t)}),f):h}function p(t,e,o){if(h(e))return t==e;if(m(e))return!!~n(e).indexOf(t);for(var i,r,s=e.split(",");e=s.pop();)if(i=X.g(e)||X.s(e,e.split($)),r=e.match(W),i=i.slice(0),c.apply(t,a(i.pop()))&&(!i.length||u(t,i,r,o)))return!0;return!1}function u(t,e,o,n){function i(t,n,s){for(;s=F[o[n]](s,t);)if(h(s)&&c.apply(s,a(e[n]))){if(!n)return s;if(r=i(s,n-1,s))return r}}var r;return(r=i(t,e.length-1,t))&&(!n||G(r,n))}function h(t,e){return t&&"object"==typeof t&&(e=t[T])&&(1==e||9==e)}function f(t){var e,o,n=[];t:for(e=0;e~+]/,L=/^\s+|\s*([,\s\+\~>]|$)\s*/g,D=/[\s\>\+\~]/,U=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,R=/([.*+?\^=!:${}()|\[\]\/\\])/g,q=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,B=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,J=new RegExp(I.source+"|"+P.source+"|"+N.source),W=new RegExp("("+D.source+")"+U.source,"g"),$=new RegExp(D.source+U.source),V=new RegExp(q.source+"("+B.source+")?("+H.source+")?"),F={" ":function(t){return t&&t!==x&&t.parentNode},">":function(t,e){return t&&t.parentNode==e.parentNode&&t.parentNode},"~":function(t){return t&&t.previousSibling},"+":function(t,e,o,n){return t?(o=r(t))&&(n=r(e))&&o==n&&o:!1}};t.prototype={g:function(t){return this.c[t]||void 0},s:function(t,e,o){return e=o?new RegExp(e):e,this.c[t]=e}};var K=new t,Y=new t,Q=new t,X=new t,G="compareDocumentPosition"in x?function(t,e){return 16==(16&e.compareDocumentPosition(t))}:"contains"in x?function(t,e){return e=9===e[T]||e==window?x:e,e!==t&&e.contains(t)}:function(t,e){for(;t=t.parentNode;)if(t===e)return 1;return 0},Z=function(){var t=v.createElement("p");return(t.innerHTML='x')&&"#x"!=t.firstChild.getAttribute("href")?function(t,e){return"class"===e?t.className:"href"===e||"src"===e?t.getAttribute(e,2):t.getAttribute(e)}:function(t,e){return t.getAttribute(e)}}(),tt=!!v[w],et=v.querySelector&&v[C],ot=function(t,e){var n,r,a=[];try{return 9!==e[T]&&M.test(t)?(o(n=t.split(","),y(e,function(t,e){r=t[C](e),1==r.length?a[a.length]=r.item(0):r.length&&(a=a.concat(i(r)))})),n.length>1&&a.length>1?f(a):a):i(e[C](t))}catch(c){}return nt(t,e)},nt=function(t,n){var i,r,a,c,s,l,p=[];if(t=t.replace(L,"$1"),r=t.match(z)){for(s=e(r[2]),i=n[_](r[1]||"*"),a=0,c=i.length;c>a;a++)s.test(i[a].className)&&(p[p.length]=i[a]);return p}return o(l=t.split(","),y(n,function(t,e,o){for(s=d(e,t),a=0,c=s.length;c>a;a++)(9===t[T]||o||G(s[a],n))&&(p[p.length]=s[a])})),l.length>1&&p.length>1?f(p):p},it=function(t){"undefined"!=typeof t[E]&&(j=t[E]&&et?ot:nt)};return it({useNativeQSA:!0}),b.configure=it,b.uniq=f,b.is=p,b.pseudos={},b}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */ function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.onDomReady=e()}(this,function(){"use strict";function t(e){if(!v){if(!a.body)return n(t);for(v=!0;e=x.shift();)n(e)}}function e(e){(y||e.type===s||a[u]===p)&&(o(),t())}function o(){y?(a[b](g,e,l),r[b](s,e,l)):(a[f](k,e),r[f](d,e))}function n(t,e){setTimeout(t,+e>=0?e:1)}function i(t){v?n(t):x.push(t)}var r=window,a=r.document,c=a.documentElement,s="load",l=!1,d="on"+s,p="complete",u="readyState",h="attachEvent",f="detachEvent",m="addEventListener",g="DOMContentLoaded",k="onreadystatechange",b="removeEventListener",y=m in a,j=l,v=l,x=[];if(a[u]===p)n(t);else if(y)a[m](g,e,l),r[m](s,e,l);else{a[h](k,e),r[h](d,e);try{j=null==r.frameElement&&c}catch(w){}j&&j.doScroll&&!function _(){if(!v){try{j.doScroll("left")}catch(e){return n(_,50)}o(),t()}}()}return i.version="1.4.0",i.isReady=function(){return v},i}),/*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ -function(t,e){"object"==typeof exports&&exports?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Mustache={})}(this,function(t){function e(t){return"function"==typeof t}function o(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function n(t,e){return f.call(t,e)}function i(t){return!n(m,t)}function r(t){return String(t).replace(/[&<>"'\/]/g,function(t){return g[t]})}function a(e,n){function r(){if(x&&!w)for(;g.length;)delete m[g.pop()];else g=[];x=!1,w=!1}function a(t){if("string"==typeof t&&(t=t.split(b,2)),!h(t)||2!==t.length)throw new Error("Invalid tags: "+t);d=new RegExp(o(t[0])+"\\s*"),p=new RegExp("\\s*"+o(t[1])),u=new RegExp("\\s*"+o("}"+t[1]))}if(!e)return[];var d,p,u,f=[],m=[],g=[],x=!1,w=!1;a(n||t.tags);for(var _,C,E,O,T,A,S=new l(e);!S.eos();){if(_=S.pos,E=S.scanUntil(d))for(var I=0,N=E.length;I0?r[r.length-1][4]:n;break;default:i.push(e)}return n}function l(t){this.string=t,this.tail=t,this.pos=0}function d(t,e){this.view=null==t?{}:t,this.cache={".":this.view},this.parent=e}function p(){this.cache={}}var u=Object.prototype.toString,h=Array.isArray||function(t){return"[object Array]"===u.call(t)},f=RegExp.prototype.test,m=/\S/,g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},k=/\s*/,b=/\s+/,y=/\s*=/,j=/\s*\}/,v=/#|\^|\/|>|\{|&|=|!/;l.prototype.eos=function(){return""===this.tail},l.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var o=e[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},l.prototype.scanUntil=function(t){var e,o=this.tail.search(t);switch(o){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=e.length,e},d.prototype.push=function(t){return new d(t,this)},d.prototype.lookup=function(t){var o,n=this.cache;if(t in n)o=n[t];else{for(var i,r,a=this;a;){if(t.indexOf(".")>0)for(o=a.view,i=t.split("."),r=0;null!=o&&r"===r?a=this._renderPartial(i,e,o,n):"&"===r?a=this._unescapedValue(i,e):"name"===r?a=this._escapedValue(i,e):"text"===r&&(a=this._rawValue(i)),void 0!==a&&(c+=a);return c},p.prototype._renderSection=function(t,o,n,i){function r(t){return a.render(t,o,n)}var a=this,c="",s=o.lookup(t[1]);if(s){if(h(s))for(var l=0,d=s.length;l0){var t=this;this._processTimeout=setTimeout(function(){var e=t._queue.shift();void 0===e?t._processTimeout=null:t.track(e.event,function(o,n){n&&n.data&&n.data.sid&&t.updateSid(n.data.sid),t._processTimeout=null,t._processQueue(),e.callback&&e.callback(o,n)})},0)}},includeElementInfo:function(e,o){var n=t.util.getPageSize(),i=t.util.getElementPosition(e);return o=o||{},o.pw=n.w,o.ph=n.h,o.x1=i.x1,o.y1=i.y1,o.x2=i.x2,o.y2=i.y2,o},includeViewportInfo:function(e){var o=t.util.getViewportSize(),n=t.util.getScrollPosition();return e=e||{},e.vx1=n.x,e.vy1=n.y,e.vx2=e.vx1+o.vw,e.vy2=e.vy1+o.vh,e},includeEventInfo:function(e,o){var n=t.util.getEventPosition(e);return o.ex=n.ex,o.ey=n.ey,o},copy:function(e,o){return t.util.flatten(t.util.deepClone(e,o))},truncate:function(t){for(var e in t)t.hasOwnProperty(e)&&"string"==typeof t[e]&&(t[e]=t[e].substr(0,255));return t}},t.metrics=new o}(okanjo,this),function(t,e){t.metrics.trackPageView({_noProcess:!0}),setTimeout(function(){t.metrics._processQueue()},1e3)}(okanjo||this),function(t,e){var o=function(t,e){return t.indexOf(e)},n=function(){this.events={}};return n.prototype.on=function(t,e){"object"!=typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e)},n.prototype.removeListener=function(t,e){var n;"object"==typeof this.events[t]&&(n=o(this.events[t],e),n>-1&&this.events[t].splice(n,1))},n.prototype.emit=function(t){var e,o,n,i=[].slice.call(arguments,1);if("object"==typeof this.events[t])for(o=this.events[t].slice(),n=o.length,e=0;e=0}),n=o.length>0?Math.min.apply(null,o):-1;return n>0?t.substr(0,n):t},i.getCacheKey=function(){for(var o=[e.location.host+e.location.pathname],n=this.cacheKeyAttributes,i=0;i=0&&n.push(a)}for(r=0;re,n.articleId&&(n.metricBase.m.aid=n.articleId),n.metricBase.m.pten=n.placementTest&&n.placementTest.enabled?"1":"0",n.placementTest&&(n.placementTest.id&&(n.metricBase.m.ptid=n.placementTest.id),n.placementTest.seed&&(n.metricBase.m.ptseed=n.placementTest.seed)),n.emit("data",r),n.showProducts(n.items),!n.shorted&&n.use_cache&&(!n.placementTest||n.placementTest&&!n.placementTest.enabled)){var a=n.getCacheKey();n.saveInCache(a,n.items)}n.emit("load",{fromCache:!1})}})},i.executeSearch=function(e){var n=t.util.deepClone(this.config);this.config.mode===o.contentTypes.sense?t.exec(t.getRoute(t.routes.products_sense),n,e):this.config.mode===o.contentTypes.single?t.exec(t.getRoute(t.routes.products_id,{product_id:this.config.id}),n,function(t,o){!t&&o&&o.data&&(o.data=[o.data]),e&&e(t,o)}):t.exec(t.getRoute(t.routes.products),n,e)},i.handleInlineBuyOption=function(){if(this.disable_inline_buy)for(var t=0;t=0&&(_=w);if(_){j.className+=" okanjo-ad-in-unit",j.setAttribute("height","100%"),j.setAttribute("width","100%"),_.appendChild(j),f=!0;var C=t.util.getElementSize(_);h.expandable=0,h.frame_height=C.height,h.frame_width=C.width,h.ad_size=_.getAttribute("data-size")||"undefined"}}c.ea=t.metrics.action.inline_click,c.m.expandable=1===h.expandable?"true":"false",r=n(c,y,u,h),j.src=r,f||t.modal.show(j)}else i?(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}),this.click()):(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}))},i.bindEvents=function(){var e=this;t.qwery("a",this.element).every(function(n){var i=n.getAttribute("data-id");if(i&&(n.addEventListener?n.addEventListener("click",o.interactTile):n.attachEvent("onclick",function(t){o.interactTile.call(n,t)}),e.config.metrics_context==t.metrics.channel.product_widget)){var r=n.getAttribute("data-backfill"),a=t.util.deepClone(e.metricBase,{});a.id=n.getAttribute("data-id"),a.m.bf="true"===r?1:0,a.m=t.metrics.truncate(t.metrics.copy(e.config,t.metrics.includeElementInfo(n.parentNode,a.m))),t.metrics.trackEvent(t.metrics.object_type.product,t.metrics.event_type.impression,a)}return!0}),t.qwery(".okanjo-product-title",this.element).every(function(e){return t.util.ellipsify(e),!0})},i.guessAdSize=function(){for(var e,o,n,i,r=[],a=0,c="300x250|728x90|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60".split("|");a';this.element.innerHTML="",this.element.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.write(c),n.contentWindow.document.close();for(var s in i)i.hasOwnProperty(s)&&n.setAttribute(s,i[s]);n.className="okanjo-ad-backfill",n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px");var l=t.util.deepClone(this.metricBase,{});l.m.ta_w=o.width,l.m.ta_h=o.height,l.m.ta_pubid=r,l.m.ta_slotid=a,l.m=t.metrics.truncate(t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,l.m))),t.metrics.trackEvent(t.metrics.object_type.thirdparty_ad,t.metrics.event_type.impression,l)},t.Product=o,o}(okanjo,this),function(t,e){function o(e,o){t._Widget.call(this,e,o),this.config=o=o||{},this.templates={ad_error:"okanjo.error",ad_main:"ad.block"},this.css={ad_main:"ad.block"},this.disable_inline_buy=void 0!==this.config.disable_inline_buy&&o.disable_inline_buy===!0,this.proxy_url=null,this.configMap={key:"key",proxy_url:"proxy-url",content:"content",size:"size",expandable:"expandable",type:"type",id:"id",template_ad_main:"template-ad-main",template_ad_error:"template-ad-error",disable_inline_buy:"disable-inline-buy",template_product_main:"template-product-main",template_product_error:"template-product-error"},o.no_init||this.init()}t.util.inherits(o,t._Widget),o.contentTypes={creative:"creative",dynamic:"dynamic"},o.types={product:"product"},o.sizes={billboard:{width:970,height:250},button_2:{width:120,height:60},half_page:{width:300,height:600},leaderboard:{width:728,height:90},medium_rectangle:{width:300,height:250},micro_bar:{width:88,height:31},portrait:{width:300,height:1050},rectangle:{width:180,height:150},super_leaderboard:{width:970,height:90},wide_skyscraper:{width:160,height:600},large_mobile_banner:{width:320,height:100},mobile_leaderboard:{width:320,height:50},small_square:{width:200,height:200},button_1:{width:120,height:90},full_banner:{width:468,height:60},half_banner:{width:234,height:60},large_rectangle:{width:336,height:280},pop_under:{width:720,height:300},three_to_one_rectangle:{width:300,height:100},skyscraper:{width:120,height:600},square:{width:250,height:250},square_button:{width:125,height:125},vertical_banner:{width:120,height:240},vertical_rectangle:{width:240,height:400}};var n=o.prototype;return n.widgetName="Ad",n.load=function(){if(t.util.empty(this.config.content))this.hasCreativeContent()?this.config.content=o.contentTypes.creative:this.config.content=o.contentTypes.dynamic;else if(this.config.content!==o.contentTypes.creative||this.hasCreativeContent()){if(this.config.content===o.contentTypes.dynamic&&this.hasCreativeContent())console.warn("[Okanjo.Ad] Ad content is dynamic, but ad placement contains markup. Markup will be clobbered!");else if(!o.contentTypes.hasOwnProperty(this.config.content))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:"Invalid ad content: "+this.config.content}),t.report(this.widgetName,"Invalid ad content: "+this.config.content),!1}else console.warn("[Okanjo.Ad] Ad content is creative, but ad placement does not contain creative markup. Switching to dynamic!"),this.config.content=o.contentTypes.dynamic;if(t.util.empty(this.config.type)?this.config.type=o.types.product:o.types.hasOwnProperty(this.config.type)||(console.warn("[Okanjo."+this.widgetName+"] Unknown type",this.config.type,"given, using type `product` instead"),this.config.type=o.types.product),!t.util.empty(this.config.size)&&o.sizes.hasOwnProperty(this.config.size)&&this.setElementSize(o.sizes[this.config.size]),this.config.disable_inline_buy&&"string"==typeof this.config.disable_inline_buy&&(this.disable_inline_buy="true"===this.config.disable_inline_buy.toLowerCase()),this.config.proxy_url&&(this.proxy_url=this.config.proxy_url,delete this.config.proxy_url),t.metrics.trackEvent(t.metrics.object_type.widget,t.metrics.event_type.impression,{ch:t.metrics.channel.ad_widget,cx:this.config.content,m:t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,{wgid:this.instanceId}))}),this.config.type===o.types.product){if(t.util.empty(this.config.id))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:"Missing ad product id"}),t.report(this.widgetName,"Missing ad product id"),!1;if(this.config.content==o.contentTypes.dynamic)this.insertProductWidget();else{if(this.config.content!=o.contentTypes.creative)return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:"Cannot render ad in content: "+this.config.content}),t.report(this.widgetName,"Cannot render ad in content: "+this.config.content),!1;this.insertCreativeWidget()}}return!0},n.render=function(){var e,n=document.createElement("div"),i=[],r=this.config.content==o.contentTypes.dynamic&&!t.util.empty(this.config.size);for(n.innerHTML=t.mvc.render(this.templates.ad_main,this,{config:this.config},{blockClasses:r?["okanjo-ad-fit"]:[]}),e=0;e0)this._waitingOnProductLoad=!1,t.Product.interactTile.call(o[0],e,!0);else if(!this._waitingOnProductLoad){this._waitingOnProductLoad=!0;var n=this,i=setInterval(function(){n._waitingOnProductLoad?n.interact(e):clearInterval(i)},250);console.warn("Waiting for Okanjo Product widget to load...")}},n.insertCreativeWidget=function(){this.insertProductWidget({hidden:!0});var t=this;this.element.addEventListener?this.element.addEventListener("click",function(e){t.interact(e); -}):this.element.attachEvent("onclick",function(e){t.interact(e)})},n.insertProductWidget=function(e){e=e||{};var o=document.createElement("div");o.className="okanjo-ad-dynamic-product",e.hidden&&(o.style.display="none"),this.element.appendChild(o),this.render();var n={id:this.config.id,key:this.key,mode:t.Product.contentTypes.single,disable_inline_buy:this.disable_inline_buy,disable_popup:this.config.disable_popup===!0,proxy_url:this.proxy_url,expandable:void 0===this.config.expandable||("boolean"==typeof this.config.expandable?this.config.expandable:"true"===(""+this.config.expandable).toLowerCase()),metrics_context:t.metrics.channel.ad_widget,metrics_channel_context:this.config.content,template_product_main:"product.single"};return this.config.template_product_main&&(n.template_product_main=this.config.template_product_main),this.config.template_product_error&&(n.template_product_error=this.config.template_product_error),this.productWidget=new t.Product(o,n),this.productWidget},n.setElementSize=function(t){this.element.style.display="block",this.element.style.overflow="hidden",this.element.style.width=t.width+"px",this.element.style.height=t.height+"px"},n.hasCreativeContent=function(){if(this.element.childElementCount&&this.element.childElementCount>0)return!0;for(var t=0;t
',function(e,o){return e=e||{config:{}},o=t.util.clone(o),o.config=e.config,o.size=e.config.size||"undefined",o},{css:["ad.block"]}),t.mvc.registerCss("okanjo.core","",{id:"okanjo-core"}),t.mvc.registerCss("okanjo.modal",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:" ";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}',{id:"okanjo-modal"}),t.mvc.registerTemplate("okanjo.error","{{ message }} {{#code}} Reference: {{ code }} {{/code}}",{css:["okanjo.core"]}),t.mvc.registerCss("product.block",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:" ";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:"..."}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block"});var e='
';t.mvc.registerTemplate("product.block",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-block",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:["product.block","okanjo.modal"]}),t.mvc.registerCss("product.block2",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:" ";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:"..."}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block2"});var o='',n=0;t.mvc.registerTemplate("product.block2",o,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-block2",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var i=t.util.deepClone(this.metricBase,{});i.m=t.metrics.truncate(t.metrics.copy(this.config,i.m)),o.metricBaseJSON=JSON.stringify(i),"leaderboard"==o.config.size||"large_mobile_banner"==o.config.size?(o.config.template_layout="list",o.config.template_cta_style="link"):"half_page"!=o.config.size&&"auto"!=o.config.size||(o.config.template_layout="list");var r=o.config.template_cta_color;if(r){var a,c="okanjo-product-block2-cus-"+n;a=".okanjo-product-block2."+c+" .okanjo-product-buy-button { color: "+r+";} .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid "+r+"; } .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: "+r+"; } ",t.mvc.registerCss(c,a,{id:c}),t.mvc.ensureCss(c)}return o.blockId=n++,o},{css:["product.block2","okanjo.modal"]}),t.mvc.registerCss("product.sidebar",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:" ";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:"..."}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-sidebar"}),t.mvc.registerTemplate("product.sidebar",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-sidebar",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:["product.sidebar","okanjo.modal"]}),t.mvc.registerCss("product.single",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:" ";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:"..."}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-single"}),t.mvc.registerTemplate("product.single",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-single",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:["product.single","okanjo.modal"]})}(okanjo); +function(t,e){"object"==typeof exports&&exports?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Mustache={})}(this,function(t){function e(t){return"function"==typeof t}function o(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function n(t,e){return f.call(t,e)}function i(t){return!n(m,t)}function r(t){return String(t).replace(/[&<>"'\/]/g,function(t){return g[t]})}function a(e,n){function r(){if(x&&!w)for(;g.length;)delete m[g.pop()];else g=[];x=!1,w=!1}function a(t){if("string"==typeof t&&(t=t.split(b,2)),!h(t)||2!==t.length)throw new Error("Invalid tags: "+t);d=new RegExp(o(t[0])+"\\s*"),p=new RegExp("\\s*"+o(t[1])),u=new RegExp("\\s*"+o("}"+t[1]))}if(!e)return[];var d,p,u,f=[],m=[],g=[],x=!1,w=!1;a(n||t.tags);for(var _,C,E,O,T,A,S=new l(e);!S.eos();){if(_=S.pos,E=S.scanUntil(d))for(var I=0,N=E.length;N>I;++I)O=E.charAt(I),i(O)?g.push(m.length):w=!0,m.push(["text",O,_,_+1]),_+=1,"\n"===O&&r();if(!S.scan(d))break;if(x=!0,C=S.scan(v)||"name",S.scan(k),"="===C?(E=S.scanUntil(y),S.scan(y),S.scanUntil(p)):"{"===C?(E=S.scanUntil(u),S.scan(j),S.scanUntil(p),C="&"):E=S.scanUntil(p),!S.scan(p))throw new Error("Unclosed tag at "+S.pos);if(T=[C,E,_,S.pos],m.push(T),"#"===C||"^"===C)f.push(T);else if("/"===C){if(A=f.pop(),!A)throw new Error('Unopened section "'+E+'" at '+_);if(A[1]!==E)throw new Error('Unclosed section "'+A[1]+'" at '+_)}else"name"===C||"{"===C||"&"===C?w=!0:"="===C&&a(E)}if(A=f.pop())throw new Error('Unclosed section "'+A[1]+'" at '+S.pos);return s(c(m))}function c(t){for(var e,o,n=[],i=0,r=t.length;r>i;++i)e=t[i],e&&("text"===e[0]&&o&&"text"===o[0]?(o[1]+=e[1],o[3]=e[3]):(n.push(e),o=e));return n}function s(t){for(var e,o,n=[],i=n,r=[],a=0,c=t.length;c>a;++a)switch(e=t[a],e[0]){case"#":case"^":i.push(e),r.push(e),i=e[4]=[];break;case"/":o=r.pop(),o[5]=e[2],i=r.length>0?r[r.length-1][4]:n;break;default:i.push(e)}return n}function l(t){this.string=t,this.tail=t,this.pos=0}function d(t,e){this.view=null==t?{}:t,this.cache={".":this.view},this.parent=e}function p(){this.cache={}}var u=Object.prototype.toString,h=Array.isArray||function(t){return"[object Array]"===u.call(t)},f=RegExp.prototype.test,m=/\S/,g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},k=/\s*/,b=/\s+/,y=/\s*=/,j=/\s*\}/,v=/#|\^|\/|>|\{|&|=|!/;l.prototype.eos=function(){return""===this.tail},l.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var o=e[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},l.prototype.scanUntil=function(t){var e,o=this.tail.search(t);switch(o){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=e.length,e},d.prototype.push=function(t){return new d(t,this)},d.prototype.lookup=function(t){var o,n=this.cache;if(t in n)o=n[t];else{for(var i,r,a=this;a;){if(t.indexOf(".")>0)for(o=a.view,i=t.split("."),r=0;null!=o&&rs;++s)a=void 0,i=t[s],r=i[0],"#"===r?a=this._renderSection(i,e,o,n):"^"===r?a=this._renderInverted(i,e,o,n):">"===r?a=this._renderPartial(i,e,o,n):"&"===r?a=this._unescapedValue(i,e):"name"===r?a=this._escapedValue(i,e):"text"===r&&(a=this._rawValue(i)),void 0!==a&&(c+=a);return c},p.prototype._renderSection=function(t,o,n,i){function r(t){return a.render(t,o,n)}var a=this,c="",s=o.lookup(t[1]);if(s){if(h(s))for(var l=0,d=s.length;d>l;++l)c+=this.renderTokens(t[4],o.push(s[l]),n,i);else if("object"==typeof s||"string"==typeof s)c+=this.renderTokens(t[4],o.push(s),n,i);else if(e(s)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");s=s.call(o.view,i.slice(t[3],t[5]),r),null!=s&&(c+=s)}else c+=this.renderTokens(t[4],o,n,i);return c}},p.prototype._renderInverted=function(t,e,o,n){var i=e.lookup(t[1]);return!i||h(i)&&0===i.length?this.renderTokens(t[4],e,o,n):void 0},p.prototype._renderPartial=function(t,o,n){if(n){var i=e(n)?n(t[1]):n[t[1]];return null!=i?this.renderTokens(this.parse(i),o,n,i):void 0}},p.prototype._unescapedValue=function(t,e){var o=e.lookup(t[1]);return null!=o?o:void 0},p.prototype._escapedValue=function(e,o){var n=o.lookup(e[1]);return null!=n?t.escape(n):void 0},p.prototype._rawValue=function(t){return t[1]},t.name="mustache.js",t.version="1.1.0",t.tags=["{{","}}"];var x=new p;t.clearCache=function(){return x.clearCache()},t.parse=function(t,e){return x.parse(t,e)},t.render=function(t,e,o){return x.render(t,e,o)},t.to_html=function(o,n,i,r){var a=t.render(o,n,i);return e(r)?void r(a):a},t.escape=r,t.Scanner=l,t.Context=d,t.Writer=p})}.apply(okanjo),function(t,e){function o(){this.default_channel=this.channel.external,this._queue=[],this.pageId=t.util.shortid();var e=t.util.getPageArguments(!0),o=e[this.msid_key],n=t.Cookie.get(this.msid_key),i=e[this.source_cx],r=e[this.source_ch];o&&n&&o!=n&&(this.trackEvent(this.object_type.metric_session,this.event_type.correlation,{id:o+"_"+n,ch:this.default_channel,_noProcess:!0}),t.Cookie.set(this.msid_key,o,this.msid_ttl)),this.sid=o||n||null,this.sourceCh=r||null,this.sourceCx=i||null,this._lastKey=void 0}o.prototype={msid_key:"ok_msid",source_cx:"ok_cx",source_ch:"ok_ch",msid_ttl:1460,strip_meta:["key","callback","metrics_channel_context","metrics_context","mode"],constructor:o,event_type:{view:"vw",impression:"imp",interaction:"int",correlation:"cor"},action:{click:"click",inline_click:"inline_click"},object_type:{thirdparty_ad:"ta",cart:"ct",page:"pg",widget:"wg",product:"pr",store:"st",cause:"ca",marketplace:"mp",order:"or",order_item:"oi",user:"ur",metric_session:"mt"},channel:{product_widget:"pw",ad_widget:"aw",store_widget:"sw",marketplace:"mp",external:"ex"},environment:{live:"live",testing:"testing"},trackEvent:function(e,o,n,i){n=n||{},n.object_type=e,n.event_type=o,this._lastKey=n.key||n.key||n.m&&n.m.key||t.key||this._lastKey||void 0,this.push(n,i)},trackPageView:function(t,o){t=t||{},t.id=t.id||e.location.href,t.ch=t.ch||this.default_channel,this.trackEvent(this.object_type.page,this.event_type.view,t,o)},track:function(e,o){if(!e||"object"!=typeof e)return void console.warn("[Okanjo.Metrics] event object data required");if(!e.object_type)return void console.warn("[Okanjo.Metrics] object_type required");if(!e.event_type)return void console.warn("[Okanjo.Metrics] event_type required");var n=e.object_type,i=e.event_type;delete e.object_type,delete e.event_type,this.normalizeEventData(e),t.exec(t.getRoute(t.routes.metrics,{object_type:n,event_type:i}),e,function(t,e){t&&console.warn("[Okanjo.Metrics] Reporting failed",t,e),o&&o(t,e)})},normalizeEventData:function(e){if(e.key=e.key||e.m&&e.m.key||t.key||this._lastKey||void 0,this.sid&&(e.sid=this.sid),e.m){var o={};for(var n in e.m)e.m.hasOwnProperty(n)&&this.strip_meta.indexOf(n)<0&&(o[n]=e.m[n]);e.m=o}else e.m={};(this.sourceCh||this.sourceCx)&&(this.sourceCh&&(e.m.ref_ch=this.sourceCh),this.sourceCx&&(e.m.ref_cx=this.sourceCx)),e.m.pgid=this.pageId,e.m.ok_ver=t.version,document.referrer&&(e.ref=document.referrer)},updateSid:function(e){!this.sid&&e&&(this.sid=e,t.Cookie.set(this.msid_key,e,this.msid_ttl))},push:function(t,e){this._queue.push({event:t,callback:e}),t._noProcess?delete t._noProcess:this._processQueue()},_processQueue:function(){if(!this._processTimeout&&this._queue.length>0){var t=this;this._processTimeout=setTimeout(function(){var e=t._queue.shift();void 0===e?t._processTimeout=null:t.track(e.event,function(o,n){n&&n.data&&n.data.sid&&t.updateSid(n.data.sid),t._processTimeout=null,t._processQueue(),e.callback&&e.callback(o,n)})},0)}},includeElementInfo:function(e,o){var n=t.util.getPageSize(),i=t.util.getElementPosition(e);return o=o||{},o.pw=n.w,o.ph=n.h,o.x1=i.x1,o.y1=i.y1,o.x2=i.x2,o.y2=i.y2,o},includeViewportInfo:function(e){var o=t.util.getViewportSize(),n=t.util.getScrollPosition();return e=e||{},e.vx1=n.x,e.vy1=n.y,e.vx2=e.vx1+o.vw,e.vy2=e.vy1+o.vh,e},includeEventInfo:function(e,o){var n=t.util.getEventPosition(e);return o.ex=n.ex,o.ey=n.ey,o},copy:function(e,o){return t.util.flatten(t.util.deepClone(e,o))},truncate:function(t){for(var e in t)t.hasOwnProperty(e)&&"string"==typeof t[e]&&(t[e]=t[e].substr(0,255));return t}},t.metrics=new o}(okanjo,this),function(t,e){t.metrics.trackPageView({_noProcess:!0}),setTimeout(function(){t.metrics._processQueue()},1e3)}(okanjo||this),function(t,e){var o=function(t,e){return t.indexOf(e)},n=function(){this.events={}};return n.prototype.on=function(t,e){"object"!=typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e)},n.prototype.removeListener=function(t,e){var n;"object"==typeof this.events[t]&&(n=o(this.events[t],e),n>-1&&this.events[t].splice(n,1))},n.prototype.emit=function(t){var e,o,n,i=[].slice.call(arguments,1);if("object"==typeof this.events[t])for(o=this.events[t].slice(),n=o.length,e=0;n>e;e++)o[e].apply(this,i)},n.prototype.once=function(t,e){this.on(t,function o(){this.removeListener(t,o),e.apply(this,arguments)})},t._EventEmitter=n,n}(okanjo,this),function(t,e){var o=t.Cache,n=t._Widget=function(e,o){if(t._EventEmitter.call(this),!e||"object"!=typeof e||void 0===e.nodeType)throw new Error("Invalid element - must be a valid DOM element");if("undefined"!=typeof o&&"object"!=typeof o)throw new Error("Invalid configuration, must be an object or nothing at all, got: "+typeof o);o=o||{},this.instanceId=t.util.shortid(),this.element=e,this.config=o||{},this.configMap={},this.templates={error:"okanjo.error"},this.css={}};t.util.inherits(n,t._EventEmitter);var i=n.prototype;return i.widgetName="BaseWidget",i.config=null,i.use_cache=!1,i.cache_key_prefix="ok_widget_",i.cache_ttl=6e4,i.cacheKeyAttributes="id".split(","),i.init=function(){this.parseConfiguration(),this.processTemplateOverrides(),this.ensureTemplates(),this.findWidgetKey()&&this.load()&&this.autoCleanCache()},i.findWidgetKey=function(){return t.util.empty(this.config.key)?t.util.empty(t.key)?t.util.empty(this.key)?(this.config.key=this.key,!0):(this.element.innerHTML=t.mvc.render(this.templates.error,this,{message:"Missing Okanjo key."}),t.report(this.widgetName,"Missing key. Define one using okanjo.configure or pass the key parameter as an option in the "+this.widgetName+" constructor"),!1):(this.key=t.key,this.config.key=this.key,!0):(this.key=this.config.key,this.config.key=this.key,!0)},i.processTemplateOverrides=function(){var t;for(var e in this.config)this.config.hasOwnProperty(e)&&(t=e.match(/^template_(.+)$/),null!==t&&this.templates.hasOwnProperty(t[1])?this.templates[t[1]]=this.config[e]:(t=e.match(/^css_(.+)$/),null!==t&&this.css.hasOwnProperty(t[1])&&(this.css[t[1]]=this.config[e])))},i.ensureTemplates=function(){var e,o=this.templates,n=this.css;for(e in o)if(o.hasOwnProperty(e)&&!t.mvc.isTemplateRegistered(o[e]))throw new Error("[Okanjo."+this.widgetName+"] Missing template: "+o[e]+". Did you forget to include the template?");for(e in n)if(n.hasOwnProperty(e)&&!t.mvc.isCssRegistered(n[e]))throw new Error("[Okanjo."+this.widgetName+"] Missing css block: "+n[e]+". Did you forget to include the css template?")},i.parseConfiguration=function(){var e=t.util.data(this.element);t.util.copyIfSetMap(this.config,e,this.configMap,{stripEmpty:!0})},i.load=function(){return!0},i.autoCleanCache=function(){if(this.use_cache){var t=this;setTimeout(function(){t.cleanCache()},2e3)}},i.getCurrentPageUrl=function(){var t=e.location.href,o=[t.indexOf("?"),t.indexOf("#")].filter(function(t){return t>=0}),n=o.length>0?Math.min.apply(null,o):-1;return n>0?t.substr(0,n):t},i.getCacheKey=function(){for(var o=[e.location.host+e.location.pathname],n=this.cacheKeyAttributes,i=0;i=0&&n.push(a)}for(r=0;rt;t++)setTimeout(j,1e3*t+10)}),g(e,"resize",function(){setTimeout(j,100)}),g(i,"click",x),g(r,"click",function(t){t.preventDefault(),t.stopPropagation()}),g(l,"click",function(t){t.preventDefault(),t.stopPropagation(),x()})},g=function(t,e,o){t.addEventListener?t.addEventListener(e,o,!1):t.attachEvent("on"+e,o)},k=function(t,e){t.className+=" "+e},b=function(t,e){t.className=t.className.replace(new RegExp(" *?"+e),"")},y=function(){return e.innerHeight||document.documentElement.clientHeight},j=function(){u=t.util.getScrollPosition().y,r.style.height=y()-80+"px"},v=function(){u=document.body.scrollTop,b(i,"okanjo-modal-hidden"),k(i,"okanjo-modal-fade-out"),j(),k(o,"okanjo-modal-active"),h||k(o,"okanjo-modal-margin-fix"),setTimeout(function(){b(i,"okanjo-modal-fade-out")},10)},x=function(){k(i,"okanjo-modal-fade-out"),setTimeout(function(){b(i,"okanjo-modal-fade-out"),k(i,"okanjo-modal-hidden"),b(o,"okanjo-modal-active"),h||b(o,"okanjo-modal-margin-fix")},210)},w=function(t){s.innerHTML="","string"==typeof t?s.innerHTML=t:s.appendChild(t)};return t.modal={show:function(t){p||(p=!0,f(),m()),w(t),v()},hide:function(){x()}},t.modal}(okanjo,this),function(t,e){function o(e,n){t._Widget.call(this,e,n),this.items=[],this.config=n=n||{mode:o.contentTypes.browse,use_cache:!1,cache_ttl:6e4},this.config.nag=void 0===n.nag?!0:n.nag===!0,this.config.use_cache=void 0===n.use_cache?!1:n.use_cache===!0,this.config.cache_ttl=void 0===n.cache_ttl?6e4:n.cache_ttl,this.disable_popup=n.disable_popup===!0,this.use_cache=this.config.use_cache,this.cache_ttl=this.config.cache_ttl,this.proxy_url=null,this.config.metrics_context=void 0===n.metrics_context?"pw":n.metrics_context,this.config.metrics_channel_context=void 0===n.metrics_channel_context?null:n.metrics_channel_context,this.disable_inline_buy=void 0===this.config.disable_inline_buy?!1:n.disable_inline_buy===!0,this.cache_key_prefix="ok_product_block_",this.templates={product_error:"okanjo.error",product_main:"product.block"},this.css={product_main:"product.block",product_modal:"okanjo.modal"},this.configMap={key:"key",mode:"mode",disable_inline_buy:"disable-inline-buy",proxy_url:"proxy-url",url:"url",selectors:"selectors",url_category:"url-category",id:"id",q:"q",marketplace_status:["marketplace-status"],marketplace_id:["marketplace-id"],pools:"pools",external_id:"external-id",sku:"sku",sold_by:"sold-by",external_store_id:"external-store-id",min_price:"min-price",max_price:"max-price",condition:"condition",manufacturer:"manufacturer",upc:"upc",isbn:"isbn",tags:"tags",category:"category",min_donation_percent:"min-donation-percent",max_donation_percent:"max-donation-percent",donation_to:"donation-to",suboptimal:"suboptimal",backfill:"backfill",skip:["skip","page-start"],take:["take","page-size"],expandable:"expandable",template_product_main:"template-product-main",template_product_error:"template-product-error",size:"size",template_layout:"template-layout",template_theme:"template-theme",template_cta_style:"template-cta-style",template_cta_text:"template-cta-text",template_cta_color:"template-cta-color"},n.no_init||this.init()}function n(e,o,n,i){var r,a,c=[],s=o.indexOf("?")<0?"?":"&";for(r in i)i.hasOwnProperty(r)&&c.push(r+"="+encodeURIComponent(i[r]));return t.metrics.normalizeEventData(e),e.n=(new Date).getTime(),a=o+(c.length>0?s+c.join("&"):""),n?e.u=n+encodeURIComponent(a):e.u=a,t.JSONP.makeUrl({url:t.getRoute(t.routes.metrics,{object_type:t.metrics.object_type.product,event_type:t.metrics.event_type.interaction}),data:e})}t.util.inherits(o,t._Widget),o.contentTypes={browse:"browse",sense:"sense",single:"single"};var i=o.prototype;return i.widgetName="Product",i.cacheKeyAttributes="mode,url,selectors,text,id,q,marketplace_status,marketplace_id,external_id,sku,sold_by,min_price,max_price,condition,manufacturer,upc,isbn,tags,category,min_donation_percent,max_donation_percent,donation_to,suboptimal,skip,take".split(","),i.load=function(){if(this.config.id||this.config.mode==o.contentTypes.single?t.util.empty(this.config.id)?this.config.mode=o.contentTypes.browse:this.config.mode=o.contentTypes.single:this.config.url||this.config.text||this.config.mode==o.contentTypes.sense?(t.util.empty(this.config.url)&&t.util.empty(this.config.text)&&(this.config.url=this.getCurrentPageUrl(),this.config.nag&&console.info("[Okanjo."+this.widgetName+"] No canonical url given for ProductSense. We recommend using a canonical url to ensure page visibility by Okanjo. Using derived url:",this.config.url)),this.config.mode=o.contentTypes.sense,this.config.take=this.config.take||5):this.config.mode=t.util.empty(this.config.mode)?o.contentTypes.browse:this.config.mode,function(t){for(var e=0;ee,n.articleId&&(n.metricBase.m.aid=n.articleId),n.metricBase.m.pten=n.placementTest&&n.placementTest.enabled?"1":"0",n.placementTest&&(n.placementTest.id&&(n.metricBase.m.ptid=n.placementTest.id),n.placementTest.seed&&(n.metricBase.m.ptseed=n.placementTest.seed)),n.emit("data",r),n.showProducts(n.items),!n.shorted&&n.use_cache&&(!n.placementTest||n.placementTest&&!n.placementTest.enabled)){var a=n.getCacheKey();n.saveInCache(a,n.items)}n.emit("load",{fromCache:!1})}})},i.executeSearch=function(e){var n=t.util.deepClone(this.config);this.config.mode===o.contentTypes.sense?t.exec(t.getRoute(t.routes.products_sense),n,e):this.config.mode===o.contentTypes.single?t.exec(t.getRoute(t.routes.products_id,{product_id:this.config.id}),n,function(t,o){!t&&o&&o.data&&(o.data=[o.data]),e&&e(t,o)}):t.exec(t.getRoute(t.routes.products),n,e)},i.handleInlineBuyOption=function(){if(this.disable_inline_buy)for(var t=0;t=0&&(_=w);if(_){j.className+=" okanjo-ad-in-unit",j.setAttribute("height","100%"),j.setAttribute("width","100%"),_.appendChild(j),f=!0;var C=t.util.getElementSize(_);h.expandable=0,h.frame_height=C.height,h.frame_width=C.width,h.ad_size=_.getAttribute("data-size")||"undefined"}}c.ea=t.metrics.action.inline_click,c.m.expandable=1===h.expandable?"true":"false",r=n(c,y,u,h),j.src=r,f||t.modal.show(j)}else i?(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}),this.click()):(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}))},i.bindEvents=function(){var e=this;t.qwery("a",this.element).every(function(n){var i=n.getAttribute("data-id");if(i&&(n.addEventListener?n.addEventListener("click",o.interactTile):n.attachEvent("onclick",function(t){o.interactTile.call(n,t)}),e.config.metrics_context==t.metrics.channel.product_widget)){var r=n.getAttribute("data-backfill"),a=t.util.deepClone(e.metricBase,{});a.id=n.getAttribute("data-id"),a.m.bf="true"===r?1:0,a.m=t.metrics.truncate(t.metrics.copy(e.config,t.metrics.includeElementInfo(n.parentNode,a.m))),t.metrics.trackEvent(t.metrics.object_type.product,t.metrics.event_type.impression,a)}return!0}),t.qwery(".okanjo-product-title",this.element).every(function(e){return t.util.ellipsify(e),!0})},i.guessAdSize=function(){for(var e,o,n,i,r=[],a=0,c="728x90|300x250|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60".split("|");a';n.className="okanjo-adx-container",n.appendChild(i),this.element.innerHTML="",this.element.appendChild(n),i.contentWindow.document.open(),i.contentWindow.document.write(s),i.contentWindow.document.close();for(var l in r)r.hasOwnProperty(l)&&i.setAttribute(l,r[l]);i.className="okanjo-ad-backfill",i.setAttribute("width",o.width+"px"),i.setAttribute("height",o.height+"px");var d=t.util.deepClone(this.metricBase,{});d.m.ta_w=o.width,d.m.ta_h=o.height,d.m.ta_pubid=a,d.m.ta_slotid=c,d.m=t.metrics.truncate(t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,d.m))),t.metrics.trackEvent(t.metrics.object_type.thirdparty_ad,t.metrics.event_type.impression,d)},t.Product=o,o}(okanjo,this),function(t,e){function o(e,o){t._Widget.call(this,e,o),this.config=o=o||{},this.templates={ad_error:"okanjo.error",ad_main:"ad.block"},this.css={ad_main:"ad.block"},this.disable_inline_buy=void 0===this.config.disable_inline_buy?!1:o.disable_inline_buy===!0,this.proxy_url=null,this.configMap={key:"key",proxy_url:"proxy-url",content:"content",size:"size",expandable:"expandable",type:"type",id:"id",template_ad_main:"template-ad-main",template_ad_error:"template-ad-error",disable_inline_buy:"disable-inline-buy",template_product_main:"template-product-main",template_product_error:"template-product-error"},o.no_init||this.init()}t.util.inherits(o,t._Widget),o.contentTypes={creative:"creative",dynamic:"dynamic"},o.types={product:"product"},o.sizes={billboard:{width:970,height:250},button_2:{width:120,height:60},half_page:{width:300,height:600},leaderboard:{width:728,height:90},medium_rectangle:{width:300,height:250},micro_bar:{width:88,height:31},portrait:{width:300,height:1050},rectangle:{width:180,height:150},super_leaderboard:{width:970,height:90},wide_skyscraper:{width:160,height:600},large_mobile_banner:{width:320,height:100},mobile_leaderboard:{width:320,height:50},small_square:{width:200,height:200},button_1:{width:120,height:90},full_banner:{width:468,height:60},half_banner:{width:234,height:60},large_rectangle:{width:336,height:280},pop_under:{width:720,height:300},three_to_one_rectangle:{width:300,height:100},skyscraper:{width:120,height:600},square:{width:250,height:250},square_button:{width:125,height:125},vertical_banner:{width:120,height:240},vertical_rectangle:{width:240,height:400}};var n=o.prototype;return n.widgetName="Ad",n.load=function(){if(t.util.empty(this.config.content))this.hasCreativeContent()?this.config.content=o.contentTypes.creative:this.config.content=o.contentTypes.dynamic;else if(this.config.content!==o.contentTypes.creative||this.hasCreativeContent()){if(this.config.content===o.contentTypes.dynamic&&this.hasCreativeContent())console.warn("[Okanjo.Ad] Ad content is dynamic, but ad placement contains markup. Markup will be clobbered!");else if(!o.contentTypes.hasOwnProperty(this.config.content))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:"Invalid ad content: "+this.config.content}),t.report(this.widgetName,"Invalid ad content: "+this.config.content),!1}else console.warn("[Okanjo.Ad] Ad content is creative, but ad placement does not contain creative markup. Switching to dynamic!"),this.config.content=o.contentTypes.dynamic;if(t.util.empty(this.config.type)?this.config.type=o.types.product:o.types.hasOwnProperty(this.config.type)||(console.warn("[Okanjo."+this.widgetName+"] Unknown type",this.config.type,"given, using type `product` instead"),this.config.type=o.types.product),!t.util.empty(this.config.size)&&o.sizes.hasOwnProperty(this.config.size)&&this.setElementSize(o.sizes[this.config.size]),this.config.disable_inline_buy&&"string"==typeof this.config.disable_inline_buy&&(this.disable_inline_buy="true"===this.config.disable_inline_buy.toLowerCase()),this.config.proxy_url&&(this.proxy_url=this.config.proxy_url,delete this.config.proxy_url),t.metrics.trackEvent(t.metrics.object_type.widget,t.metrics.event_type.impression,{ch:t.metrics.channel.ad_widget,cx:this.config.content,m:t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,{wgid:this.instanceId}))}),this.config.type===o.types.product){if(t.util.empty(this.config.id))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:"Missing ad product id"}),t.report(this.widgetName,"Missing ad product id"),!1;if(this.config.content==o.contentTypes.dynamic)this.insertProductWidget();else{if(this.config.content!=o.contentTypes.creative)return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:"Cannot render ad in content: "+this.config.content}),t.report(this.widgetName,"Cannot render ad in content: "+this.config.content),!1;this.insertCreativeWidget()}}return!0},n.render=function(){var e,n=document.createElement("div"),i=[],r=this.config.content==o.contentTypes.dynamic&&!t.util.empty(this.config.size);for(n.innerHTML=t.mvc.render(this.templates.ad_main,this,{config:this.config},{blockClasses:r?["okanjo-ad-fit"]:[]}),e=0;e0)this._waitingOnProductLoad=!1,t.Product.interactTile.call(o[0],e,!0);else if(!this._waitingOnProductLoad){this._waitingOnProductLoad=!0;var n=this,i=setInterval(function(){n._waitingOnProductLoad?n.interact(e):clearInterval(i)},250);console.warn("Waiting for Okanjo Product widget to load...")}},n.insertCreativeWidget=function(){this.insertProductWidget({hidden:!0}); +var t=this;this.element.addEventListener?this.element.addEventListener("click",function(e){t.interact(e)}):this.element.attachEvent("onclick",function(e){t.interact(e)})},n.insertProductWidget=function(e){e=e||{};var o=document.createElement("div");o.className="okanjo-ad-dynamic-product",e.hidden&&(o.style.display="none"),this.element.appendChild(o),this.render();var n={id:this.config.id,key:this.key,mode:t.Product.contentTypes.single,disable_inline_buy:this.disable_inline_buy,disable_popup:this.config.disable_popup===!0,proxy_url:this.proxy_url,expandable:void 0===this.config.expandable||("boolean"==typeof this.config.expandable?this.config.expandable:"true"===(""+this.config.expandable).toLowerCase()),metrics_context:t.metrics.channel.ad_widget,metrics_channel_context:this.config.content,template_product_main:"product.single"};return this.config.template_product_main&&(n.template_product_main=this.config.template_product_main),this.config.template_product_error&&(n.template_product_error=this.config.template_product_error),this.productWidget=new t.Product(o,n),this.productWidget},n.setElementSize=function(t){this.element.style.display="block",this.element.style.overflow="hidden",this.element.style.width=t.width+"px",this.element.style.height=t.height+"px"},n.hasCreativeContent=function(){if(this.element.childElementCount&&this.element.childElementCount>0)return!0;for(var t=0;t
',function(e,o){return e=e||{config:{}},o=t.util.clone(o),o.config=e.config,o.size=e.config.size||"undefined",o},{css:["ad.block"]}),t.mvc.registerCss("okanjo.core","",{id:"okanjo-core"}),t.mvc.registerCss("okanjo.modal",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:" ";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}',{id:"okanjo-modal"}),t.mvc.registerTemplate("okanjo.error","{{ message }} {{#code}} Reference: {{ code }} {{/code}}",{css:["okanjo.core"]}),t.mvc.registerCss("product.block",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:" ";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:"..."}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block"});var e='
';t.mvc.registerTemplate("product.block",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-block",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:["product.block","okanjo.modal"]}),t.mvc.registerCss("product.block2",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:" ";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:"..."}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block2"});var o='',n=0;t.mvc.registerTemplate("product.block2",o,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-block2",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var i=t.util.deepClone(this.metricBase,{});i.m=t.metrics.truncate(t.metrics.copy(this.config,i.m)),o.metricBaseJSON=JSON.stringify(i),"leaderboard"==o.config.size||"large_mobile_banner"==o.config.size?(o.config.template_layout="list",o.config.template_cta_style="link"):"half_page"!=o.config.size&&"auto"!=o.config.size||(o.config.template_layout="list");var r=o.config.template_cta_color;if(r){var a,c="okanjo-product-block2-cus-"+n;a=".okanjo-product-block2."+c+" .okanjo-product-buy-button { color: "+r+";} .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid "+r+"; } .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: "+r+"; } ",t.mvc.registerCss(c,a,{id:c}),t.mvc.ensureCss(c)}return o.blockId=n++,o},{css:["product.block2","okanjo.modal"]}),t.mvc.registerCss("product.sidebar",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:" ";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:"..."}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-sidebar"}),t.mvc.registerTemplate("product.sidebar",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-sidebar",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:["product.sidebar","okanjo.modal"]}),t.mvc.registerCss("product.single",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:" ";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:"..."}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-single"}),t.mvc.registerTemplate("product.single",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name="okanjo-product-single",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?"1":"",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:["product.single","okanjo.modal"]})}(okanjo); //# sourceMappingURL=okanjo-bundle.min.js.map diff --git a/dist/okanjo-bundle.min.js.map b/dist/okanjo-bundle.min.js.map index a13b357..0090ecf 100644 --- a/dist/okanjo-bundle.min.js.map +++ b/dist/okanjo-bundle.min.js.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["okanjo-bundle.js"],"sourcesContent":["/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n!function(t,e){\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?module.exports=e():t.okanjo=e()}(this,function(){var okanjo=function(t){function e(t){for(var e,o,n,i,r={},a=t.split(\"&\"),c=0;c=0;n--)0===o[n].name.indexOf(\"data-\")&&(e[o[n].name.substr(5)]=o[n].value);return e},c.copyIfSet=function(t,e,o,n,i){function r(n){!e||void 0===e[n]||i.stripEmpty&&c.empty(e[n])||(t[o]=e[n])}if(n=n||o,i=i||{},\"object\"==typeof n&&Array.isArray(n))for(var a=0;ar||a&&i>a;return{vw:c?r:n,vh:c?a:i}},c.getEventPosition=function(t){var e=t.pageX,o=t.pageY,n=document,i=n.body,r=n.documentElement,a=\"scrollLeft\",c=\"scrollTop\";return{ex:void 0===e?t.clientX+i[a]+r[a]:e,ey:void 0===o?t.clientY+i[c]+r[c]:o}},c.ellipsify=function(t,e){for(var o=e||t.parentNode,n=c.getElementSize(o).height,i=void 0!==t.textContent,r=i?t.textContent:t.innerText,a=\"\",s=5e3,l=function(t){return a=t.substr(0,t.length-3)+a,\"...\"};c.getElementSize(t).height>n&&r.length>0&&s-- >0;)r=i?t.textContent:t.innerText,r=r.replace(/[\\s\\S](?:\\.\\.\\.)?$/,l),i?t.textContent=r:t.innerText=r;if(a.length>0){var d=document.createElement(\"span\"),p=document.createElement(\"span\");d.setAttribute(\"class\",\"okanjo-ellipses\"),p.setAttribute(\"class\",\"okanjo-visually-hidden\"),i?(d.textContent=r.substr(0,r.length-3),p.textContent=a):(d.innerText=r.substr(0,r.length-3),p.innerText=a),t.innerHTML=\"\",t.appendChild(d),t.appendChild(p)}},c.detectClasses=function(){var t=[];return navigator.appVersion.indexOf(\"MSIE 9.\")!=-1?t.push(\"lt-ie10\"):navigator.appVersion.indexOf(\"MSIE 8.\")!=-1?t.push(\"lt-ie9\"):navigator.appVersion.indexOf(\"MSIE 7.\")!=-1?t.push(\"lt-ie8\"):navigator.appVersion.indexOf(\"MSIE 6.\")!=-1&&t.push(\"lt-ie7\"),t},c.isFramed=function(){return window.top!==window.self},c.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(i)},c.isAndroid=function(){return/Android/.test(i)},c.isMobile=function(){return c.isiOS()||c.isAndroid()},c.getPageArguments=function(t){var o=e(window.location.search.substring(window.location.search.indexOf(\"?\")+1));if(t){var n=e(window.location.hash.substring(Math.max(window.location.hash.indexOf(\"#\")+1,window.location.hash.indexOf(\"#!\")+2)));for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])}return o},c.deepClone=function(t,e){var o,n=0;if(Array.isArray(t))for(e=e||[];n>4*o&15|r()],e=t0&&(n+=a(e)),n+=a(i)}}(),a}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */\n/*! Okanjo Local Storage Polyfill v1.0.0 | (c) 2013 Okanjo Partners Inc | Based on https://gist.github.com/juliocesar/926500/ddb28fb72903be87cb9044a945c6edbe1aa28b3a */\n/*! Okanjo Cookie Helper v1.0.0 | (c) 2013 Okanjo Partners Inc */\nreturn config.key=config.key||void 0,config.marketplace={uri:\"https://shop.okanjo.com\",apiUri:\"https://api.okanjo.com\",routerUri:\"https://shop.okanjo.com/widgets/router/\",balancedMarketplacePath:\"/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy\",socketIOUri:\"https://mke-rt.okanjo.com:13443\"},config.ads={apiUri:\"https://ads-api.okanjo.com\"},okanjo.configure=function(t){Object.keys(t).every(function(e){return config[e]&&\"object\"==typeof config[e]&&\"object\"==typeof t[e]?Object.keys(t[e]).every(function(o){return config[e][o]=t[e][t[o]],!0}):config[e]=t[e],!0})},function(t,e){var o=t.TemplateEngine=function(e){e=e||{templates:{},css:{}},this._templates=e.templates||{},this._css=e.css||{},this.classDetects=t.util.detectClasses(),this.classDetects=this.classDetects.join(\" \")};o.prototype={constructor:o,registerTemplate:function(e,o,n,i){if(\"object\"==typeof o){if(void 0===o.nodeType)throw new Error(\"Parameter template must be a string or a DOM element\");t.Mustache.parse(o)}else if(\"string\"!=typeof o)throw new Error(\"Parameter template must be a string or a DOM element\");if(3===arguments.length&&\"object\"==typeof n?(i=n,n=void 0):i=i||{},void 0!==n&&\"function\"!=typeof n)throw new Error(\"Parameter viewClosure must be a function\");this._templates[e]={markup:o,options:i,viewClosure:n||null}},registerCss:function(t,e,o){if(o=o||{},\"object\"==typeof e){if(void 0===e.nodeType)throw new Error(\"Parameter css must be a string or a DOM element\")}else if(\"string\"!=typeof e)throw new Error(\"Parameter css must be a string or a DOM element\");this._css[t]={markup:e,options:o}},isTemplateRegistered:function(t){return!!this._templates[t]},isCssRegistered:function(t){return!!this._css[t]},ensureCss:function(e){if(this._css[e]){var o=this._css[e],n=void 0===o.markup.nodeType?o.options.id||\"okanjo-css-\"+e:null;if(n){var i=t.qwery(\"#\"+n);if(0===i.length){var r=t.qwery(\"head\"),a=document.createElement(\"style\");if(a.id=n,a.setAttribute(\"type\",\"text/css\"),a.hasOwnProperty?a.innerHTML=o.markup:a.styleSheet.cssText=o.markup,r.length>0)r[0].appendChild(a);else{var c=t.qwery(\"body\");c.length>0&&c[0].appendChild(a)}}}}else console.warn('[Okanjo.Template] Attempted to add CSS template \"'+e+'\" to the DOM, however it does not appear to be registered?')},render:function(e,o,n,i){i=i||{};var r=this._templates[e],a=n;if(r.viewClosure&&(a=r.viewClosure.call(o,n,i)),a.okanjoConfig=t.config,a.okanjoMetricUrl=t.config.ads.apiUri.replace(/^https?:\\/\\//,\"\"),a.now=function(){return(new Date).getTime()},a.classDetects=this.classDetects,i.blockClasses&&Array.isArray(i.blockClasses)&&(a.classDetects=a.classDetects+=\" \"+i.blockClasses.join(\" \")),i.css!==!1&&r.options.css&&r.options.css.length>0)for(var c=0;c3?a%3:0,i+(a?r.substr(0,a)+n:\"\")+r.substr(a).replace(/(\\d{3})(?=\\d)/g,\"$1\"+n)+(e?o+Math.abs(t-r).toFixed(e).slice(2):\"\")},product:function(e){if(\"object\"==typeof e&&Array.isArray(e)){for(var o=[],n=0;n>>0;if(0===i)return-1;var r=+e||0;if(Math.abs(r)===1/0&&(r=0),r>=i)return-1;for(o=Math.max(r>=0?r:i-Math.abs(r),0);o>>0;if(\"function\"!=typeof t)throw new TypeError;for(arguments.length>1&&(o=e),n=0;n>>0;if(\"function\"!=typeof t)throw new TypeError;for(var n=[],i=arguments.length>=2?arguments[1]:void 0,r=0;r~+]/,L=/^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g,D=/[\\s\\>\\+\\~]/,U=/(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/,R=/([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g,q=/^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/,B=/\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/,H=/:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/,J=new RegExp(I.source+\"|\"+P.source+\"|\"+N.source),W=new RegExp(\"(\"+D.source+\")\"+U.source,\"g\"),$=new RegExp(D.source+U.source),V=new RegExp(q.source+\"(\"+B.source+\")?(\"+H.source+\")?\"),F={\" \":function(t){return t&&t!==x&&t.parentNode},\">\":function(t,e){return t&&t.parentNode==e.parentNode&&t.parentNode},\"~\":function(t){return t&&t.previousSibling},\"+\":function(t,e,o,n){return!!t&&((o=r(t))&&(n=r(e))&&o==n&&o)}};t.prototype={g:function(t){return this.c[t]||void 0},s:function(t,e,o){return e=o?new RegExp(e):e,this.c[t]=e}};var K=new t,Y=new t,Q=new t,X=new t,G=\"compareDocumentPosition\"in x?function(t,e){return 16==(16&e.compareDocumentPosition(t))}:\"contains\"in x?function(t,e){return e=9===e[T]||e==window?x:e,e!==t&&e.contains(t)}:function(t,e){for(;t=t.parentNode;)if(t===e)return 1;return 0},Z=function(){var t=v.createElement(\"p\");return(t.innerHTML='x')&&\"#x\"!=t.firstChild.getAttribute(\"href\")?function(t,e){return\"class\"===e?t.className:\"href\"===e||\"src\"===e?t.getAttribute(e,2):t.getAttribute(e)}:function(t,e){return t.getAttribute(e)}}(),tt=!!v[w],et=v.querySelector&&v[C],ot=function(t,e){var n,r,a=[];try{return 9!==e[T]&&M.test(t)?(o(n=t.split(\",\"),y(e,function(t,e){r=t[C](e),1==r.length?a[a.length]=r.item(0):r.length&&(a=a.concat(i(r)))})),n.length>1&&a.length>1?f(a):a):i(e[C](t))}catch(c){}return nt(t,e)},nt=function(t,n){var i,r,a,c,s,l,p=[];if(t=t.replace(L,\"$1\"),r=t.match(z)){for(s=e(r[2]),i=n[_](r[1]||\"*\"),a=0,c=i.length;a1&&p.length>1?f(p):p},it=function(t){\"undefined\"!=typeof t[E]&&(j=t[E]&&et?ot:nt)};return it({useNativeQSA:!0}),b.configure=it,b.uniq=f,b.is=p,b.pseudos={},b}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\nfunction(t,e){\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?module.exports=e():t.onDomReady=e()}(this,function(){\"use strict\";function t(e){if(!v){if(!a.body)return n(t);for(v=!0;e=x.shift();)n(e)}}function e(e){(y||e.type===s||a[u]===p)&&(o(),t())}function o(){y?(a[b](g,e,l),r[b](s,e,l)):(a[f](k,e),r[f](d,e))}function n(t,e){setTimeout(t,+e>=0?e:1)}function i(t){v?n(t):x.push(t)}var r=window,a=r.document,c=a.documentElement,s=\"load\",l=!1,d=\"on\"+s,p=\"complete\",u=\"readyState\",h=\"attachEvent\",f=\"detachEvent\",m=\"addEventListener\",g=\"DOMContentLoaded\",k=\"onreadystatechange\",b=\"removeEventListener\",y=m in a,j=l,v=l,x=[];if(a[u]===p)n(t);else if(y)a[m](g,e,l),r[m](s,e,l);else{a[h](k,e),r[h](d,e);try{j=null==r.frameElement&&c}catch(w){}j&&j.doScroll&&!function _(){if(!v){try{j.doScroll(\"left\")}catch(e){return n(_,50)}o(),t()}}()}return i.version=\"1.4.0\",i.isReady=function(){return v},i}),/*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\nfunction(t,e){\"object\"==typeof exports&&exports?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e(t.Mustache={})}(this,function(t){function e(t){return\"function\"==typeof t}function o(t){return t.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}function n(t,e){return f.call(t,e)}function i(t){return!n(m,t)}function r(t){return String(t).replace(/[&<>\"'\\/]/g,function(t){return g[t]})}function a(e,n){function r(){if(x&&!w)for(;g.length;)delete m[g.pop()];else g=[];x=!1,w=!1}function a(t){if(\"string\"==typeof t&&(t=t.split(b,2)),!h(t)||2!==t.length)throw new Error(\"Invalid tags: \"+t);d=new RegExp(o(t[0])+\"\\\\s*\"),p=new RegExp(\"\\\\s*\"+o(t[1])),u=new RegExp(\"\\\\s*\"+o(\"}\"+t[1]))}if(!e)return[];var d,p,u,f=[],m=[],g=[],x=!1,w=!1;a(n||t.tags);for(var _,C,E,O,T,A,S=new l(e);!S.eos();){if(_=S.pos,E=S.scanUntil(d))for(var I=0,N=E.length;I0?r[r.length-1][4]:n;break;default:i.push(e)}return n}function l(t){this.string=t,this.tail=t,this.pos=0}function d(t,e){this.view=null==t?{}:t,this.cache={\".\":this.view},this.parent=e}function p(){this.cache={}}var u=Object.prototype.toString,h=Array.isArray||function(t){return\"[object Array]\"===u.call(t)},f=RegExp.prototype.test,m=/\\S/,g={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"/\":\"/\"},k=/\\s*/,b=/\\s+/,y=/\\s*=/,j=/\\s*\\}/,v=/#|\\^|\\/|>|\\{|&|=|!/;l.prototype.eos=function(){return\"\"===this.tail},l.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return\"\";var o=e[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},l.prototype.scanUntil=function(t){var e,o=this.tail.search(t);switch(o){case-1:e=this.tail,this.tail=\"\";break;case 0:e=\"\";break;default:e=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=e.length,e},d.prototype.push=function(t){return new d(t,this)},d.prototype.lookup=function(t){var o,n=this.cache;if(t in n)o=n[t];else{for(var i,r,a=this;a;){if(t.indexOf(\".\")>0)for(o=a.view,i=t.split(\".\"),r=0;null!=o&&r\"===r?a=this._renderPartial(i,e,o,n):\"&\"===r?a=this._unescapedValue(i,e):\"name\"===r?a=this._escapedValue(i,e):\"text\"===r&&(a=this._rawValue(i)),void 0!==a&&(c+=a);return c},p.prototype._renderSection=function(t,o,n,i){function r(t){return a.render(t,o,n)}var a=this,c=\"\",s=o.lookup(t[1]);if(s){if(h(s))for(var l=0,d=s.length;l0){var t=this;this._processTimeout=setTimeout(function(){var e=t._queue.shift();void 0===e?t._processTimeout=null:t.track(e.event,function(o,n){n&&n.data&&n.data.sid&&t.updateSid(n.data.sid),t._processTimeout=null,t._processQueue(),e.callback&&e.callback(o,n)})},0)}},includeElementInfo:function(e,o){var n=t.util.getPageSize(),i=t.util.getElementPosition(e);return o=o||{},o.pw=n.w,o.ph=n.h,o.x1=i.x1,o.y1=i.y1,o.x2=i.x2,o.y2=i.y2,o},includeViewportInfo:function(e){var o=t.util.getViewportSize(),n=t.util.getScrollPosition();return e=e||{},e.vx1=n.x,e.vy1=n.y,e.vx2=e.vx1+o.vw,e.vy2=e.vy1+o.vh,e},includeEventInfo:function(e,o){var n=t.util.getEventPosition(e);return o.ex=n.ex,o.ey=n.ey,o},copy:function(e,o){return t.util.flatten(t.util.deepClone(e,o))},truncate:function(t){for(var e in t)t.hasOwnProperty(e)&&\"string\"==typeof t[e]&&(t[e]=t[e].substr(0,255));return t}},t.metrics=new o}(okanjo,this),function(t,e){t.metrics.trackPageView({_noProcess:!0}),setTimeout(function(){t.metrics._processQueue()},1e3)}(okanjo||this),function(t,e){var o=function(t,e){return t.indexOf(e)},n=function(){this.events={}};return n.prototype.on=function(t,e){\"object\"!=typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e)},n.prototype.removeListener=function(t,e){var n;\"object\"==typeof this.events[t]&&(n=o(this.events[t],e),n>-1&&this.events[t].splice(n,1))},n.prototype.emit=function(t){var e,o,n,i=[].slice.call(arguments,1);if(\"object\"==typeof this.events[t])for(o=this.events[t].slice(),n=o.length,e=0;e=0}),n=o.length>0?Math.min.apply(null,o):-1;return n>0?t.substr(0,n):t},i.getCacheKey=function(){for(var o=[e.location.host+e.location.pathname],n=this.cacheKeyAttributes,i=0;i=0&&n.push(a)}for(r=0;r0?s+c.join(\"&\"):\"\"),n?e.u=n+encodeURIComponent(a):e.u=a,t.JSONP.makeUrl({url:t.getRoute(t.routes.metrics,{object_type:t.metrics.object_type.product,event_type:t.metrics.event_type.interaction}),data:e})}t.util.inherits(o,t._Widget),o.contentTypes={browse:\"browse\",sense:\"sense\",single:\"single\"};var i=o.prototype;return i.widgetName=\"Product\",i.cacheKeyAttributes=\"mode,url,selectors,text,id,q,marketplace_status,marketplace_id,external_id,sku,sold_by,min_price,max_price,condition,manufacturer,upc,isbn,tags,category,min_donation_percent,max_donation_percent,donation_to,suboptimal,skip,take\".split(\",\"),i.load=function(){if(this.config.id||this.config.mode==o.contentTypes.single?t.util.empty(this.config.id)?this.config.mode=o.contentTypes.browse:this.config.mode=o.contentTypes.single:this.config.url||this.config.text||this.config.mode==o.contentTypes.sense?(t.util.empty(this.config.url)&&t.util.empty(this.config.text)&&(this.config.url=this.getCurrentPageUrl(),this.config.nag&&console.info(\"[Okanjo.\"+this.widgetName+\"] No canonical url given for ProductSense. We recommend using a canonical url to ensure page visibility by Okanjo. Using derived url:\",this.config.url)),this.config.mode=o.contentTypes.sense,this.config.take=this.config.take||5):this.config.mode=t.util.empty(this.config.mode)?o.contentTypes.browse:this.config.mode,function(t){for(var e=0;ee,n.articleId&&(n.metricBase.m.aid=n.articleId),n.metricBase.m.pten=n.placementTest&&n.placementTest.enabled?\"1\":\"0\",n.placementTest&&(n.placementTest.id&&(n.metricBase.m.ptid=n.placementTest.id),n.placementTest.seed&&(n.metricBase.m.ptseed=n.placementTest.seed)),n.emit(\"data\",r),n.showProducts(n.items),!n.shorted&&n.use_cache&&(!n.placementTest||n.placementTest&&!n.placementTest.enabled)){var a=n.getCacheKey();n.saveInCache(a,n.items)}n.emit(\"load\",{fromCache:!1})}})},i.executeSearch=function(e){var n=t.util.deepClone(this.config);this.config.mode===o.contentTypes.sense?t.exec(t.getRoute(t.routes.products_sense),n,e):this.config.mode===o.contentTypes.single?t.exec(t.getRoute(t.routes.products_id,{product_id:this.config.id}),n,function(t,o){!t&&o&&o.data&&(o.data=[o.data]),e&&e(t,o)}):t.exec(t.getRoute(t.routes.products),n,e)},i.handleInlineBuyOption=function(){if(this.disable_inline_buy)for(var t=0;t=0&&(_=w);if(_){j.className+=\" okanjo-ad-in-unit\",j.setAttribute(\"height\",\"100%\"),j.setAttribute(\"width\",\"100%\"),_.appendChild(j),f=!0;var C=t.util.getElementSize(_);h.expandable=0,h.frame_height=C.height,h.frame_width=C.width,h.ad_size=_.getAttribute(\"data-size\")||\"undefined\"}}c.ea=t.metrics.action.inline_click,c.m.expandable=1===h.expandable?\"true\":\"false\",r=n(c,y,u,h),j.src=r,f||t.modal.show(j)}else i?(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}),this.click()):(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}))},i.bindEvents=function(){var e=this;t.qwery(\"a\",this.element).every(function(n){var i=n.getAttribute(\"data-id\");if(i&&(n.addEventListener?n.addEventListener(\"click\",o.interactTile):n.attachEvent(\"onclick\",function(t){o.interactTile.call(n,t)}),e.config.metrics_context==t.metrics.channel.product_widget)){var r=n.getAttribute(\"data-backfill\"),a=t.util.deepClone(e.metricBase,{});a.id=n.getAttribute(\"data-id\"),a.m.bf=\"true\"===r?1:0,a.m=t.metrics.truncate(t.metrics.copy(e.config,t.metrics.includeElementInfo(n.parentNode,a.m))),t.metrics.trackEvent(t.metrics.object_type.product,t.metrics.event_type.impression,a)}return!0}),t.qwery(\".okanjo-product-title\",this.element).every(function(e){return t.util.ellipsify(e),!0})},i.guessAdSize=function(){for(var e,o,n,i,r=[],a=0,c=\"300x250|728x90|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60\".split(\"|\");a';this.element.innerHTML=\"\",this.element.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.write(c),n.contentWindow.document.close();for(var s in i)i.hasOwnProperty(s)&&n.setAttribute(s,i[s]);n.className=\"okanjo-ad-backfill\",n.setAttribute(\"width\",o.width+\"px\"),n.setAttribute(\"height\",o.height+\"px\");var l=t.util.deepClone(this.metricBase,{});l.m.ta_w=o.width,l.m.ta_h=o.height,l.m.ta_pubid=r,l.m.ta_slotid=a,l.m=t.metrics.truncate(t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,l.m))),t.metrics.trackEvent(t.metrics.object_type.thirdparty_ad,t.metrics.event_type.impression,l)},t.Product=o,o}(okanjo,this),function(t,e){function o(e,o){t._Widget.call(this,e,o),this.config=o=o||{},this.templates={ad_error:\"okanjo.error\",ad_main:\"ad.block\"},this.css={ad_main:\"ad.block\"},this.disable_inline_buy=void 0!==this.config.disable_inline_buy&&o.disable_inline_buy===!0,this.proxy_url=null,this.configMap={key:\"key\",proxy_url:\"proxy-url\",content:\"content\",size:\"size\",expandable:\"expandable\",type:\"type\",id:\"id\",template_ad_main:\"template-ad-main\",template_ad_error:\"template-ad-error\",disable_inline_buy:\"disable-inline-buy\",template_product_main:\"template-product-main\",template_product_error:\"template-product-error\"},o.no_init||this.init()}t.util.inherits(o,t._Widget),o.contentTypes={creative:\"creative\",dynamic:\"dynamic\"},o.types={product:\"product\"},o.sizes={billboard:{width:970,height:250},button_2:{width:120,height:60},half_page:{width:300,height:600},leaderboard:{width:728,height:90},medium_rectangle:{width:300,height:250},micro_bar:{width:88,height:31},portrait:{width:300,height:1050},rectangle:{width:180,height:150},super_leaderboard:{width:970,height:90},wide_skyscraper:{width:160,height:600},large_mobile_banner:{width:320,height:100},mobile_leaderboard:{width:320,height:50},small_square:{width:200,height:200},button_1:{width:120,height:90},full_banner:{width:468,height:60},half_banner:{width:234,height:60},large_rectangle:{width:336,height:280},pop_under:{width:720,height:300},three_to_one_rectangle:{width:300,height:100},skyscraper:{width:120,height:600},square:{width:250,height:250},square_button:{width:125,height:125},vertical_banner:{width:120,height:240},vertical_rectangle:{width:240,height:400}};var n=o.prototype;return n.widgetName=\"Ad\",n.load=function(){if(t.util.empty(this.config.content))this.hasCreativeContent()?this.config.content=o.contentTypes.creative:this.config.content=o.contentTypes.dynamic;else if(this.config.content!==o.contentTypes.creative||this.hasCreativeContent()){if(this.config.content===o.contentTypes.dynamic&&this.hasCreativeContent())console.warn(\"[Okanjo.Ad] Ad content is dynamic, but ad placement contains markup. Markup will be clobbered!\");else if(!o.contentTypes.hasOwnProperty(this.config.content))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:\"Invalid ad content: \"+this.config.content}),t.report(this.widgetName,\"Invalid ad content: \"+this.config.content),!1}else console.warn(\"[Okanjo.Ad] Ad content is creative, but ad placement does not contain creative markup. Switching to dynamic!\"),this.config.content=o.contentTypes.dynamic;if(t.util.empty(this.config.type)?this.config.type=o.types.product:o.types.hasOwnProperty(this.config.type)||(console.warn(\"[Okanjo.\"+this.widgetName+\"] Unknown type\",this.config.type,\"given, using type `product` instead\"),this.config.type=o.types.product),!t.util.empty(this.config.size)&&o.sizes.hasOwnProperty(this.config.size)&&this.setElementSize(o.sizes[this.config.size]),this.config.disable_inline_buy&&\"string\"==typeof this.config.disable_inline_buy&&(this.disable_inline_buy=\"true\"===this.config.disable_inline_buy.toLowerCase()),this.config.proxy_url&&(this.proxy_url=this.config.proxy_url,delete this.config.proxy_url),t.metrics.trackEvent(t.metrics.object_type.widget,t.metrics.event_type.impression,{ch:t.metrics.channel.ad_widget,cx:this.config.content,m:t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,{wgid:this.instanceId}))}),this.config.type===o.types.product){if(t.util.empty(this.config.id))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:\"Missing ad product id\"}),t.report(this.widgetName,\"Missing ad product id\"),!1;if(this.config.content==o.contentTypes.dynamic)this.insertProductWidget();else{if(this.config.content!=o.contentTypes.creative)return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:\"Cannot render ad in content: \"+this.config.content}),t.report(this.widgetName,\"Cannot render ad in content: \"+this.config.content),!1;this.insertCreativeWidget()}}return!0},n.render=function(){var e,n=document.createElement(\"div\"),i=[],r=this.config.content==o.contentTypes.dynamic&&!t.util.empty(this.config.size);for(n.innerHTML=t.mvc.render(this.templates.ad_main,this,{config:this.config},{blockClasses:r?[\"okanjo-ad-fit\"]:[]}),e=0;e0)this._waitingOnProductLoad=!1,t.Product.interactTile.call(o[0],e,!0);else if(!this._waitingOnProductLoad){this._waitingOnProductLoad=!0;var n=this,i=setInterval(function(){n._waitingOnProductLoad?n.interact(e):clearInterval(i)},250);console.warn(\"Waiting for Okanjo Product widget to load...\")}},n.insertCreativeWidget=function(){this.insertProductWidget({hidden:!0});var t=this;this.element.addEventListener?this.element.addEventListener(\"click\",function(e){t.interact(e);\n}):this.element.attachEvent(\"onclick\",function(e){t.interact(e)})},n.insertProductWidget=function(e){e=e||{};var o=document.createElement(\"div\");o.className=\"okanjo-ad-dynamic-product\",e.hidden&&(o.style.display=\"none\"),this.element.appendChild(o),this.render();var n={id:this.config.id,key:this.key,mode:t.Product.contentTypes.single,disable_inline_buy:this.disable_inline_buy,disable_popup:this.config.disable_popup===!0,proxy_url:this.proxy_url,expandable:void 0===this.config.expandable||(\"boolean\"==typeof this.config.expandable?this.config.expandable:\"true\"===(\"\"+this.config.expandable).toLowerCase()),metrics_context:t.metrics.channel.ad_widget,metrics_channel_context:this.config.content,template_product_main:\"product.single\"};return this.config.template_product_main&&(n.template_product_main=this.config.template_product_main),this.config.template_product_error&&(n.template_product_error=this.config.template_product_error),this.productWidget=new t.Product(o,n),this.productWidget},n.setElementSize=function(t){this.element.style.display=\"block\",this.element.style.overflow=\"hidden\",this.element.style.width=t.width+\"px\",this.element.style.height=t.height+\"px\"},n.hasCreativeContent=function(){if(this.element.childElementCount&&this.element.childElementCount>0)return!0;for(var t=0;t
',function(e,o){return e=e||{config:{}},o=t.util.clone(o),o.config=e.config,o.size=e.config.size||\"undefined\",o},{css:[\"ad.block\"]}),t.mvc.registerCss(\"okanjo.core\",\"\",{id:\"okanjo-core\"}),t.mvc.registerCss(\"okanjo.modal\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:\" \";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}',{id:\"okanjo-modal\"}),t.mvc.registerTemplate(\"okanjo.error\",\"{{ message }} {{#code}} Reference: {{ code }} {{/code}}\",{css:[\"okanjo.core\"]}),t.mvc.registerCss(\"product.block\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\" \";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-block\"});var e='
';t.mvc.registerTemplate(\"product.block\",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-block\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:[\"product.block\",\"okanjo.modal\"]}),t.mvc.registerCss(\"product.block2\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\" \";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-block2\"});var o='',n=0;t.mvc.registerTemplate(\"product.block2\",o,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-block2\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var i=t.util.deepClone(this.metricBase,{});i.m=t.metrics.truncate(t.metrics.copy(this.config,i.m)),o.metricBaseJSON=JSON.stringify(i),\"leaderboard\"==o.config.size||\"large_mobile_banner\"==o.config.size?(o.config.template_layout=\"list\",o.config.template_cta_style=\"link\"):\"half_page\"!=o.config.size&&\"auto\"!=o.config.size||(o.config.template_layout=\"list\");var r=o.config.template_cta_color;if(r){var a,c=\"okanjo-product-block2-cus-\"+n;a=\".okanjo-product-block2.\"+c+\" .okanjo-product-buy-button { color: \"+r+\";} .okanjo-product-block2.\"+c+\".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid \"+r+\"; } .okanjo-product-block2.\"+c+\".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: \"+r+\"; } \",t.mvc.registerCss(c,a,{id:c}),t.mvc.ensureCss(c)}return o.blockId=n++,o},{css:[\"product.block2\",\"okanjo.modal\"]}),t.mvc.registerCss(\"product.sidebar\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:\" \";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:\"...\"}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-sidebar\"}),t.mvc.registerTemplate(\"product.sidebar\",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-sidebar\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:[\"product.sidebar\",\"okanjo.modal\"]}),t.mvc.registerCss(\"product.single\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:\" \";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:\"...\"}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-single\"}),t.mvc.registerTemplate(\"product.single\",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-single\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:[\"product.single\",\"okanjo.modal\"]})}(okanjo);"],"file":"okanjo-bundle.min.js","sourceRoot":"./"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["okanjo-bundle.js"],"sourcesContent":["/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n!function(t,e){\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?module.exports=e():t.okanjo=e()}(this,function(){var okanjo=function(t){function e(t){for(var e,o,n,i,r={},a=t.split(\"&\"),c=0;ci?(o=decodeURIComponent(e),n=null):(o=decodeURIComponent(e.substring(0,i)),n=decodeURIComponent(e.substring(i+1))),o&&(r[o]=n)}catch(s){console.error(\"[Okanjo] Failed to parse URL parameter:\",e,s)}return r}var o=void 0!==window.pageXOffset,n=\"CSS1Compat\"===(document.compatMode||\"\"),i=window.navigator.userAgent,r=function(){},a=t||{};a.version=\"0.8.4\",a.qwery=r,a.metrics={trackEvent:r,trackPageView:r},a.routes={products:\"/products\",products_id:\"/products/:product_id\",products_sense:\"/products/sense\",metrics:\"/metrics/:object_type/:event_type\"},a.getRoute=function(t,e){if(e)for(var o in e)e.hasOwnProperty(o)&&(t=t.replace(\":\"+o,e[o]+\"\"));return a.config.ads.apiUri+t},a.exec=function(t,e,o){e=e||{},a.JSONP({url:t,data:e,error:function(t){var e={statusCode:500,error:\"Communication Error\",message:t.message||\"JSONP communication failure.\"};a.report(\"core-jsonp\",t.error||new Error(e.message)),o(e,null)},success:function(t){var e,n;t?t.error?e=t:n=t:(e={statusCode:500,error:\"Invalid Response\",message:\"Could not interpret the JSONP response.\"},a.report(\"core-jsonp\",new Error(e.message))),o(e,n)}})},a.report=function(t,e){var o;\"string\"==typeof e?o=new Error(\"[Okanjo\"+(t?\" \"+t:\"\")+\"] \"+e):\"object\"==typeof e&&e instanceof Error&&(o=e),console.error(o)};var c=a.util=a.util||{};/*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n/*! based on shortid https://github.com/dylang/shortid */\nreturn c.trim=function(t){return(t||\"\").replace(/^\\s+|\\s+$/g,\"\")},c.empty=function(t){return null===t||void 0===t||\"string\"==typeof t&&\"\"===c.trim(t)},c.clone=function(t){var e={};t=t||{};for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},c.hash=function(t){var e=0;if(0===t.length)return\"\"+e;for(var o=0;o=0;n--)0===o[n].name.indexOf(\"data-\")&&(e[o[n].name.substr(5)]=o[n].value);return e},c.copyIfSet=function(t,e,o,n,i){function r(n){!e||void 0===e[n]||i.stripEmpty&&c.empty(e[n])||(t[o]=e[n])}if(n=n||o,i=i||{},\"object\"==typeof n&&Array.isArray(n))for(var a=0;ar||a&&i>a;return{vw:c?r:n,vh:c?a:i}},c.getEventPosition=function(t){var e=t.pageX,o=t.pageY,n=document,i=n.body,r=n.documentElement,a=\"scrollLeft\",c=\"scrollTop\";return{ex:void 0===e?t.clientX+i[a]+r[a]:e,ey:void 0===o?t.clientY+i[c]+r[c]:o}},c.ellipsify=function(t,e){for(var o=e||t.parentNode,n=c.getElementSize(o).height,i=void 0!==t.textContent,r=i?t.textContent:t.innerText,a=\"\",s=5e3,l=function(t){return a=t.substr(0,t.length-3)+a,\"...\"};c.getElementSize(t).height>n&&r.length>0&&s-- >0;)r=i?t.textContent:t.innerText,r=r.replace(/[\\s\\S](?:\\.\\.\\.)?$/,l),i?t.textContent=r:t.innerText=r;if(a.length>0){var d=document.createElement(\"span\"),p=document.createElement(\"span\");d.setAttribute(\"class\",\"okanjo-ellipses\"),p.setAttribute(\"class\",\"okanjo-visually-hidden\"),i?(d.textContent=r.substr(0,r.length-3),p.textContent=a):(d.innerText=r.substr(0,r.length-3),p.innerText=a),t.innerHTML=\"\",t.appendChild(d),t.appendChild(p)}},c.detectClasses=function(){var t=[];return-1!=navigator.appVersion.indexOf(\"MSIE 9.\")?t.push(\"lt-ie10\"):-1!=navigator.appVersion.indexOf(\"MSIE 8.\")?t.push(\"lt-ie9\"):-1!=navigator.appVersion.indexOf(\"MSIE 7.\")?t.push(\"lt-ie8\"):-1!=navigator.appVersion.indexOf(\"MSIE 6.\")&&t.push(\"lt-ie7\"),t},c.isFramed=function(){return window.top!==window.self},c.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(i)},c.isAndroid=function(){return/Android/.test(i)},c.isMobile=function(){return c.isiOS()||c.isAndroid()},c.getPageArguments=function(t){var o=e(window.location.search.substring(window.location.search.indexOf(\"?\")+1));if(t){var n=e(window.location.hash.substring(Math.max(window.location.hash.indexOf(\"#\")+1,window.location.hash.indexOf(\"#!\")+2)));for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])}return o},c.deepClone=function(t,e){var o,n=0;if(Array.isArray(t))for(e=e||[];n>4*o&15|r()],e=t0&&(n+=a(e)),n+=a(i)}}(),a}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */\n/*! Okanjo Local Storage Polyfill v1.0.0 | (c) 2013 Okanjo Partners Inc | Based on https://gist.github.com/juliocesar/926500/ddb28fb72903be87cb9044a945c6edbe1aa28b3a */\n/*! Okanjo Cookie Helper v1.0.0 | (c) 2013 Okanjo Partners Inc */\nreturn config.key=config.key||void 0,config.marketplace={uri:\"https://shop.okanjo.com\",apiUri:\"https://api.okanjo.com\",routerUri:\"https://shop.okanjo.com/widgets/router/\",balancedMarketplacePath:\"/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy\",socketIOUri:\"https://mke-rt.okanjo.com:13443\"},config.ads={apiUri:\"https://ads-api.okanjo.com\"},okanjo.configure=function(t){Object.keys(t).every(function(e){return config[e]&&\"object\"==typeof config[e]&&\"object\"==typeof t[e]?Object.keys(t[e]).every(function(o){return config[e][o]=t[e][t[o]],!0}):config[e]=t[e],!0})},function(t,e){var o=t.TemplateEngine=function(e){e=e||{templates:{},css:{}},this._templates=e.templates||{},this._css=e.css||{},this.classDetects=t.util.detectClasses(),this.classDetects=this.classDetects.join(\" \")};o.prototype={constructor:o,registerTemplate:function(e,o,n,i){if(\"object\"==typeof o){if(void 0===o.nodeType)throw new Error(\"Parameter template must be a string or a DOM element\");t.Mustache.parse(o)}else if(\"string\"!=typeof o)throw new Error(\"Parameter template must be a string or a DOM element\");if(3===arguments.length&&\"object\"==typeof n?(i=n,n=void 0):i=i||{},void 0!==n&&\"function\"!=typeof n)throw new Error(\"Parameter viewClosure must be a function\");this._templates[e]={markup:o,options:i,viewClosure:n||null}},registerCss:function(t,e,o){if(o=o||{},\"object\"==typeof e){if(void 0===e.nodeType)throw new Error(\"Parameter css must be a string or a DOM element\")}else if(\"string\"!=typeof e)throw new Error(\"Parameter css must be a string or a DOM element\");this._css[t]={markup:e,options:o}},isTemplateRegistered:function(t){return!!this._templates[t]},isCssRegistered:function(t){return!!this._css[t]},ensureCss:function(e){if(this._css[e]){var o=this._css[e],n=void 0===o.markup.nodeType?o.options.id||\"okanjo-css-\"+e:null;if(n){var i=t.qwery(\"#\"+n);if(0===i.length){var r=t.qwery(\"head\"),a=document.createElement(\"style\");if(a.id=n,a.setAttribute(\"type\",\"text/css\"),a.hasOwnProperty?a.innerHTML=o.markup:a.styleSheet.cssText=o.markup,r.length>0)r[0].appendChild(a);else{var c=t.qwery(\"body\");c.length>0&&c[0].appendChild(a)}}}}else console.warn('[Okanjo.Template] Attempted to add CSS template \"'+e+'\" to the DOM, however it does not appear to be registered?')},render:function(e,o,n,i){i=i||{};var r=this._templates[e],a=n;if(r.viewClosure&&(a=r.viewClosure.call(o,n,i)),a.okanjoConfig=t.config,a.okanjoMetricUrl=t.config.ads.apiUri.replace(/^https?:\\/\\//,\"\"),a.now=function(){return(new Date).getTime()},a.classDetects=this.classDetects,i.blockClasses&&Array.isArray(i.blockClasses)&&(a.classDetects=a.classDetects+=\" \"+i.blockClasses.join(\" \")),i.css!==!1&&r.options.css&&r.options.css.length>0)for(var c=0;ct?\"-\":\"\",r=parseInt(t=Math.abs(+t||0).toFixed(e))+\"\",a=r.length;return a=a>3?a%3:0,i+(a?r.substr(0,a)+n:\"\")+r.substr(a).replace(/(\\d{3})(?=\\d)/g,\"$1\"+n)+(e?o+Math.abs(t-r).toFixed(e).slice(2):\"\")},product:function(e){if(\"object\"==typeof e&&Array.isArray(e)){for(var o=[],n=0;na;a++)t.call(i,o[a])&&c.push(o[a]);return c}}()),Array.isArray||(Array.isArray=function(t){return\"[object Array]\"===Object.prototype.toString.call(t)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var o;if(null==this)throw new TypeError('\"this\" is null or not defined');var n=Object(this),i=n.length>>>0;if(0===i)return-1;var r=+e||0;if(Math.abs(r)===1/0&&(r=0),r>=i)return-1;for(o=Math.max(r>=0?r:i-Math.abs(r),0);i>o;){if(o in n&&n[o]===t)return o;o++}return-1}),Array.prototype.every||(Array.prototype.every=function(t,e){\"use strict\";var o,n;if(null==this)throw new TypeError(\"this is null or not defined\");var i=Object(this),r=i.length>>>0;if(\"function\"!=typeof t)throw new TypeError;for(arguments.length>1&&(o=e),n=0;r>n;){var a;if(n in i){a=i[n];var c=t.call(o,a,n,i);if(!c)return!1}n++}return!0}),Array.prototype.filter||(Array.prototype.filter=function(t){\"use strict\";if(void 0===this||null===this)throw new TypeError;var e=Object(this),o=e.length>>>0;if(\"function\"!=typeof t)throw new TypeError;for(var n=[],i=arguments.length>=2?arguments[1]:void 0,r=0;o>r;r++)if(r in e){var a=e[r];t.call(i,a,r,e)&&n.push(a)}return n}),function(){if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),!Element.prototype.addEventListener){var t=[],e=function(e,o){var n=this,i=function(t){t.target=t.srcElement,t.currentTarget=n,o.handleEvent?o.handleEvent(t):o.call(n,t)};if(\"DOMContentLoaded\"==e){var r=function(t){\"complete\"==document.readyState&&i(t)};if(document.attachEvent(\"onreadystatechange\",r),t.push({object:this,type:e,listener:o,wrapper:r}),\"complete\"==document.readyState){var a=new Event;a.srcElement=window,r(a)}}else this.attachEvent(\"on\"+e,i),t.push({object:this,type:e,listener:o,wrapper:i})},o=function(e,o){for(var n=0;nt?\"0\"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'\"'+t.replace(escapable,function(t){var e=meta[t];return\"string\"==typeof e?e:\"\\\\u\"+(\"0000\"+t.charCodeAt(0).toString(16)).slice(-4)})+'\"':'\"'+t+'\"'}function str(t,e){var o,n,i,r,a,c=gap,s=e[t];switch(s&&\"object\"==typeof s&&\"function\"==typeof s.toJSON&&(s=s.toJSON(t)),\"function\"==typeof rep&&(s=rep.call(e,t,s)),typeof s){case\"string\":return quote(s);case\"number\":return isFinite(s)?String(s):\"null\";case\"boolean\":case\"null\":return String(s);case\"object\":if(!s)return\"null\";if(gap+=indent,a=[],\"[object Array]\"===Object.prototype.toString.apply(s)){for(r=s.length,o=0;r>o;o+=1)a[o]=str(o,s)||\"null\";return i=0===a.length?\"[]\":gap?\"[\\n\"+gap+a.join(\",\\n\"+gap)+\"\\n\"+c+\"]\":\"[\"+a.join(\",\")+\"]\",gap=c,i}if(rep&&\"object\"==typeof rep)for(r=rep.length,o=0;r>o;o+=1)\"string\"==typeof rep[o]&&(n=rep[o],i=str(n,s),i&&a.push(quote(n)+(gap?\": \":\":\")+i));else for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i=str(n,s),i&&a.push(quote(n)+(gap?\": \":\":\")+i));return i=0===a.length?\"{}\":gap?\"{\\n\"+gap+a.join(\",\\n\"+gap)+\"\\n\"+c+\"}\":\"{\"+a.join(\",\")+\"}\",gap=c,i}}\"function\"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){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(){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\"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,o){var n;if(gap=\"\",indent=\"\",\"number\"==typeof o)for(n=0;o>n;n+=1)indent+=\" \";else\"string\"==typeof o&&(indent=o);if(rep=e,e&&\"function\"!=typeof e&&(\"object\"!=typeof e||\"number\"!=typeof e.length))throw new Error(\"JSON.stringify\");return str(\"\",{\"\":t})}),\"function\"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var o,n,i=t[e];if(i&&\"object\"==typeof i)for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n=walk(i,o),void 0!==n?i[o]=n:delete i[o]);return reviver.call(t,e,i)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return\"\\\\u\"+(\"0000\"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\\],:{}\\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,\"\")))return j=eval(\"(\"+text+\")\"),\"function\"==typeof reviver?walk({\"\":j},\"\"):j;throw new SyntaxError(\"JSON.parse\")})}()),function(){/*!\n * @preserve Qwery - A Blazing Fast query selector engine\n * https://github.com/ded/qwery\n * copyright Dustin Diaz 2012\n * MIT License\n */\n!function(t,e,o){\"undefined\"!=typeof module&&module.exports?module.exports=o():\"function\"==typeof define&&define.amd?define(o):e[t]=o()}(\"qwery\",this,function(){function t(){this.c={}}function e(t){return K.g(t)||K.s(t,\"(^|\\\\s+)\"+t+\"(\\\\s+|$)\",1)}function o(t,e){for(var o=0,n=t.length;n>o;o++)e(t[o])}function n(t){for(var e=[],o=0,n=t.length;n>o;++o)m(t[o])?e=e.concat(t[o]):e[e.length]=t[o];return e}function i(t){for(var e=0,o=t.length,n=[];o>e;e++)n[e]=t[e];return n}function r(t){for(;(t=t.previousSibling)&&1!=t[T];);return t}function a(t){return t.match(V)}function c(t,o,n,i,r,a,c,s,d,p,u){var h,f,m,g,k;if(1!==this[T])return!1;if(o&&\"*\"!==o&&this[O]&&this[O].toLowerCase()!==o)return!1;if(n&&(f=n.match(A))&&f[1]!==this.id)return!1;if(n&&(k=n.match(S)))for(h=k.length;h--;)if(!e(k[h].slice(1)).test(this.className))return!1;if(d&&b.pseudos[d]&&!b.pseudos[d](this,u))return!1;if(i&&!c){g=this.attributes;for(m in g)if(Object.prototype.hasOwnProperty.call(g,m)&&(g[m].name||m)==r)return this}return i&&!l(a,Z(this,r)||\"\",c)?!1:this}function s(t){return Y.g(t)||Y.s(t,t.replace(R,\"\\\\$1\"))}function l(t,e,o){switch(t){case\"=\":return e==o;case\"^=\":return e.match(Q.g(\"^=\"+o)||Q.s(\"^=\"+o,\"^\"+s(o),1));case\"$=\":return e.match(Q.g(\"$=\"+o)||Q.s(\"$=\"+o,s(o)+\"$\",1));case\"*=\":return e.match(Q.g(o)||Q.s(o,s(o),1));case\"~=\":return e.match(Q.g(\"~=\"+o)||Q.s(\"~=\"+o,\"(?:^|\\\\s+)\"+s(o)+\"(?:\\\\s+|$)\",1));case\"|=\":return e.match(Q.g(\"|=\"+o)||Q.s(\"|=\"+o,\"^\"+s(o)+\"(-|$)\",1))}return 0}function d(t,e){var n,i,r,s,l,d,p,h=[],f=[],m=e,g=X.g(t)||X.s(t,t.split($)),b=t.match(W);if(!g.length)return h;if(s=(g=g.slice(0)).pop(),g.length&&(r=g[g.length-1].match(I))&&(m=k(e,r[1])),!m)return h;for(d=a(s),l=m!==e&&9!==m[T]&&b&&/^[+~]$/.test(b[b.length-1])?function(t){for(;m=m.nextSibling;)1==m[T]&&(d[1]?d[1]==m[O].toLowerCase():1)&&(t[t.length]=m);return t}([]):m[_](d[1]||\"*\"),n=0,i=l.length;i>n;n++)(p=c.apply(l[n],d))&&(h[h.length]=p);return g.length?(o(h,function(t){u(t,g,b)&&(f[f.length]=t)}),f):h}function p(t,e,o){if(h(e))return t==e;if(m(e))return!!~n(e).indexOf(t);for(var i,r,s=e.split(\",\");e=s.pop();)if(i=X.g(e)||X.s(e,e.split($)),r=e.match(W),i=i.slice(0),c.apply(t,a(i.pop()))&&(!i.length||u(t,i,r,o)))return!0;return!1}function u(t,e,o,n){function i(t,n,s){for(;s=F[o[n]](s,t);)if(h(s)&&c.apply(s,a(e[n]))){if(!n)return s;if(r=i(s,n-1,s))return r}}var r;return(r=i(t,e.length-1,t))&&(!n||G(r,n))}function h(t,e){return t&&\"object\"==typeof t&&(e=t[T])&&(1==e||9==e)}function f(t){var e,o,n=[];t:for(e=0;e~+]/,L=/^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g,D=/[\\s\\>\\+\\~]/,U=/(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/,R=/([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g,q=/^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/,B=/\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/,H=/:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/,J=new RegExp(I.source+\"|\"+P.source+\"|\"+N.source),W=new RegExp(\"(\"+D.source+\")\"+U.source,\"g\"),$=new RegExp(D.source+U.source),V=new RegExp(q.source+\"(\"+B.source+\")?(\"+H.source+\")?\"),F={\" \":function(t){return t&&t!==x&&t.parentNode},\">\":function(t,e){return t&&t.parentNode==e.parentNode&&t.parentNode},\"~\":function(t){return t&&t.previousSibling},\"+\":function(t,e,o,n){return t?(o=r(t))&&(n=r(e))&&o==n&&o:!1}};t.prototype={g:function(t){return this.c[t]||void 0},s:function(t,e,o){return e=o?new RegExp(e):e,this.c[t]=e}};var K=new t,Y=new t,Q=new t,X=new t,G=\"compareDocumentPosition\"in x?function(t,e){return 16==(16&e.compareDocumentPosition(t))}:\"contains\"in x?function(t,e){return e=9===e[T]||e==window?x:e,e!==t&&e.contains(t)}:function(t,e){for(;t=t.parentNode;)if(t===e)return 1;return 0},Z=function(){var t=v.createElement(\"p\");return(t.innerHTML='x')&&\"#x\"!=t.firstChild.getAttribute(\"href\")?function(t,e){return\"class\"===e?t.className:\"href\"===e||\"src\"===e?t.getAttribute(e,2):t.getAttribute(e)}:function(t,e){return t.getAttribute(e)}}(),tt=!!v[w],et=v.querySelector&&v[C],ot=function(t,e){var n,r,a=[];try{return 9!==e[T]&&M.test(t)?(o(n=t.split(\",\"),y(e,function(t,e){r=t[C](e),1==r.length?a[a.length]=r.item(0):r.length&&(a=a.concat(i(r)))})),n.length>1&&a.length>1?f(a):a):i(e[C](t))}catch(c){}return nt(t,e)},nt=function(t,n){var i,r,a,c,s,l,p=[];if(t=t.replace(L,\"$1\"),r=t.match(z)){for(s=e(r[2]),i=n[_](r[1]||\"*\"),a=0,c=i.length;c>a;a++)s.test(i[a].className)&&(p[p.length]=i[a]);return p}return o(l=t.split(\",\"),y(n,function(t,e,o){for(s=d(e,t),a=0,c=s.length;c>a;a++)(9===t[T]||o||G(s[a],n))&&(p[p.length]=s[a])})),l.length>1&&p.length>1?f(p):p},it=function(t){\"undefined\"!=typeof t[E]&&(j=t[E]&&et?ot:nt)};return it({useNativeQSA:!0}),b.configure=it,b.uniq=f,b.is=p,b.pseudos={},b}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\nfunction(t,e){\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?module.exports=e():t.onDomReady=e()}(this,function(){\"use strict\";function t(e){if(!v){if(!a.body)return n(t);for(v=!0;e=x.shift();)n(e)}}function e(e){(y||e.type===s||a[u]===p)&&(o(),t())}function o(){y?(a[b](g,e,l),r[b](s,e,l)):(a[f](k,e),r[f](d,e))}function n(t,e){setTimeout(t,+e>=0?e:1)}function i(t){v?n(t):x.push(t)}var r=window,a=r.document,c=a.documentElement,s=\"load\",l=!1,d=\"on\"+s,p=\"complete\",u=\"readyState\",h=\"attachEvent\",f=\"detachEvent\",m=\"addEventListener\",g=\"DOMContentLoaded\",k=\"onreadystatechange\",b=\"removeEventListener\",y=m in a,j=l,v=l,x=[];if(a[u]===p)n(t);else if(y)a[m](g,e,l),r[m](s,e,l);else{a[h](k,e),r[h](d,e);try{j=null==r.frameElement&&c}catch(w){}j&&j.doScroll&&!function _(){if(!v){try{j.doScroll(\"left\")}catch(e){return n(_,50)}o(),t()}}()}return i.version=\"1.4.0\",i.isReady=function(){return v},i}),/*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\nfunction(t,e){\"object\"==typeof exports&&exports?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e(t.Mustache={})}(this,function(t){function e(t){return\"function\"==typeof t}function o(t){return t.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}function n(t,e){return f.call(t,e)}function i(t){return!n(m,t)}function r(t){return String(t).replace(/[&<>\"'\\/]/g,function(t){return g[t]})}function a(e,n){function r(){if(x&&!w)for(;g.length;)delete m[g.pop()];else g=[];x=!1,w=!1}function a(t){if(\"string\"==typeof t&&(t=t.split(b,2)),!h(t)||2!==t.length)throw new Error(\"Invalid tags: \"+t);d=new RegExp(o(t[0])+\"\\\\s*\"),p=new RegExp(\"\\\\s*\"+o(t[1])),u=new RegExp(\"\\\\s*\"+o(\"}\"+t[1]))}if(!e)return[];var d,p,u,f=[],m=[],g=[],x=!1,w=!1;a(n||t.tags);for(var _,C,E,O,T,A,S=new l(e);!S.eos();){if(_=S.pos,E=S.scanUntil(d))for(var I=0,N=E.length;N>I;++I)O=E.charAt(I),i(O)?g.push(m.length):w=!0,m.push([\"text\",O,_,_+1]),_+=1,\"\\n\"===O&&r();if(!S.scan(d))break;if(x=!0,C=S.scan(v)||\"name\",S.scan(k),\"=\"===C?(E=S.scanUntil(y),S.scan(y),S.scanUntil(p)):\"{\"===C?(E=S.scanUntil(u),S.scan(j),S.scanUntil(p),C=\"&\"):E=S.scanUntil(p),!S.scan(p))throw new Error(\"Unclosed tag at \"+S.pos);if(T=[C,E,_,S.pos],m.push(T),\"#\"===C||\"^\"===C)f.push(T);else if(\"/\"===C){if(A=f.pop(),!A)throw new Error('Unopened section \"'+E+'\" at '+_);if(A[1]!==E)throw new Error('Unclosed section \"'+A[1]+'\" at '+_)}else\"name\"===C||\"{\"===C||\"&\"===C?w=!0:\"=\"===C&&a(E)}if(A=f.pop())throw new Error('Unclosed section \"'+A[1]+'\" at '+S.pos);return s(c(m))}function c(t){for(var e,o,n=[],i=0,r=t.length;r>i;++i)e=t[i],e&&(\"text\"===e[0]&&o&&\"text\"===o[0]?(o[1]+=e[1],o[3]=e[3]):(n.push(e),o=e));return n}function s(t){for(var e,o,n=[],i=n,r=[],a=0,c=t.length;c>a;++a)switch(e=t[a],e[0]){case\"#\":case\"^\":i.push(e),r.push(e),i=e[4]=[];break;case\"/\":o=r.pop(),o[5]=e[2],i=r.length>0?r[r.length-1][4]:n;break;default:i.push(e)}return n}function l(t){this.string=t,this.tail=t,this.pos=0}function d(t,e){this.view=null==t?{}:t,this.cache={\".\":this.view},this.parent=e}function p(){this.cache={}}var u=Object.prototype.toString,h=Array.isArray||function(t){return\"[object Array]\"===u.call(t)},f=RegExp.prototype.test,m=/\\S/,g={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"/\":\"/\"},k=/\\s*/,b=/\\s+/,y=/\\s*=/,j=/\\s*\\}/,v=/#|\\^|\\/|>|\\{|&|=|!/;l.prototype.eos=function(){return\"\"===this.tail},l.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return\"\";var o=e[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},l.prototype.scanUntil=function(t){var e,o=this.tail.search(t);switch(o){case-1:e=this.tail,this.tail=\"\";break;case 0:e=\"\";break;default:e=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=e.length,e},d.prototype.push=function(t){return new d(t,this)},d.prototype.lookup=function(t){var o,n=this.cache;if(t in n)o=n[t];else{for(var i,r,a=this;a;){if(t.indexOf(\".\")>0)for(o=a.view,i=t.split(\".\"),r=0;null!=o&&rs;++s)a=void 0,i=t[s],r=i[0],\"#\"===r?a=this._renderSection(i,e,o,n):\"^\"===r?a=this._renderInverted(i,e,o,n):\">\"===r?a=this._renderPartial(i,e,o,n):\"&\"===r?a=this._unescapedValue(i,e):\"name\"===r?a=this._escapedValue(i,e):\"text\"===r&&(a=this._rawValue(i)),void 0!==a&&(c+=a);return c},p.prototype._renderSection=function(t,o,n,i){function r(t){return a.render(t,o,n)}var a=this,c=\"\",s=o.lookup(t[1]);if(s){if(h(s))for(var l=0,d=s.length;d>l;++l)c+=this.renderTokens(t[4],o.push(s[l]),n,i);else if(\"object\"==typeof s||\"string\"==typeof s)c+=this.renderTokens(t[4],o.push(s),n,i);else if(e(s)){if(\"string\"!=typeof i)throw new Error(\"Cannot use higher-order sections without the original template\");s=s.call(o.view,i.slice(t[3],t[5]),r),null!=s&&(c+=s)}else c+=this.renderTokens(t[4],o,n,i);return c}},p.prototype._renderInverted=function(t,e,o,n){var i=e.lookup(t[1]);return!i||h(i)&&0===i.length?this.renderTokens(t[4],e,o,n):void 0},p.prototype._renderPartial=function(t,o,n){if(n){var i=e(n)?n(t[1]):n[t[1]];return null!=i?this.renderTokens(this.parse(i),o,n,i):void 0}},p.prototype._unescapedValue=function(t,e){var o=e.lookup(t[1]);return null!=o?o:void 0},p.prototype._escapedValue=function(e,o){var n=o.lookup(e[1]);return null!=n?t.escape(n):void 0},p.prototype._rawValue=function(t){return t[1]},t.name=\"mustache.js\",t.version=\"1.1.0\",t.tags=[\"{{\",\"}}\"];var x=new p;t.clearCache=function(){return x.clearCache()},t.parse=function(t,e){return x.parse(t,e)},t.render=function(t,e,o){return x.render(t,e,o)},t.to_html=function(o,n,i,r){var a=t.render(o,n,i);return e(r)?void r(a):a},t.escape=r,t.Scanner=l,t.Context=d,t.Writer=p})}.apply(okanjo),function(t,e){function o(){this.default_channel=this.channel.external,this._queue=[],this.pageId=t.util.shortid();var e=t.util.getPageArguments(!0),o=e[this.msid_key],n=t.Cookie.get(this.msid_key),i=e[this.source_cx],r=e[this.source_ch];o&&n&&o!=n&&(this.trackEvent(this.object_type.metric_session,this.event_type.correlation,{id:o+\"_\"+n,ch:this.default_channel,_noProcess:!0}),t.Cookie.set(this.msid_key,o,this.msid_ttl)),this.sid=o||n||null,this.sourceCh=r||null,this.sourceCx=i||null,this._lastKey=void 0}o.prototype={msid_key:\"ok_msid\",source_cx:\"ok_cx\",source_ch:\"ok_ch\",msid_ttl:1460,strip_meta:[\"key\",\"callback\",\"metrics_channel_context\",\"metrics_context\",\"mode\"],constructor:o,event_type:{view:\"vw\",impression:\"imp\",interaction:\"int\",correlation:\"cor\"},action:{click:\"click\",inline_click:\"inline_click\"},object_type:{thirdparty_ad:\"ta\",cart:\"ct\",page:\"pg\",widget:\"wg\",product:\"pr\",store:\"st\",cause:\"ca\",marketplace:\"mp\",order:\"or\",order_item:\"oi\",user:\"ur\",metric_session:\"mt\"},channel:{product_widget:\"pw\",ad_widget:\"aw\",store_widget:\"sw\",marketplace:\"mp\",external:\"ex\"},environment:{live:\"live\",testing:\"testing\"},trackEvent:function(e,o,n,i){n=n||{},n.object_type=e,n.event_type=o,this._lastKey=n.key||n.key||n.m&&n.m.key||t.key||this._lastKey||void 0,this.push(n,i)},trackPageView:function(t,o){t=t||{},t.id=t.id||e.location.href,t.ch=t.ch||this.default_channel,this.trackEvent(this.object_type.page,this.event_type.view,t,o)},track:function(e,o){if(!e||\"object\"!=typeof e)return void console.warn(\"[Okanjo.Metrics] event object data required\");if(!e.object_type)return void console.warn(\"[Okanjo.Metrics] object_type required\");if(!e.event_type)return void console.warn(\"[Okanjo.Metrics] event_type required\");var n=e.object_type,i=e.event_type;delete e.object_type,delete e.event_type,this.normalizeEventData(e),t.exec(t.getRoute(t.routes.metrics,{object_type:n,event_type:i}),e,function(t,e){t&&console.warn(\"[Okanjo.Metrics] Reporting failed\",t,e),o&&o(t,e)})},normalizeEventData:function(e){if(e.key=e.key||e.m&&e.m.key||t.key||this._lastKey||void 0,this.sid&&(e.sid=this.sid),e.m){var o={};for(var n in e.m)e.m.hasOwnProperty(n)&&this.strip_meta.indexOf(n)<0&&(o[n]=e.m[n]);e.m=o}else e.m={};(this.sourceCh||this.sourceCx)&&(this.sourceCh&&(e.m.ref_ch=this.sourceCh),this.sourceCx&&(e.m.ref_cx=this.sourceCx)),e.m.pgid=this.pageId,e.m.ok_ver=t.version,document.referrer&&(e.ref=document.referrer)},updateSid:function(e){!this.sid&&e&&(this.sid=e,t.Cookie.set(this.msid_key,e,this.msid_ttl))},push:function(t,e){this._queue.push({event:t,callback:e}),t._noProcess?delete t._noProcess:this._processQueue()},_processQueue:function(){if(!this._processTimeout&&this._queue.length>0){var t=this;this._processTimeout=setTimeout(function(){var e=t._queue.shift();void 0===e?t._processTimeout=null:t.track(e.event,function(o,n){n&&n.data&&n.data.sid&&t.updateSid(n.data.sid),t._processTimeout=null,t._processQueue(),e.callback&&e.callback(o,n)})},0)}},includeElementInfo:function(e,o){var n=t.util.getPageSize(),i=t.util.getElementPosition(e);return o=o||{},o.pw=n.w,o.ph=n.h,o.x1=i.x1,o.y1=i.y1,o.x2=i.x2,o.y2=i.y2,o},includeViewportInfo:function(e){var o=t.util.getViewportSize(),n=t.util.getScrollPosition();return e=e||{},e.vx1=n.x,e.vy1=n.y,e.vx2=e.vx1+o.vw,e.vy2=e.vy1+o.vh,e},includeEventInfo:function(e,o){var n=t.util.getEventPosition(e);return o.ex=n.ex,o.ey=n.ey,o},copy:function(e,o){return t.util.flatten(t.util.deepClone(e,o))},truncate:function(t){for(var e in t)t.hasOwnProperty(e)&&\"string\"==typeof t[e]&&(t[e]=t[e].substr(0,255));return t}},t.metrics=new o}(okanjo,this),function(t,e){t.metrics.trackPageView({_noProcess:!0}),setTimeout(function(){t.metrics._processQueue()},1e3)}(okanjo||this),function(t,e){var o=function(t,e){return t.indexOf(e)},n=function(){this.events={}};return n.prototype.on=function(t,e){\"object\"!=typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e)},n.prototype.removeListener=function(t,e){var n;\"object\"==typeof this.events[t]&&(n=o(this.events[t],e),n>-1&&this.events[t].splice(n,1))},n.prototype.emit=function(t){var e,o,n,i=[].slice.call(arguments,1);if(\"object\"==typeof this.events[t])for(o=this.events[t].slice(),n=o.length,e=0;n>e;e++)o[e].apply(this,i)},n.prototype.once=function(t,e){this.on(t,function o(){this.removeListener(t,o),e.apply(this,arguments)})},t._EventEmitter=n,n}(okanjo,this),function(t,e){var o=t.Cache,n=t._Widget=function(e,o){if(t._EventEmitter.call(this),!e||\"object\"!=typeof e||void 0===e.nodeType)throw new Error(\"Invalid element - must be a valid DOM element\");if(\"undefined\"!=typeof o&&\"object\"!=typeof o)throw new Error(\"Invalid configuration, must be an object or nothing at all, got: \"+typeof o);o=o||{},this.instanceId=t.util.shortid(),this.element=e,this.config=o||{},this.configMap={},this.templates={error:\"okanjo.error\"},this.css={}};t.util.inherits(n,t._EventEmitter);var i=n.prototype;return i.widgetName=\"BaseWidget\",i.config=null,i.use_cache=!1,i.cache_key_prefix=\"ok_widget_\",i.cache_ttl=6e4,i.cacheKeyAttributes=\"id\".split(\",\"),i.init=function(){this.parseConfiguration(),this.processTemplateOverrides(),this.ensureTemplates(),this.findWidgetKey()&&this.load()&&this.autoCleanCache()},i.findWidgetKey=function(){return t.util.empty(this.config.key)?t.util.empty(t.key)?t.util.empty(this.key)?(this.config.key=this.key,!0):(this.element.innerHTML=t.mvc.render(this.templates.error,this,{message:\"Missing Okanjo key.\"}),t.report(this.widgetName,\"Missing key. Define one using okanjo.configure or pass the key parameter as an option in the \"+this.widgetName+\" constructor\"),!1):(this.key=t.key,this.config.key=this.key,!0):(this.key=this.config.key,this.config.key=this.key,!0)},i.processTemplateOverrides=function(){var t;for(var e in this.config)this.config.hasOwnProperty(e)&&(t=e.match(/^template_(.+)$/),null!==t&&this.templates.hasOwnProperty(t[1])?this.templates[t[1]]=this.config[e]:(t=e.match(/^css_(.+)$/),null!==t&&this.css.hasOwnProperty(t[1])&&(this.css[t[1]]=this.config[e])))},i.ensureTemplates=function(){var e,o=this.templates,n=this.css;for(e in o)if(o.hasOwnProperty(e)&&!t.mvc.isTemplateRegistered(o[e]))throw new Error(\"[Okanjo.\"+this.widgetName+\"] Missing template: \"+o[e]+\". Did you forget to include the template?\");for(e in n)if(n.hasOwnProperty(e)&&!t.mvc.isCssRegistered(n[e]))throw new Error(\"[Okanjo.\"+this.widgetName+\"] Missing css block: \"+n[e]+\". Did you forget to include the css template?\")},i.parseConfiguration=function(){var e=t.util.data(this.element);t.util.copyIfSetMap(this.config,e,this.configMap,{stripEmpty:!0})},i.load=function(){return!0},i.autoCleanCache=function(){if(this.use_cache){var t=this;setTimeout(function(){t.cleanCache()},2e3)}},i.getCurrentPageUrl=function(){var t=e.location.href,o=[t.indexOf(\"?\"),t.indexOf(\"#\")].filter(function(t){return t>=0}),n=o.length>0?Math.min.apply(null,o):-1;return n>0?t.substr(0,n):t},i.getCacheKey=function(){for(var o=[e.location.host+e.location.pathname],n=this.cacheKeyAttributes,i=0;i=0&&n.push(a)}for(r=0;rt;t++)setTimeout(j,1e3*t+10)}),g(e,\"resize\",function(){setTimeout(j,100)}),g(i,\"click\",x),g(r,\"click\",function(t){t.preventDefault(),t.stopPropagation()}),g(l,\"click\",function(t){t.preventDefault(),t.stopPropagation(),x()})},g=function(t,e,o){t.addEventListener?t.addEventListener(e,o,!1):t.attachEvent(\"on\"+e,o)},k=function(t,e){t.className+=\" \"+e},b=function(t,e){t.className=t.className.replace(new RegExp(\" *?\"+e),\"\")},y=function(){return e.innerHeight||document.documentElement.clientHeight},j=function(){u=t.util.getScrollPosition().y,r.style.height=y()-80+\"px\"},v=function(){u=document.body.scrollTop,b(i,\"okanjo-modal-hidden\"),k(i,\"okanjo-modal-fade-out\"),j(),k(o,\"okanjo-modal-active\"),h||k(o,\"okanjo-modal-margin-fix\"),setTimeout(function(){b(i,\"okanjo-modal-fade-out\")},10)},x=function(){k(i,\"okanjo-modal-fade-out\"),setTimeout(function(){b(i,\"okanjo-modal-fade-out\"),k(i,\"okanjo-modal-hidden\"),b(o,\"okanjo-modal-active\"),h||b(o,\"okanjo-modal-margin-fix\")},210)},w=function(t){s.innerHTML=\"\",\"string\"==typeof t?s.innerHTML=t:s.appendChild(t)};return t.modal={show:function(t){p||(p=!0,f(),m()),w(t),v()},hide:function(){x()}},t.modal}(okanjo,this),function(t,e){function o(e,n){t._Widget.call(this,e,n),this.items=[],this.config=n=n||{mode:o.contentTypes.browse,use_cache:!1,cache_ttl:6e4},this.config.nag=void 0===n.nag?!0:n.nag===!0,this.config.use_cache=void 0===n.use_cache?!1:n.use_cache===!0,this.config.cache_ttl=void 0===n.cache_ttl?6e4:n.cache_ttl,this.disable_popup=n.disable_popup===!0,this.use_cache=this.config.use_cache,this.cache_ttl=this.config.cache_ttl,this.proxy_url=null,this.config.metrics_context=void 0===n.metrics_context?\"pw\":n.metrics_context,this.config.metrics_channel_context=void 0===n.metrics_channel_context?null:n.metrics_channel_context,this.disable_inline_buy=void 0===this.config.disable_inline_buy?!1:n.disable_inline_buy===!0,this.cache_key_prefix=\"ok_product_block_\",this.templates={product_error:\"okanjo.error\",product_main:\"product.block\"},this.css={product_main:\"product.block\",product_modal:\"okanjo.modal\"},this.configMap={key:\"key\",mode:\"mode\",disable_inline_buy:\"disable-inline-buy\",proxy_url:\"proxy-url\",url:\"url\",selectors:\"selectors\",url_category:\"url-category\",id:\"id\",q:\"q\",marketplace_status:[\"marketplace-status\"],marketplace_id:[\"marketplace-id\"],pools:\"pools\",external_id:\"external-id\",sku:\"sku\",sold_by:\"sold-by\",external_store_id:\"external-store-id\",min_price:\"min-price\",max_price:\"max-price\",condition:\"condition\",manufacturer:\"manufacturer\",upc:\"upc\",isbn:\"isbn\",tags:\"tags\",category:\"category\",min_donation_percent:\"min-donation-percent\",max_donation_percent:\"max-donation-percent\",donation_to:\"donation-to\",suboptimal:\"suboptimal\",backfill:\"backfill\",skip:[\"skip\",\"page-start\"],take:[\"take\",\"page-size\"],expandable:\"expandable\",template_product_main:\"template-product-main\",template_product_error:\"template-product-error\",size:\"size\",template_layout:\"template-layout\",template_theme:\"template-theme\",template_cta_style:\"template-cta-style\",template_cta_text:\"template-cta-text\",template_cta_color:\"template-cta-color\"},n.no_init||this.init()}function n(e,o,n,i){var r,a,c=[],s=o.indexOf(\"?\")<0?\"?\":\"&\";for(r in i)i.hasOwnProperty(r)&&c.push(r+\"=\"+encodeURIComponent(i[r]));return t.metrics.normalizeEventData(e),e.n=(new Date).getTime(),a=o+(c.length>0?s+c.join(\"&\"):\"\"),n?e.u=n+encodeURIComponent(a):e.u=a,t.JSONP.makeUrl({url:t.getRoute(t.routes.metrics,{object_type:t.metrics.object_type.product,event_type:t.metrics.event_type.interaction}),data:e})}t.util.inherits(o,t._Widget),o.contentTypes={browse:\"browse\",sense:\"sense\",single:\"single\"};var i=o.prototype;return i.widgetName=\"Product\",i.cacheKeyAttributes=\"mode,url,selectors,text,id,q,marketplace_status,marketplace_id,external_id,sku,sold_by,min_price,max_price,condition,manufacturer,upc,isbn,tags,category,min_donation_percent,max_donation_percent,donation_to,suboptimal,skip,take\".split(\",\"),i.load=function(){if(this.config.id||this.config.mode==o.contentTypes.single?t.util.empty(this.config.id)?this.config.mode=o.contentTypes.browse:this.config.mode=o.contentTypes.single:this.config.url||this.config.text||this.config.mode==o.contentTypes.sense?(t.util.empty(this.config.url)&&t.util.empty(this.config.text)&&(this.config.url=this.getCurrentPageUrl(),this.config.nag&&console.info(\"[Okanjo.\"+this.widgetName+\"] No canonical url given for ProductSense. We recommend using a canonical url to ensure page visibility by Okanjo. Using derived url:\",this.config.url)),this.config.mode=o.contentTypes.sense,this.config.take=this.config.take||5):this.config.mode=t.util.empty(this.config.mode)?o.contentTypes.browse:this.config.mode,function(t){for(var e=0;ee,n.articleId&&(n.metricBase.m.aid=n.articleId),n.metricBase.m.pten=n.placementTest&&n.placementTest.enabled?\"1\":\"0\",n.placementTest&&(n.placementTest.id&&(n.metricBase.m.ptid=n.placementTest.id),n.placementTest.seed&&(n.metricBase.m.ptseed=n.placementTest.seed)),n.emit(\"data\",r),n.showProducts(n.items),!n.shorted&&n.use_cache&&(!n.placementTest||n.placementTest&&!n.placementTest.enabled)){var a=n.getCacheKey();n.saveInCache(a,n.items)}n.emit(\"load\",{fromCache:!1})}})},i.executeSearch=function(e){var n=t.util.deepClone(this.config);this.config.mode===o.contentTypes.sense?t.exec(t.getRoute(t.routes.products_sense),n,e):this.config.mode===o.contentTypes.single?t.exec(t.getRoute(t.routes.products_id,{product_id:this.config.id}),n,function(t,o){!t&&o&&o.data&&(o.data=[o.data]),e&&e(t,o)}):t.exec(t.getRoute(t.routes.products),n,e)},i.handleInlineBuyOption=function(){if(this.disable_inline_buy)for(var t=0;t=0&&(_=w);if(_){j.className+=\" okanjo-ad-in-unit\",j.setAttribute(\"height\",\"100%\"),j.setAttribute(\"width\",\"100%\"),_.appendChild(j),f=!0;var C=t.util.getElementSize(_);h.expandable=0,h.frame_height=C.height,h.frame_width=C.width,h.ad_size=_.getAttribute(\"data-size\")||\"undefined\"}}c.ea=t.metrics.action.inline_click,c.m.expandable=1===h.expandable?\"true\":\"false\",r=n(c,y,u,h),j.src=r,f||t.modal.show(j)}else i?(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}),this.click()):(c.ea=t.metrics.action.click,this.href=n(c,b,u,{}))},i.bindEvents=function(){var e=this;t.qwery(\"a\",this.element).every(function(n){var i=n.getAttribute(\"data-id\");if(i&&(n.addEventListener?n.addEventListener(\"click\",o.interactTile):n.attachEvent(\"onclick\",function(t){o.interactTile.call(n,t)}),e.config.metrics_context==t.metrics.channel.product_widget)){var r=n.getAttribute(\"data-backfill\"),a=t.util.deepClone(e.metricBase,{});a.id=n.getAttribute(\"data-id\"),a.m.bf=\"true\"===r?1:0,a.m=t.metrics.truncate(t.metrics.copy(e.config,t.metrics.includeElementInfo(n.parentNode,a.m))),t.metrics.trackEvent(t.metrics.object_type.product,t.metrics.event_type.impression,a)}return!0}),t.qwery(\".okanjo-product-title\",this.element).every(function(e){return t.util.ellipsify(e),!0})},i.guessAdSize=function(){for(var e,o,n,i,r=[],a=0,c=\"728x90|300x250|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60\".split(\"|\");a';n.className=\"okanjo-adx-container\",n.appendChild(i),this.element.innerHTML=\"\",this.element.appendChild(n),i.contentWindow.document.open(),i.contentWindow.document.write(s),i.contentWindow.document.close();for(var l in r)r.hasOwnProperty(l)&&i.setAttribute(l,r[l]);i.className=\"okanjo-ad-backfill\",i.setAttribute(\"width\",o.width+\"px\"),i.setAttribute(\"height\",o.height+\"px\");var d=t.util.deepClone(this.metricBase,{});d.m.ta_w=o.width,d.m.ta_h=o.height,d.m.ta_pubid=a,d.m.ta_slotid=c,d.m=t.metrics.truncate(t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,d.m))),t.metrics.trackEvent(t.metrics.object_type.thirdparty_ad,t.metrics.event_type.impression,d)},t.Product=o,o}(okanjo,this),function(t,e){function o(e,o){t._Widget.call(this,e,o),this.config=o=o||{},this.templates={ad_error:\"okanjo.error\",ad_main:\"ad.block\"},this.css={ad_main:\"ad.block\"},this.disable_inline_buy=void 0===this.config.disable_inline_buy?!1:o.disable_inline_buy===!0,this.proxy_url=null,this.configMap={key:\"key\",proxy_url:\"proxy-url\",content:\"content\",size:\"size\",expandable:\"expandable\",type:\"type\",id:\"id\",template_ad_main:\"template-ad-main\",template_ad_error:\"template-ad-error\",disable_inline_buy:\"disable-inline-buy\",template_product_main:\"template-product-main\",template_product_error:\"template-product-error\"},o.no_init||this.init()}t.util.inherits(o,t._Widget),o.contentTypes={creative:\"creative\",dynamic:\"dynamic\"},o.types={product:\"product\"},o.sizes={billboard:{width:970,height:250},button_2:{width:120,height:60},half_page:{width:300,height:600},leaderboard:{width:728,height:90},medium_rectangle:{width:300,height:250},micro_bar:{width:88,height:31},portrait:{width:300,height:1050},rectangle:{width:180,height:150},super_leaderboard:{width:970,height:90},wide_skyscraper:{width:160,height:600},large_mobile_banner:{width:320,height:100},mobile_leaderboard:{width:320,height:50},small_square:{width:200,height:200},button_1:{width:120,height:90},full_banner:{width:468,height:60},half_banner:{width:234,height:60},large_rectangle:{width:336,height:280},pop_under:{width:720,height:300},three_to_one_rectangle:{width:300,height:100},skyscraper:{width:120,height:600},square:{width:250,height:250},square_button:{width:125,height:125},vertical_banner:{width:120,height:240},vertical_rectangle:{width:240,height:400}};var n=o.prototype;return n.widgetName=\"Ad\",n.load=function(){if(t.util.empty(this.config.content))this.hasCreativeContent()?this.config.content=o.contentTypes.creative:this.config.content=o.contentTypes.dynamic;else if(this.config.content!==o.contentTypes.creative||this.hasCreativeContent()){if(this.config.content===o.contentTypes.dynamic&&this.hasCreativeContent())console.warn(\"[Okanjo.Ad] Ad content is dynamic, but ad placement contains markup. Markup will be clobbered!\");else if(!o.contentTypes.hasOwnProperty(this.config.content))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:\"Invalid ad content: \"+this.config.content}),t.report(this.widgetName,\"Invalid ad content: \"+this.config.content),!1}else console.warn(\"[Okanjo.Ad] Ad content is creative, but ad placement does not contain creative markup. Switching to dynamic!\"),this.config.content=o.contentTypes.dynamic;if(t.util.empty(this.config.type)?this.config.type=o.types.product:o.types.hasOwnProperty(this.config.type)||(console.warn(\"[Okanjo.\"+this.widgetName+\"] Unknown type\",this.config.type,\"given, using type `product` instead\"),this.config.type=o.types.product),!t.util.empty(this.config.size)&&o.sizes.hasOwnProperty(this.config.size)&&this.setElementSize(o.sizes[this.config.size]),this.config.disable_inline_buy&&\"string\"==typeof this.config.disable_inline_buy&&(this.disable_inline_buy=\"true\"===this.config.disable_inline_buy.toLowerCase()),this.config.proxy_url&&(this.proxy_url=this.config.proxy_url,delete this.config.proxy_url),t.metrics.trackEvent(t.metrics.object_type.widget,t.metrics.event_type.impression,{ch:t.metrics.channel.ad_widget,cx:this.config.content,m:t.metrics.copy(this.config,t.metrics.includeElementInfo(this.element,{wgid:this.instanceId}))}),this.config.type===o.types.product){if(t.util.empty(this.config.id))return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:\"Missing ad product id\"}),t.report(this.widgetName,\"Missing ad product id\"),!1;if(this.config.content==o.contentTypes.dynamic)this.insertProductWidget();else{if(this.config.content!=o.contentTypes.creative)return this.element.innerHTML=t.mvc.render(this.templates.ad_error,this,{message:\"Cannot render ad in content: \"+this.config.content}),t.report(this.widgetName,\"Cannot render ad in content: \"+this.config.content),!1;this.insertCreativeWidget()}}return!0},n.render=function(){var e,n=document.createElement(\"div\"),i=[],r=this.config.content==o.contentTypes.dynamic&&!t.util.empty(this.config.size);for(n.innerHTML=t.mvc.render(this.templates.ad_main,this,{config:this.config},{blockClasses:r?[\"okanjo-ad-fit\"]:[]}),e=0;e0)this._waitingOnProductLoad=!1,t.Product.interactTile.call(o[0],e,!0);else if(!this._waitingOnProductLoad){this._waitingOnProductLoad=!0;var n=this,i=setInterval(function(){n._waitingOnProductLoad?n.interact(e):clearInterval(i)},250);console.warn(\"Waiting for Okanjo Product widget to load...\")}},n.insertCreativeWidget=function(){this.insertProductWidget({hidden:!0});\nvar t=this;this.element.addEventListener?this.element.addEventListener(\"click\",function(e){t.interact(e)}):this.element.attachEvent(\"onclick\",function(e){t.interact(e)})},n.insertProductWidget=function(e){e=e||{};var o=document.createElement(\"div\");o.className=\"okanjo-ad-dynamic-product\",e.hidden&&(o.style.display=\"none\"),this.element.appendChild(o),this.render();var n={id:this.config.id,key:this.key,mode:t.Product.contentTypes.single,disable_inline_buy:this.disable_inline_buy,disable_popup:this.config.disable_popup===!0,proxy_url:this.proxy_url,expandable:void 0===this.config.expandable||(\"boolean\"==typeof this.config.expandable?this.config.expandable:\"true\"===(\"\"+this.config.expandable).toLowerCase()),metrics_context:t.metrics.channel.ad_widget,metrics_channel_context:this.config.content,template_product_main:\"product.single\"};return this.config.template_product_main&&(n.template_product_main=this.config.template_product_main),this.config.template_product_error&&(n.template_product_error=this.config.template_product_error),this.productWidget=new t.Product(o,n),this.productWidget},n.setElementSize=function(t){this.element.style.display=\"block\",this.element.style.overflow=\"hidden\",this.element.style.width=t.width+\"px\",this.element.style.height=t.height+\"px\"},n.hasCreativeContent=function(){if(this.element.childElementCount&&this.element.childElementCount>0)return!0;for(var t=0;t
',function(e,o){return e=e||{config:{}},o=t.util.clone(o),o.config=e.config,o.size=e.config.size||\"undefined\",o},{css:[\"ad.block\"]}),t.mvc.registerCss(\"okanjo.core\",\"\",{id:\"okanjo-core\"}),t.mvc.registerCss(\"okanjo.modal\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:\" \";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}',{id:\"okanjo-modal\"}),t.mvc.registerTemplate(\"okanjo.error\",\"{{ message }} {{#code}} Reference: {{ code }} {{/code}}\",{css:[\"okanjo.core\"]}),t.mvc.registerCss(\"product.block\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\" \";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-block\"});var e='
';t.mvc.registerTemplate(\"product.block\",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-block\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:[\"product.block\",\"okanjo.modal\"]}),t.mvc.registerCss(\"product.block2\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\" \";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-block2\"});var o='',n=0;t.mvc.registerTemplate(\"product.block2\",o,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-block2\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var i=t.util.deepClone(this.metricBase,{});i.m=t.metrics.truncate(t.metrics.copy(this.config,i.m)),o.metricBaseJSON=JSON.stringify(i),\"leaderboard\"==o.config.size||\"large_mobile_banner\"==o.config.size?(o.config.template_layout=\"list\",o.config.template_cta_style=\"link\"):\"half_page\"!=o.config.size&&\"auto\"!=o.config.size||(o.config.template_layout=\"list\");var r=o.config.template_cta_color;if(r){var a,c=\"okanjo-product-block2-cus-\"+n;a=\".okanjo-product-block2.\"+c+\" .okanjo-product-buy-button { color: \"+r+\";} .okanjo-product-block2.\"+c+\".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid \"+r+\"; } .okanjo-product-block2.\"+c+\".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: \"+r+\"; } \",t.mvc.registerCss(c,a,{id:c}),t.mvc.ensureCss(c)}return o.blockId=n++,o},{css:[\"product.block2\",\"okanjo.modal\"]}),t.mvc.registerCss(\"product.sidebar\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:\" \";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:\"...\"}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-sidebar\"}),t.mvc.registerTemplate(\"product.sidebar\",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-sidebar\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:[\"product.sidebar\",\"okanjo.modal\"]}),t.mvc.registerCss(\"product.single\",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:\" \";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:\"...\"}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:\"okanjo-product-single\"}),t.mvc.registerTemplate(\"product.single\",e,function(e,o){e=e||{products:[],config:{}},o=t.util.clone(o),o.template_name=\"okanjo-product-single\",o.config=e.config,o.proxy_url=this.proxy_url,o.products=t.mvc.formats.product(e.products),o.disable_popup=this.disable_popup?\"1\":\"\",o.instanceId=this.instanceId;var n=t.util.deepClone(this.metricBase,{});return n.m=t.metrics.truncate(t.metrics.copy(this.config,n.m)),o.metricBaseJSON=JSON.stringify(n),o},{css:[\"product.single\",\"okanjo.modal\"]})}(okanjo);"],"file":"okanjo-bundle.min.js","sourceRoot":"./"} \ No newline at end of file diff --git a/dist/okanjo-metrics.js b/dist/okanjo-metrics.js index 0e57a58..0f0c042 100644 --- a/dist/okanjo-metrics.js +++ b/dist/okanjo-metrics.js @@ -1,4 +1,4 @@ -/*! okanjo-metrics.js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +/*! okanjo-metrics.js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ (function(root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); @@ -25,7 +25,7 @@ okanjo = ok || {}; // Override version with this version - okanjo.version = "0.8.3"; + okanjo.version = "0.8.4"; // Override these later okanjo.qwery = noop; diff --git a/dist/okanjo-metrics.min.js b/dist/okanjo-metrics.min.js index 33803b4..f6f999d 100644 --- a/dist/okanjo-metrics.min.js +++ b/dist/okanjo-metrics.min.js @@ -1,15 +1,15 @@ -/*! okanjo-metrics.js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ -!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.okanjo=t()}(this,function(){var okanjo=function(e){function t(e){for(var t,n,r,o,i={},u=e.split("&"),a=0;ao?(n=decodeURIComponent(t),r=null):(n=decodeURIComponent(t.substring(0,o)),r=decodeURIComponent(t.substring(o+1))),n&&(i[n]=r)}catch(s){console.error("[Okanjo] Failed to parse URL parameter:",t,s)}return i}var n=void 0!==window.pageXOffset,r="CSS1Compat"===(document.compatMode||""),o=window.navigator.userAgent,i=function(){},u=e||{};u.version="0.8.4",u.qwery=i,u.metrics={trackEvent:i,trackPageView:i},u.routes={products:"/products",products_id:"/products/:product_id",products_sense:"/products/sense",metrics:"/metrics/:object_type/:event_type"},u.getRoute=function(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e=e.replace(":"+n,t[n]+""));return u.config.ads.apiUri+e},u.exec=function(e,t,n){t=t||{},u.JSONP({url:e,data:t,error:function(e){var t={statusCode:500,error:"Communication Error",message:e.message||"JSONP communication failure."};u.report("core-jsonp",e.error||new Error(t.message)),n(t,null)},success:function(e){var t,r;e?e.error?t=e:r=e:(t={statusCode:500,error:"Invalid Response",message:"Could not interpret the JSONP response."},u.report("core-jsonp",new Error(t.message))),n(t,r)}})},u.report=function(e,t){var n;"string"==typeof t?n=new Error("[Okanjo"+(e?" "+e:"")+"] "+t):"object"==typeof t&&t instanceof Error&&(n=t),console.error(n)};var a=u.util=u.util||{};/*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */ /*! based on shortid https://github.com/dylang/shortid */ -return a.trim=function(e){return(e||"").replace(/^\s+|\s+$/g,"")},a.empty=function(e){return null===e||void 0===e||"string"==typeof e&&""===a.trim(e)},a.clone=function(e){var t={};e=e||{};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},a.hash=function(e){var t=0;if(0===e.length)return""+t;for(var n=0;n=0;r--)0===n[r].name.indexOf("data-")&&(t[n[r].name.substr(5)]=n[r].value);return t},a.copyIfSet=function(e,t,n,r,o){function i(r){!t||void 0===t[r]||o.stripEmpty&&a.empty(t[r])||(e[n]=t[r])}if(r=r||n,o=o||{},"object"==typeof r&&Array.isArray(r))for(var u=0;ui||u&&o>u;return{vw:a?i:r,vh:a?u:o}},a.getEventPosition=function(e){var t=e.pageX,n=e.pageY,r=document,o=r.body,i=r.documentElement,u="scrollLeft",a="scrollTop";return{ex:void 0===t?e.clientX+o[u]+i[u]:t,ey:void 0===n?e.clientY+o[a]+i[a]:n}},a.ellipsify=function(e,t){for(var n=t||e.parentNode,r=a.getElementSize(n).height,o=void 0!==e.textContent,i=o?e.textContent:e.innerText,u="",s=5e3,c=function(e){return u=e.substr(0,e.length-3)+u,"..."};a.getElementSize(e).height>r&&i.length>0&&s-- >0;)i=o?e.textContent:e.innerText,i=i.replace(/[\s\S](?:\.\.\.)?$/,c),o?e.textContent=i:e.innerText=i;if(u.length>0){var f=document.createElement("span"),l=document.createElement("span");f.setAttribute("class","okanjo-ellipses"),l.setAttribute("class","okanjo-visually-hidden"),o?(f.textContent=i.substr(0,i.length-3),l.textContent=u):(f.innerText=i.substr(0,i.length-3),l.innerText=u),e.innerHTML="",e.appendChild(f),e.appendChild(l)}},a.detectClasses=function(){var e=[];return navigator.appVersion.indexOf("MSIE 9.")!=-1?e.push("lt-ie10"):navigator.appVersion.indexOf("MSIE 8.")!=-1?e.push("lt-ie9"):navigator.appVersion.indexOf("MSIE 7.")!=-1?e.push("lt-ie8"):navigator.appVersion.indexOf("MSIE 6.")!=-1&&e.push("lt-ie7"),e},a.isFramed=function(){return window.top!==window.self},a.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(o)},a.isAndroid=function(){return/Android/.test(o)},a.isMobile=function(){return a.isiOS()||a.isAndroid()},a.getPageArguments=function(e){var n=t(window.location.search.substring(window.location.search.indexOf("?")+1));if(e){var r=t(window.location.hash.substring(Math.max(window.location.hash.indexOf("#")+1,window.location.hash.indexOf("#!")+2)));for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])}return n},a.deepClone=function(e,t){var n,r=0;if(Array.isArray(e))for(t=t||[];r>4*n&15|i()],t=e0&&(r+=u(t)),r+=u(o)}}(),u}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */ +return a.trim=function(e){return(e||"").replace(/^\s+|\s+$/g,"")},a.empty=function(e){return null===e||void 0===e||"string"==typeof e&&""===a.trim(e)},a.clone=function(e){var t={};e=e||{};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},a.hash=function(e){var t=0;if(0===e.length)return""+t;for(var n=0;n=0;r--)0===n[r].name.indexOf("data-")&&(t[n[r].name.substr(5)]=n[r].value);return t},a.copyIfSet=function(e,t,n,r,o){function i(r){!t||void 0===t[r]||o.stripEmpty&&a.empty(t[r])||(e[n]=t[r])}if(r=r||n,o=o||{},"object"==typeof r&&Array.isArray(r))for(var u=0;ui||u&&o>u;return{vw:a?i:r,vh:a?u:o}},a.getEventPosition=function(e){var t=e.pageX,n=e.pageY,r=document,o=r.body,i=r.documentElement,u="scrollLeft",a="scrollTop";return{ex:void 0===t?e.clientX+o[u]+i[u]:t,ey:void 0===n?e.clientY+o[a]+i[a]:n}},a.ellipsify=function(e,t){for(var n=t||e.parentNode,r=a.getElementSize(n).height,o=void 0!==e.textContent,i=o?e.textContent:e.innerText,u="",s=5e3,c=function(e){return u=e.substr(0,e.length-3)+u,"..."};a.getElementSize(e).height>r&&i.length>0&&s-- >0;)i=o?e.textContent:e.innerText,i=i.replace(/[\s\S](?:\.\.\.)?$/,c),o?e.textContent=i:e.innerText=i;if(u.length>0){var f=document.createElement("span"),l=document.createElement("span");f.setAttribute("class","okanjo-ellipses"),l.setAttribute("class","okanjo-visually-hidden"),o?(f.textContent=i.substr(0,i.length-3),l.textContent=u):(f.innerText=i.substr(0,i.length-3),l.innerText=u),e.innerHTML="",e.appendChild(f),e.appendChild(l)}},a.detectClasses=function(){var e=[];return-1!=navigator.appVersion.indexOf("MSIE 9.")?e.push("lt-ie10"):-1!=navigator.appVersion.indexOf("MSIE 8.")?e.push("lt-ie9"):-1!=navigator.appVersion.indexOf("MSIE 7.")?e.push("lt-ie8"):-1!=navigator.appVersion.indexOf("MSIE 6.")&&e.push("lt-ie7"),e},a.isFramed=function(){return window.top!==window.self},a.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(o)},a.isAndroid=function(){return/Android/.test(o)},a.isMobile=function(){return a.isiOS()||a.isAndroid()},a.getPageArguments=function(e){var n=t(window.location.search.substring(window.location.search.indexOf("?")+1));if(e){var r=t(window.location.hash.substring(Math.max(window.location.hash.indexOf("#")+1,window.location.hash.indexOf("#!")+2)));for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])}return n},a.deepClone=function(e,t){var n,r=0;if(Array.isArray(e))for(t=t||[];r>4*n&15|i()],t=e0&&(r+=u(t)),r+=u(o)}}(),u}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */ /*! Okanjo Local Storage Polyfill v1.0.0 | (c) 2013 Okanjo Partners Inc | Based on https://gist.github.com/juliocesar/926500/ddb28fb72903be87cb9044a945c6edbe1aa28b3a */ /*! Okanjo Cookie Helper v1.0.0 | (c) 2013 Okanjo Partners Inc */ -return config.key=config.key||void 0,config.marketplace={uri:"https://shop.okanjo.com",apiUri:"https://api.okanjo.com",routerUri:"https://shop.okanjo.com/widgets/router/",balancedMarketplacePath:"/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy",socketIOUri:"https://mke-rt.okanjo.com:13443"},config.ads={apiUri:"https://ads-api.okanjo.com"},okanjo.configure=function(e){Object.keys(e).every(function(t){return config[t]&&"object"==typeof config[t]&&"object"==typeof e[t]?Object.keys(e[t]).every(function(n){return config[t][n]=e[t][e[n]],!0}):config[t]=e[t],!0})},function(){if(!this.JSONP){var e,t,n,r,o,i,u;n=window.encodeURIComponent,r=function(){},t=function(e){var t;return t=e.url,t+=e.url.indexOf("?")<0?"?":"&",t+=o(e.data)},i=function(){return e.requestCounter+=1,(new Date).getTime()+"_"+e.requestCounter},o=function(e){var t,r,o;t=[];for(r in e)if(e.hasOwnProperty(r))if(o=e[r],Array.isArray(o))for(var i=0;i>>0;if(0===o)return-1;var i=+t||0;if(Math.abs(i)===1/0&&(i=0),i>=o)return-1;for(n=Math.max(i>=0?i:o-Math.abs(i),0);n>>0;if("function"!=typeof e)throw new TypeError;for(arguments.length>1&&(n=t),r=0;r>>0;if("function"!=typeof e)throw new TypeError;for(var r=[],o=arguments.length>=2?arguments[1]:void 0,i=0;iu;u++)e.call(o,n[u])&&a.push(n[u]);return a}}()),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),o=r.length>>>0;if(0===o)return-1;var i=+t||0;if(Math.abs(i)===1/0&&(i=0),i>=o)return-1;for(n=Math.max(i>=0?i:o-Math.abs(i),0);o>n;){if(n in r&&r[n]===e)return n;n++}return-1}),Array.prototype.every||(Array.prototype.every=function(e,t){"use strict";var n,r;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof e)throw new TypeError;for(arguments.length>1&&(n=t),r=0;i>r;){var u;if(r in o){u=o[r];var a=e.call(n,u,r,o);if(!a)return!1}r++}return!0}),Array.prototype.filter||(Array.prototype.filter=function(e){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var r=[],o=arguments.length>=2?arguments[1]:void 0,i=0;n>i;i++)if(i in t){var u=t[i];e.call(o,u,i,t)&&r.push(u)}return r}),function(){if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),!Element.prototype.addEventListener){var e=[],t=function(t,n){var r=this,o=function(e){e.target=e.srcElement,e.currentTarget=r,n.handleEvent?n.handleEvent(e):n.call(r,e)};if("DOMContentLoaded"==t){var i=function(e){"complete"==document.readyState&&o(e)};if(document.attachEvent("onreadystatechange",i),e.push({object:this,type:t,listener:n,wrapper:i}),"complete"==document.readyState){var u=new Event;u.srcElement=window,i(u)}}else this.attachEvent("on"+t,o),e.push({object:this,type:t,listener:n,wrapper:o})},n=function(t,n){for(var r=0;re?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,i,u,a=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,u=[],"[object Array]"===Object.prototype.toString.apply(s)){for(i=s.length,n=0;i>n;n+=1)u[n]=str(n,s)||"null";return o=0===u.length?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+a+"]":"["+u.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(i=rep.length,n=0;i>n;n+=1)"string"==typeof rep[n]&&(r=rep[n],o=str(r,s),o&&u.push(quote(r)+(gap?": ":":")+o));else for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(o=str(r,s),o&&u.push(quote(r)+(gap?": ":":")+o));return o=0===u.length?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+a+"}":"{"+u.join(",")+"}",gap=a,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){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(){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","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\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,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),function(){/*! * @preserve Qwery - A Blazing Fast query selector engine * https://github.com/ded/qwery * copyright Dustin Diaz 2012 * MIT License */ -!function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t[e]=n()}("qwery",this,function(){function e(){this.c={}}function t(e){return Q.g(e)||Q.s(e,"(^|\\s+)"+e+"(\\s+|$)",1)}function n(e,t){for(var n=0,r=e.length;n~+]/,D=/^\s+|\s*([,\s\+\~>]|$)\s*/g,q=/[\s\>\+\~]/,U=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,R=/([.*+?\^=!:${}()|\[\]\/\\])/g,$=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,J=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,V=new RegExp(A.source+"|"+M.source+"|"+N.source),z=new RegExp("("+q.source+")"+U.source,"g"),B=new RegExp(q.source+U.source),W=new RegExp($.source+"("+J.source+")?("+H.source+")?"),F={" ":function(e){return e&&e!==_&&e.parentNode},">":function(e,t){return e&&e.parentNode==t.parentNode&&e.parentNode},"~":function(e){return e&&e.previousSibling},"+":function(e,t,n,r){return!!e&&((n=i(e))&&(r=i(t))&&n==r&&n)}};e.prototype={g:function(e){return this.c[e]||void 0},s:function(e,t,n){return t=n?new RegExp(t):t,this.c[e]=t}};var Q=new e,X=new e,Y=new e,K=new e,Z="compareDocumentPosition"in _?function(e,t){return 16==(16&t.compareDocumentPosition(e))}:"contains"in _?function(e,t){return t=9===t[C]||t==window?_:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},G=function(){var e=x.createElement("p");return(e.innerHTML='x')&&"#x"!=e.firstChild.getAttribute("href")?function(e,t){return"class"===t?e.className:"href"===t||"src"===t?e.getAttribute(t,2):e.getAttribute(t)}:function(e,t){return e.getAttribute(t)}}(),ee=!!x[j],te=x.querySelector&&x[E],ne=function(e,t){var r,i,u=[];try{return 9!==t[C]&&L.test(e)?(n(r=e.split(","),w(t,function(e,t){i=e[E](t),1==i.length?u[u.length]=i.item(0):i.length&&(u=u.concat(o(i)))})),r.length>1&&u.length>1?h(u):u):o(t[E](e))}catch(a){}return re(e,t)},re=function(e,r){var o,i,u,a,s,c,l=[];if(e=e.replace(D,"$1"),i=e.match(I)){for(s=t(i[2]),o=r[k](i[1]||"*"),u=0,a=o.length;u1&&l.length>1?h(l):l},oe=function(e){"undefined"!=typeof e[O]&&(b=e[O]&&te?ne:re)};return oe({useNativeQSA:!0}),v.configure=oe,v.uniq=h,v.is=l,v.pseudos={},v}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */ +!function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t[e]=n()}("qwery",this,function(){function e(){this.c={}}function t(e){return Q.g(e)||Q.s(e,"(^|\\s+)"+e+"(\\s+|$)",1)}function n(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n])}function r(e){for(var t=[],n=0,r=e.length;r>n;++n)g(e[n])?t=t.concat(e[n]):t[t.length]=e[n];return t}function o(e){for(var t=0,n=e.length,r=[];n>t;t++)r[t]=e[t];return r}function i(e){for(;(e=e.previousSibling)&&1!=e[C];);return e}function u(e){return e.match(W)}function a(e,n,r,o,i,u,a,s,f,l,p){var d,h,g,y,m;if(1!==this[C])return!1;if(n&&"*"!==n&&this[S]&&this[S].toLowerCase()!==n)return!1;if(r&&(h=r.match(P))&&h[1]!==this.id)return!1;if(r&&(m=r.match(T)))for(d=m.length;d--;)if(!t(m[d].slice(1)).test(this.className))return!1;if(f&&v.pseudos[f]&&!v.pseudos[f](this,p))return!1;if(o&&!a){y=this.attributes;for(g in y)if(Object.prototype.hasOwnProperty.call(y,g)&&(y[g].name||g)==i)return this}return o&&!c(u,G(this,i)||"",a)?!1:this}function s(e){return X.g(e)||X.s(e,e.replace(R,"\\$1"))}function c(e,t,n){switch(e){case"=":return t==n;case"^=":return t.match(Y.g("^="+n)||Y.s("^="+n,"^"+s(n),1));case"$=":return t.match(Y.g("$="+n)||Y.s("$="+n,s(n)+"$",1));case"*=":return t.match(Y.g(n)||Y.s(n,s(n),1));case"~=":return t.match(Y.g("~="+n)||Y.s("~="+n,"(?:^|\\s+)"+s(n)+"(?:\\s+|$)",1));case"|=":return t.match(Y.g("|="+n)||Y.s("|="+n,"^"+s(n)+"(-|$)",1))}return 0}function f(e,t){var r,o,i,s,c,f,l,d=[],h=[],g=t,y=K.g(e)||K.s(e,e.split(B)),v=e.match(z);if(!y.length)return d;if(s=(y=y.slice(0)).pop(),y.length&&(i=y[y.length-1].match(A))&&(g=m(t,i[1])),!g)return d;for(f=u(s),c=g!==t&&9!==g[C]&&v&&/^[+~]$/.test(v[v.length-1])?function(e){for(;g=g.nextSibling;)1==g[C]&&(f[1]?f[1]==g[S].toLowerCase():1)&&(e[e.length]=g);return e}([]):g[k](f[1]||"*"),r=0,o=c.length;o>r;r++)(l=a.apply(c[r],f))&&(d[d.length]=l);return y.length?(n(d,function(e){p(e,y,v)&&(h[h.length]=e)}),h):d}function l(e,t,n){if(d(t))return e==t;if(g(t))return!!~r(t).indexOf(e);for(var o,i,s=t.split(",");t=s.pop();)if(o=K.g(t)||K.s(t,t.split(B)),i=t.match(z),o=o.slice(0),a.apply(e,u(o.pop()))&&(!o.length||p(e,o,i,n)))return!0;return!1}function p(e,t,n,r){function o(e,r,s){for(;s=F[n[r]](s,e);)if(d(s)&&a.apply(s,u(t[r]))){if(!r)return s;if(i=o(s,r-1,s))return i}}var i;return(i=o(e,t.length-1,e))&&(!r||Z(i,r))}function d(e,t){return e&&"object"==typeof e&&(t=e[C])&&(1==t||9==t)}function h(e){var t,n,r=[];e:for(t=0;t~+]/,D=/^\s+|\s*([,\s\+\~>]|$)\s*/g,q=/[\s\>\+\~]/,U=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,R=/([.*+?\^=!:${}()|\[\]\/\\])/g,$=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,J=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,V=new RegExp(A.source+"|"+M.source+"|"+N.source),z=new RegExp("("+q.source+")"+U.source,"g"),B=new RegExp(q.source+U.source),W=new RegExp($.source+"("+J.source+")?("+H.source+")?"),F={" ":function(e){return e&&e!==_&&e.parentNode},">":function(e,t){return e&&e.parentNode==t.parentNode&&e.parentNode},"~":function(e){return e&&e.previousSibling},"+":function(e,t,n,r){return e?(n=i(e))&&(r=i(t))&&n==r&&n:!1}};e.prototype={g:function(e){return this.c[e]||void 0},s:function(e,t,n){return t=n?new RegExp(t):t,this.c[e]=t}};var Q=new e,X=new e,Y=new e,K=new e,Z="compareDocumentPosition"in _?function(e,t){return 16==(16&t.compareDocumentPosition(e))}:"contains"in _?function(e,t){return t=9===t[C]||t==window?_:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},G=function(){var e=x.createElement("p");return(e.innerHTML='x')&&"#x"!=e.firstChild.getAttribute("href")?function(e,t){return"class"===t?e.className:"href"===t||"src"===t?e.getAttribute(t,2):e.getAttribute(t)}:function(e,t){return e.getAttribute(t)}}(),ee=!!x[j],te=x.querySelector&&x[E],ne=function(e,t){var r,i,u=[];try{return 9!==t[C]&&L.test(e)?(n(r=e.split(","),w(t,function(e,t){i=e[E](t),1==i.length?u[u.length]=i.item(0):i.length&&(u=u.concat(o(i)))})),r.length>1&&u.length>1?h(u):u):o(t[E](e))}catch(a){}return re(e,t)},re=function(e,r){var o,i,u,a,s,c,l=[];if(e=e.replace(D,"$1"),i=e.match(I)){for(s=t(i[2]),o=r[k](i[1]||"*"),u=0,a=o.length;a>u;u++)s.test(o[u].className)&&(l[l.length]=o[u]);return l}return n(c=e.split(","),w(r,function(e,t,n){for(s=f(t,e),u=0,a=s.length;a>u;u++)(9===e[C]||n||Z(s[u],r))&&(l[l.length]=s[u])})),c.length>1&&l.length>1?h(l):l},oe=function(e){"undefined"!=typeof e[O]&&(b=e[O]&&te?ne:re)};return oe({useNativeQSA:!0}),v.configure=oe,v.uniq=h,v.is=l,v.pseudos={},v}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */ function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.onDomReady=t()}(this,function(){"use strict";function e(t){if(!x){if(!u.body)return r(e);for(x=!0;t=_.shift();)r(t)}}function t(t){(w||t.type===s||u[p]===l)&&(n(),e())}function n(){w?(u[v](y,t,c),i[v](s,t,c)):(u[h](m,t),i[h](f,t))}function r(e,t){setTimeout(e,+t>=0?t:1)}function o(e){x?r(e):_.push(e)}var i=window,u=i.document,a=u.documentElement,s="load",c=!1,f="on"+s,l="complete",p="readyState",d="attachEvent",h="detachEvent",g="addEventListener",y="DOMContentLoaded",m="onreadystatechange",v="removeEventListener",w=g in u,b=c,x=c,_=[];if(u[p]===l)r(e);else if(w)u[g](y,t,c),i[g](s,t,c);else{u[d](m,t),i[d](f,t);try{b=null==i.frameElement&&a}catch(j){}b&&b.doScroll&&!function k(){if(!x){try{b.doScroll("left")}catch(t){return r(k,50)}n(),e()}}()}return o.version="1.4.0",o.isReady=function(){return x},o})}.apply(okanjo),function(e,t){function n(){this.default_channel=this.channel.external,this._queue=[],this.pageId=e.util.shortid();var t=e.util.getPageArguments(!0),n=t[this.msid_key],r=e.Cookie.get(this.msid_key),o=t[this.source_cx],i=t[this.source_ch];n&&r&&n!=r&&(this.trackEvent(this.object_type.metric_session,this.event_type.correlation,{id:n+"_"+r,ch:this.default_channel,_noProcess:!0}),e.Cookie.set(this.msid_key,n,this.msid_ttl)),this.sid=n||r||null,this.sourceCh=i||null,this.sourceCx=o||null,this._lastKey=void 0}n.prototype={msid_key:"ok_msid",source_cx:"ok_cx",source_ch:"ok_ch",msid_ttl:1460,strip_meta:["key","callback","metrics_channel_context","metrics_context","mode"],constructor:n,event_type:{view:"vw",impression:"imp",interaction:"int",correlation:"cor"},action:{click:"click",inline_click:"inline_click"},object_type:{thirdparty_ad:"ta",cart:"ct",page:"pg",widget:"wg",product:"pr",store:"st",cause:"ca",marketplace:"mp",order:"or",order_item:"oi",user:"ur",metric_session:"mt"},channel:{product_widget:"pw",ad_widget:"aw",store_widget:"sw",marketplace:"mp",external:"ex"},environment:{live:"live",testing:"testing"},trackEvent:function(t,n,r,o){r=r||{},r.object_type=t,r.event_type=n,this._lastKey=r.key||r.key||r.m&&r.m.key||e.key||this._lastKey||void 0,this.push(r,o)},trackPageView:function(e,n){e=e||{},e.id=e.id||t.location.href,e.ch=e.ch||this.default_channel,this.trackEvent(this.object_type.page,this.event_type.view,e,n)},track:function(t,n){if(!t||"object"!=typeof t)return void console.warn("[Okanjo.Metrics] event object data required");if(!t.object_type)return void console.warn("[Okanjo.Metrics] object_type required");if(!t.event_type)return void console.warn("[Okanjo.Metrics] event_type required");var r=t.object_type,o=t.event_type;delete t.object_type,delete t.event_type,this.normalizeEventData(t),e.exec(e.getRoute(e.routes.metrics,{object_type:r,event_type:o}),t,function(e,t){e&&console.warn("[Okanjo.Metrics] Reporting failed",e,t),n&&n(e,t)})},normalizeEventData:function(t){if(t.key=t.key||t.m&&t.m.key||e.key||this._lastKey||void 0,this.sid&&(t.sid=this.sid),t.m){var n={};for(var r in t.m)t.m.hasOwnProperty(r)&&this.strip_meta.indexOf(r)<0&&(n[r]=t.m[r]);t.m=n}else t.m={};(this.sourceCh||this.sourceCx)&&(this.sourceCh&&(t.m.ref_ch=this.sourceCh),this.sourceCx&&(t.m.ref_cx=this.sourceCx)),t.m.pgid=this.pageId,t.m.ok_ver=e.version,document.referrer&&(t.ref=document.referrer)},updateSid:function(t){!this.sid&&t&&(this.sid=t,e.Cookie.set(this.msid_key,t,this.msid_ttl))},push:function(e,t){this._queue.push({event:e,callback:t}),e._noProcess?delete e._noProcess:this._processQueue()},_processQueue:function(){if(!this._processTimeout&&this._queue.length>0){var e=this;this._processTimeout=setTimeout(function(){var t=e._queue.shift();void 0===t?e._processTimeout=null:e.track(t.event,function(n,r){r&&r.data&&r.data.sid&&e.updateSid(r.data.sid),e._processTimeout=null,e._processQueue(),t.callback&&t.callback(n,r)})},0)}},includeElementInfo:function(t,n){var r=e.util.getPageSize(),o=e.util.getElementPosition(t);return n=n||{},n.pw=r.w,n.ph=r.h,n.x1=o.x1,n.y1=o.y1,n.x2=o.x2,n.y2=o.y2,n},includeViewportInfo:function(t){var n=e.util.getViewportSize(),r=e.util.getScrollPosition();return t=t||{},t.vx1=r.x,t.vy1=r.y,t.vx2=t.vx1+n.vw,t.vy2=t.vy1+n.vh,t},includeEventInfo:function(t,n){var r=e.util.getEventPosition(t);return n.ex=r.ex,n.ey=r.ey,n},copy:function(t,n){return e.util.flatten(e.util.deepClone(t,n))},truncate:function(e){for(var t in e)e.hasOwnProperty(t)&&"string"==typeof e[t]&&(e[t]=e[t].substr(0,255));return e}},e.metrics=new n}(okanjo,this),okanjo}); //# sourceMappingURL=okanjo-metrics.min.js.map diff --git a/dist/okanjo-metrics.min.js.map b/dist/okanjo-metrics.min.js.map index ce833f8..ec875b7 100644 --- a/dist/okanjo-metrics.min.js.map +++ b/dist/okanjo-metrics.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["core.js","config.js","okanjo-metrics.js","jsonp.js","ie.js","console.js","cache.js","cookie.js","json2.js","vendor-metrics.js","metrics.js"],"names":["root","factory","define","amd","exports","module","okanjo","this","ok","splitArguments","query","temp","key","value","eqIndex","params","ampSplit","split","i","length","indexOf","decodeURIComponent","substring","e","console","error","supportPageOffset","undefined","window","pageXOffset","isCSS1Compatible","document","compatMode","agent","navigator","userAgent","noop","version","qwery","metrics","trackEvent","trackPageView","routes","products","products_id","products_sense","getRoute","route","hasOwnProperty","replace","config","ads","apiUri","exec","url","data","callback","JSONP","err","statusCode","message","report","Error","success","res","context","mixed","util","trim","val","empty","clone","obj","k","hash","str","char","charCodeAt","toString","element","attrs","attributes","name","substr","copyIfSet","target","source","targetKey","sourceKey","options","doCopy","stripEmpty","Array","isArray","copyIfSetMap","map","keys","Object","inherits","ctor","superCtor","create","super_","prototype","constructor","enumerable","writable","configurable","TempCtor","getScrollPosition","x","documentElement","scrollLeft","body","y","pageYOffset","scrollTop","getElementSize","el","includeMargin","style","size","height","offsetHeight","width","offsetWidth","currentStyle","getComputedStyle","parseInt","marginTop","marginBottom","marginLeft","marginRight","getElementPosition","rect","pos","errMsg","getBoundingClientRect","contains","warn","x1","left","y1","top","x2","right","y2","bottom","getPageSize","html","w","Math","max","scrollWidth","clientWidth","h","scrollHeight","clientHeight","getViewportSize","doc","win","inWidth","innerWidth","inHeight","innerHeight","mobileZoom","vw","vh","getEventPosition","ex","pageX","ey","pageY","clientX","clientY","ellipsify","container","parent","parentNode","targetHeight","useTextContent","textContent","text","innerText","replacedText","safety","replacer","match","content","createElement","span","setAttribute","innerHTML","appendChild","detectClasses","classDetects","appVersion","push","isFramed","self","isiOS","test","isAndroid","isMobile","getPageArguments","includeHashArguments","queryArgs","location","search","hashArgs","deepClone","out","flatten","flatObject","toReturn","shortid","clusterWorkerId","counter","previousSeconds","shuffled","crypto","require","msCrypto","randomByte","randomBytes","getRandomValues","floor","random","dest","Uint8Array","encode","number","done","loopCounter","pow","REDUCE_TIME","seconds","Date","getTime","marketplace","uri","routerUri","balancedMarketplacePath","socketIOUri","configure","every","computedUrl","objectToURI","makeUniqueCallback","head","encodeURIComponent","requestCounter","join","script","timeoutHandle","removeCallback","beforeSend","complete","timeout","callbackName","clearTimeout","_error","src","async","setTimeout","onerror","evt","event","onload","onreadystatechange","readyState","removeChild","getElementsByTagName","insertBefore","firstChild","makeUrl","call","hasDontEnumBug","propertyIsEnumerable","dontEnums","dontEnumsLength","TypeError","prop","result","arg","searchElement","fromIndex","O","len","n","abs","Infinity","callbackfn","thisArg","T","arguments","kValue","testResult","filter","fun","t","Event","preventDefault","returnValue","stopPropagation","cancelBubble","Element","addEventListener","eventListeners","type","listener","wrapper","srcElement","currentTarget","handleEvent","wrapper2","attachEvent","object","removeEventListener","eventListener","detachEvent","splice","HTMLDocument","Window","method","con","dummy","properties","methods","pop","c","isLocalStorageNameSupported","testKey","storage","sessionStorage","setItem","removeItem","OkanjoCache","localStorage","_data","_updateLen","id","String","getItem","clear","index","Cache","cookie","Cookie","set","cookieName","expireDays","expireDate","setDate","getDate","cookieValue","encodeURI","toUTCString","get","idx","nameTest","cookieArray","decodeURI","JSON","f","quote","string","escapable","lastIndex","a","meta","slice","holder","v","partial","mind","gap","toJSON","rep","isFinite","indent","apply","valueOf","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","Number","Boolean","cx","\b","\t","\n","\f","\r","\"","\\","stringify","space","","parse","reviver","walk","j","eval","SyntaxError","definition","cache","classRegex","classCache","g","s","each","fn","l","ar","r","arrayLike","concat","arrayify","previous","previousSibling","nodeType","q","chunker","interpret","whole","tag","idsAndClasses","wholeAttribute","attribute","qualifier","wholePseudo","pseudo","wholePseudoVal","pseudoVal","m","o","classes","tagName","toLowerCase","clas","className","pseudos","checkAttr","getAttr","clean","cleanCache","specialChars","qualify","actual","attrCache","_qwery","selector","_root","token","els","intr","item","ret","tokens","tokenCache","tokenizr","dividedTokens","dividers","idOnly","byId","nextSibling","byTag","ancestorMatch","is","isNode","selectors","crawl","p","walker","cand","isAncestor","uniq","normalizeRoot","getElementById","ownerDocument","select","easy","hasByClass","byClass","collectSelector","collector","oid","nid","splittable","getAttribute","removeAttribute","qSA","useNativeQSA","classOnly","tagOnly","tagAndOrClass","normalizr","splitters","splittersMore","simple","attr","RegExp"," ","node",">","contestant","~","+","p1","p2","compareDocumentPosition","hasQSA","querySelector","selectQSA","ss","ctx","selectNonNative","items","rewrite","onDomReady","ready","isReady","defer","callbacks","shift","completed","w3c","LOAD","READYSTATE","COMPLETE","detach","REMOVEEVENTLISTENER","DOMCONTENTLOADED","FALSE","DETACHEVENT","ONREADYSTATECHANGE","ONLOAD","wait","docElem","ATTACHEVENT","ADDEVENTLISTENER","frameElement","doScroll","doScrollCheck","OkanjoMetrics","default_channel","channel","external","_queue","pageId","pageArgs","urlSid","msid_key","cookieSid","sourceContext","source_cx","sourceChannel","source_ch","object_type","metric_session","event_type","correlation","ch","_noProcess","msid_ttl","sid","sourceCh","sourceCx","_lastKey","strip_meta","view","impression","interaction","action","click","inline_click","thirdparty_ad","cart","page","widget","product","store","cause","order","order_item","user","product_widget","ad_widget","store_widget","environment","live","testing","href","track","normalizeEventData","ref_ch","ref_cx","pgid","ok_ver","referrer","ref","updateSid","_processQueue","_processTimeout","includeElementInfo","pw","ph","includeViewportInfo","vp","vx1","vy1","vx2","vy2","includeEventInfo","copy","base","truncate"],"mappings":";CACA,SAAAA,EAAAC,GACA,kBAAAC,SAAAA,OAAAC,IACAD,UAAAD,GACA,gBAAAG,SACAC,OAAAD,QAAAH,IAEAD,EAAAM,OAAAL,KAEAM,KAAA,WAOA,GAAAD,QAAA,SAAAE,GAwoBA,QAAAC,GAAAC,GAKA,IAJA,GAGAC,GAAAC,EAAAC,EAAAC,EAHAC,KACAC,EAAAN,EAAAO,MAAA,KACAC,EAAA,EAEAA,EAAAF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F,EAAAuF,GAAArB,EAAAqB,GACAvF,EAAAyF,GAAAvB,EAAAuB,GACAzF,EAAA2F,GAAAzB,EAAAyB,GAEA3F,GASA4iB,oBAAA,SAAA5iB,GAEA,GAAA6iB,GAAA9lB,EAAA6D,KAAA2F,kBACAvB,EAAAjI,EAAA6D,KAAA0C,mBASA,OAPAtD,GAAAA,MAEAA,EAAA8iB,IAAA9d,EAAAzB,EACAvD,EAAA+iB,IAAA/d,EAAArB,EACA3D,EAAAgjB,IAAAhjB,EAAA8iB,IAAAD,EAAA9b,GACA/G,EAAAijB,IAAAjjB,EAAA+iB,IAAAF,EAAA7b,GAEAhH,GASAkjB,iBAAA,SAAA9V,EAAApN,GACA,GAAAgF,GAAAjI,EAAA6D,KAAAqG,iBAAAmG,EAGA,OAFApN,GAAAkH,GAAAlC,EAAAkC,GACAlH,EAAAoH,GAAApC,EAAAoC,GACApH,GASAmjB,KAAA,SAAAxjB,EAAAyjB,GACA,MAAArmB,GAAA6D,KAAAiJ,QAAA9M,EAAA6D,KAAA+I,UAAAhK,EAAAyjB,KAQAC,SAAA,SAAArjB,GACA,IAAA,GAAArC,KAAAqC,GACAA,EAAAP,eAAA9B,IAAA,gBAAAqC,GAAArC,KACAqC,EAAArC,GAAAqC,EAAArC,GAAAiE,OAAA,EAAA,KRirEY,OAAO5B,KAIfjD,EAAOiC,QAAU,GAAI6f,IAEtB9hB,OAAQC,MAEJD","file":"okanjo-metrics.min.js","sourcesContent":["\n //noinspection JSUnusedAssignment\n /**\n * index.js\n * @type {okanjo|*}\n */\n var okanjo = (function(ok) {\n\n\n //noinspection JSValidateTypes,JSUnusedGlobalSymbols\n var supportPageOffset = window.pageXOffset !== undefined,\n isCSS1Compatible = ((document.compatMode || \"\") === \"CSS1Compat\"),\n agent = window.navigator.userAgent,\n noop = function(){},\n okanjo = ok || {};\n\n // Override version with this version\n okanjo.version = \"%%OKANJO_VERSION\";\n\n // Override these later\n okanjo.qwery = noop;\n\n\n /**\n * Placeholder, just in case okanjo-js is built without metrics\n */\n okanjo.metrics = {\n trackEvent: noop,\n trackPageView: noop\n };\n\n /**\n * API route definitions\n */\n okanjo.routes = {\n products: '/products',\n products_id: '/products/:product_id',\n products_sense: '/products/sense',\n metrics: '/metrics/:object_type/:event_type'\n };\n\n\n /**\n * Compiles a route and parameters into a final URL\n * @param route – The route to use (e.g. okanjo.routes.products )\n * @param [params] - Optional route parameters\n * @returns {*}\n */\n okanjo.getRoute = function(route, params) {\n if (params) {\n for (var i in params) {\n if (params.hasOwnProperty(i)) {\n route = route.replace(\":\"+i, params[i] + \"\");\n }\n }\n }\n return okanjo.config.ads.apiUri + route;\n };\n\n\n /**\n * Execute a JSONP request\n * @param {string} url – Request URL\n * @param {*} data – Request data\n * @param {function(err:*, res:*)} callback – Closure to fire when completed\n */\n okanjo.exec = function(url, data, callback) {\n data = data || {};\n //noinspection JSUnresolvedFunction\n okanjo.JSONP({\n url: url,\n data: data,\n error: function(data) {\n var err = { statusCode: 500, error: \"Communication Error\", message: data.message || \"JSONP communication failure.\" };\n okanjo.report(\"core-jsonp\", data.error || new Error(err.message));\n callback(err, null);\n },\n success: function(data) {\n var err, res;\n if (data) {\n if (data.error) {\n err = data;\n } else {\n res = data;\n }\n } else {\n err = { statusCode: 500, error: \"Invalid Response\", message: \"Could not interpret the JSONP response.\"};\n okanjo.report('core-jsonp', new Error(err.message));\n }\n\n callback(err, res);\n }\n });\n };\n\n\n /**\n * Report a message or error back to Okanjo\n * @param {string} context – What module is responsible for emitting the error (e.g. Product)\n * @param {string|Error} mixed – The message or Error to report\n */\n okanjo.report = function(context, mixed) {\n // REPORT THIS BACK TO OKANJO!\n var error;\n if (typeof mixed === \"string\") {\n error = new Error('[Okanjo' + (context ? ' ' + context : '') + '] ' + mixed);\n } else if (typeof mixed === \"object\" && mixed instanceof Error) {\n error = mixed;\n }\n\n console.error(error);\n //TODO - integrate with Raven\n };\n\n /**\n * Utility functions\n */\n var util = okanjo.util = okanjo.util || {};\n\n\n /**\n * Trims leading and trailing whitespace on a string\n * @param val\n */\n util.trim = function(val) {\n return (val || \"\").replace(/^\\s+|\\s+$/g, '');\n };\n\n\n /**\n * Function to test whether the given var has a value\n * @param val - The var to check\n * @returns {boolean} - True when the var has value, false when it does not\n */\n util.empty = function (val) {\n return (val === null || val === undefined || (typeof val === \"string\" && util.trim(val) === \"\"));\n };\n\n /**\n * Helper to shallow clone an object so we don't ruin the top-level object reference\n * Note: If the shallow keys are objects, the references to the keyed objects will be maintained!\n *\n * @param {*} obj – Source object to copy\n * @returns {{}} – Shallow clone of the object\n */\n util.clone = function (obj) {\n var clone = {};\n obj = obj || {};\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n clone[k] = obj[k];\n }\n }\n return clone;\n };\n\n\n /**\n * Super simple hashing algorithm\n * @see http://jsperf.com/hashing-strings\n * @param str - String to hash\n * @returns {string}\n */\n util.hash = function(str) {\n var hash = 0;\n if (str.length === 0) return \"\"+hash;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash<<5)-hash)+char;\n }\n\n return hash.toString(16).replace(/^-/, 'n');\n\n };\n\n\n /**\n * Instead of using HTML5 dataset, just rip through attributes and return data attributes\n * @param element\n * @returns {{}}\n */\n util.data = function (element) {\n var data = {};\n if (element) {\n var attrs = element.attributes;\n for(var i = attrs.length - 1; i >= 0; i--) {\n if (attrs[i].name.indexOf('data-') === 0) {\n data[attrs[i].name.substr(5)] = attrs[i].value;\n }\n }\n }\n return data;\n };\n\n\n /**\n * Copies a value to the target if the source contains it\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {string} targetKey – The destination key name\n * @param {string} [sourceKey] – The source key name, if different\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSet = function(target, source, targetKey, sourceKey, options) {\n sourceKey = sourceKey || targetKey;\n options = options || { };\n\n function doCopy(sourceKey) {\n if (source && source[sourceKey] !== undefined && (!options.stripEmpty || !util.empty(source[sourceKey]))) {\n target[targetKey] = source[sourceKey];\n }\n }\n\n if (typeof sourceKey === \"object\" && Array.isArray(sourceKey)) {\n // Copy the first source key that is found\n for(var k = 0; k < sourceKey.length; k++) {\n doCopy(sourceKey[k]);\n }\n\n } else {\n doCopy(sourceKey);\n }\n };\n\n\n /**\n * Copies a mapping of target-source from source to target\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {*} map – The mapping of targetKey => sourceKey (null if same)\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSetMap = function(target, source, map, options) {\n var keys = Object.keys(map);\n for(var k = 0; k < keys.length; k++) {\n util.copyIfSet(target, source, keys[k], map[keys[k]], options);\n }\n };\n\n\n /*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n /**\n * Extends an object from another\n * @param ctor – Child class\n * @param superCtor – Parent class\n */\n util.inherits = function inherits(ctor, superCtor) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n\n\n /**\n * Gets the current page's scroll position\n * @returns {{x: Number, y: Number}}\n */\n util.getScrollPosition = function() {\n return {\n x: supportPageOffset ? window.pageXOffset : isCSS1Compatible ? document.documentElement.scrollLeft : document.body.scrollLeft,\n y: supportPageOffset ? window.pageYOffset : isCSS1Compatible ? document.documentElement.scrollTop : document.body.scrollTop\n };\n };\n\n\n /**\n * Gets the height and width of the given element\n * @param {HTMLElement|Node} el – The DOM element to get the size of\n * @param {boolean} [includeMargin] – Whether to include the margins of the element in the size\n * @returns {{height: number, width: number}}\n */\n util.getElementSize = function(el, includeMargin) {\n\n var size = {\n height: el.offsetHeight,\n width : el.offsetWidth\n }, style;\n\n if (includeMargin) {\n style = el.currentStyle || getComputedStyle(el);\n size.height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n size.width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n }\n\n return size;\n };\n\n\n /**\n * Gets the elements rectangle coordinates on the page\n * @param el - DOM Element\n * @return {{x1: *, y1: *, x2: *, y2: *}}\n */\n util.getElementPosition = function(el) {\n\n // Wrapped in try-catch because IE is super strict about the\n // element being on the DOM before you call this. Other browsers\n // let it slide, but oh well.\n var rect, pos, errMsg = '[Okanjo Core] Could not get position of element. Did you attach the element to the DOM before initializing?';\n try {\n rect = el.getBoundingClientRect();\n pos = util.getScrollPosition();\n\n if (!document.body.contains(el)) {\n console.warn(errMsg);\n }\n\n return {\n x1: rect.left + pos.x,\n y1: rect.top + pos.y,\n x2: rect.right + pos.x,\n y2: rect.bottom + pos.y\n };\n } catch (e) {\n console.warn(errMsg, e);\n return {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0\n };\n }\n\n };\n\n\n /**\n * Gets the current page size\n * @return {{w: number, h: number}}\n */\n util.getPageSize = function() {\n var body = okanjo.qwery('body')[0],\n html = document.documentElement;\n\n return {\n w: Math.max( body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth ),\n\n h: Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight )\n };\n };\n\n\n /**\n * Gets the current viewport size\n * @return {{vw: number, vh: number}}\n */\n util.getViewportSize = function() {\n var doc = document,\n win = window,\n el = (doc.compatMode && doc.compatMode === 'CSS1Compat') ? doc.documentElement : doc.body,\n width = el.clientWidth,\n height = el.clientHeight,\n inWidth = win.innerWidth || 0,\n inHeight = win.innerHeight || 0,\n mobileZoom = (inWidth && width > inWidth) || (inHeight && height > inHeight);\n\n return {\n vw: mobileZoom ? inWidth : width,\n vh: mobileZoom ? inHeight : height\n };\n };\n\n\n /**\n * Gets the x, y location of the event relative to the page\n * @param e – Event\n * @return {{ex: number, ey: number}}\n */\n util.getEventPosition = function(e) {\n var ex = e.pageX,\n ey = e.pageY,\n doc = document,\n body = doc.body,\n el = doc.documentElement,\n scrollLeft = 'scrollLeft',\n scrollTop = 'scrollTop';\n return {\n ex: ex === undefined ? e.clientX + body[scrollLeft] + el[scrollLeft] : ex,\n ey: ey === undefined ? e.clientY + body[scrollTop] + el[scrollTop] : ey\n };\n };\n\n\n /**\n * Splits the text in the element to fit within the visible height of its container, and separates with an ellipses\n * @param {HTMLElement|Node} element – The DOM element containing the text to fit\n * @param {HTMLElement} [container] – Optional container to compute fit on. Defaults to the element's parent\n */\n util.ellipsify = function(element, container) {\n\n // It's a sad day when you have to resort to JS because CSS kludges are too hacky to work down to IE8, programmatically\n //noinspection JSValidateTypes\n var parent = container || element.parentNode,\n targetHeight = util.getElementSize(parent).height,\n useTextContent = element.textContent !== undefined,\n text = useTextContent ? element.textContent : element.innerText,\n replacedText = \"\",\n safety = 5000, // Safety switch to bust out of the loop in the event something goes terribly wrong\n replacer = function(match) {\n replacedText = match.substr(0, match.length-3) + replacedText;\n return '...';\n };\n\n // Trim off characters until we can fit the text and ellipses\n // If the text already fits, this loop is ignored\n while (util.getElementSize(element).height > targetHeight && text.length > 0 && (safety-- > 0)) {\n text = useTextContent ? element.textContent : element.innerText;\n\n text = text.replace(/[\\s\\S](?:\\.\\.\\.)?$/, replacer);\n\n if (useTextContent) {\n element.textContent = text;\n } else {\n element.innerText = text;\n }\n }\n\n // If there is work to do, split the content into two span tags\n // Like so: [content]...[hidden content]\n if (replacedText.length > 0) {\n\n var content = document.createElement('span'),\n span = document.createElement('span');\n\n content.setAttribute('class','okanjo-ellipses');\n span.setAttribute('class','okanjo-visually-hidden');\n\n if (useTextContent) {\n content.textContent = text.substr(0, text.length-3);\n span.textContent = replacedText;\n } else {\n content.innerText = text.substr(0, text.length-3);\n span.innerText = replacedText;\n }\n\n element.innerHTML = '';\n element.appendChild(content);\n element.appendChild(span);\n }\n\n };\n\n\n /**\n * Return various browser detections\n * @returns {Array}\n */\n util.detectClasses = function() {\n var classDetects = [];\n if (navigator.appVersion.indexOf(\"MSIE 9.\") != -1) {\n classDetects.push('lt-ie10');\n } else if (navigator.appVersion.indexOf(\"MSIE 8.\") != -1) {\n classDetects.push('lt-ie9');\n } else if (navigator.appVersion.indexOf(\"MSIE 7.\") != -1) {\n classDetects.push('lt-ie8');\n } else if (navigator.appVersion.indexOf(\"MSIE 6.\") != -1) {\n classDetects.push('lt-ie7');\n }\n return classDetects;\n };\n\n\n /**\n * Checks if we're executing this code inside a frame or not\n * @returns {boolean}\n */\n util.isFramed = function() {\n return window.top !== window.self;\n };\n\n /**\n * Checks if the current user agent identifies as an iOS device\n * @returns {boolean}\n */\n util.isiOS = function() {\n return /(iPhone|iPad|iPod)/i.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as Android device\n * @returns {boolean}\n */\n util.isAndroid = function() {\n return /Android/.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as a mobile device\n * @returns {boolean}\n */\n util.isMobile = function() {\n return util.isiOS() || util.isAndroid();\n };\n\n\n /**\n * Returns an object hashmap of query and hash parameters\n * @param {boolean} includeHashArguments - Whether to include the hash arguments, if any\n * @return {*}\n */\n util.getPageArguments = function(includeHashArguments) {\n\n var queryArgs = splitArguments(window.location.search.substring(window.location.search.indexOf('?') + 1));\n\n if (includeHashArguments) {\n var hashArgs = splitArguments(window.location.hash.substring(Math.max(window.location.hash.indexOf('#') + 1, window.location.hash.indexOf('#!') + 2)));\n for (var k in hashArgs) {\n if (hashArgs.hasOwnProperty(k)) {\n queryArgs[k] = hashArgs[k];\n }\n }\n }\n\n return queryArgs;\n };\n\n\n /**\n * Deep clones a thing\n * @param mixed Something to clone\n * @param [out] Optional object/array receiver if clone-merge is desirable. Just make sure the type matches the source\n * @return {*}\n */\n util.deepClone = function(mixed, out) {\n var i = 0, k;\n if (Array.isArray(mixed)) {\n out = out || [];\n for ( ; i < mixed.length; i++) {\n out.push(util.deepClone(mixed[i]));\n }\n } else if (typeof mixed === \"object\") {\n out = out || {};\n for (k in mixed) {\n if (mixed.hasOwnProperty(k)) {\n out[k] = util.deepClone(mixed[k]);\n }\n }\n } else {\n out = mixed;\n }\n return out;\n };\n\n /**\n * Flattens a multi-dimensional object into a single object\n * @param obj\n * @return {{}}\n */\n util.flatten = function (obj) {\n var toReturn = {}, flatObject, x, i;\n\n for (i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n\n // Convert object ids to hex strings\n if (Array.isArray(obj[i])) {\n toReturn[i] = obj[i];\n } else if ((typeof obj[i]) == 'object') {\n flatObject = util.flatten(obj[i]);\n for (x in flatObject) {\n if (!flatObject.hasOwnProperty(x)) continue;\n toReturn[i + '_' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = obj[i];\n }\n }\n return toReturn;\n };\n\n /*! based on shortid https://github.com/dylang/shortid */\n util.shortid = (function(clusterWorkerId) {\n\n var shuffled = 'ylZM7VHLvOFcohp01x-fXNr8P_tqin6RkgWGm4SIDdK5s2TAJebzQEBUwuY9j3aC',\n\n crypto = typeof require !== 'undefined' ? require('crypto') : (window.crypto || window.msCrypto),\n\n randomByte = function() {\n if (crypto && crypto.randomBytes) {\n return crypto.randomBytes(1)[0] & 0x30;\n } else if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n },\n\n encode = function(number) {\n var loopCounter = 0,\n done,\n str = '';\n\n while (!done) {\n str = str + shuffled[ ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ];\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n },\n\n // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n // This number should be updated every year or so to keep the generated id short.\n // To regenerate `new Date() - 0` and bump the version. Always bump the version!\n\n REDUCE_TIME = 1458848907498,\n version = 6,\n counter,\n previousSeconds;\n clusterWorkerId = clusterWorkerId || 0;\n\n return function() {\n var str = '',\n seconds = Math.floor(((new Date()).getTime() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(version) + encode(clusterWorkerId);\n if (counter > 0) {\n str = str + encode(counter);\n }\n str = str + encode(seconds);\n\n return str;\n };\n })();\n\n\n function splitArguments(query) {\n var params = {},\n ampSplit = query.split('&'),\n i = 0,\n temp, key, value, eqIndex;\n for ( ; i < ampSplit.length; i++) {\n try {\n temp = ampSplit[i];\n eqIndex = temp.indexOf('=');\n if (eqIndex < 0) {\n key = decodeURIComponent(temp);\n value = null;\n } else {\n key = decodeURIComponent(temp.substring(0, eqIndex));\n value = decodeURIComponent(temp.substring(eqIndex + 1));\n }\n if (key) {\n params[key] = value;\n }\n } catch(e) {\n //noinspection JSUnusedAssignment\n console.error('[Okanjo] Failed to parse URL parameter:', temp, e);\n }\n }\n return params;\n }\n\n return okanjo;\n\n })(okanjo || window.okanjo);\n\n\n\n","\n var config = okanjo.config = okanjo.config || {};\n\n // okanjo-ads api key\n config.key = config.key || undefined;\n\n // Marketplace config\n config.marketplace = {\n uri: 'https://shop.okanjo.com',\n apiUri: 'https://api.okanjo.com',\n routerUri: 'https://shop.okanjo.com/widgets/router/',\n balancedMarketplacePath: '/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy',\n socketIOUri: 'https://mke-rt.okanjo.com:13443'\n };\n\n // Ads config\n config.ads = {\n apiUri: 'https://ads-api.okanjo.com'\n };\n\n /**\n * Override the default production configuration\n * @param options\n */\n okanjo.configure = function(options) {\n\n // Merge keys\n Object.keys(options).every(function(root) {\n if (config[root] && typeof config[root] === \"object\" && typeof options[root] === \"object\") {\n Object.keys(options[root]).every(function(key) {\n config[root][key] = options[root][options[key]];\n return true;\n });\n } else {\n config[root] = options[root];\n }\n return true;\n });\n\n\n };","/*! okanjo-metrics.js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.okanjo = factory();\n }\n}(this, function() {\n\n //noinspection JSUnusedAssignment\n /**\n * index.js\n * @type {okanjo|*}\n */\n var okanjo = (function(ok) {\n\n\n //noinspection JSValidateTypes,JSUnusedGlobalSymbols\n var supportPageOffset = window.pageXOffset !== undefined,\n isCSS1Compatible = ((document.compatMode || \"\") === \"CSS1Compat\"),\n agent = window.navigator.userAgent,\n noop = function(){},\n okanjo = ok || {};\n\n // Override version with this version\n okanjo.version = \"0.8.3\";\n\n // Override these later\n okanjo.qwery = noop;\n\n\n /**\n * Placeholder, just in case okanjo-js is built without metrics\n */\n okanjo.metrics = {\n trackEvent: noop,\n trackPageView: noop\n };\n\n /**\n * API route definitions\n */\n okanjo.routes = {\n products: '/products',\n products_id: '/products/:product_id',\n products_sense: '/products/sense',\n metrics: '/metrics/:object_type/:event_type'\n };\n\n\n /**\n * Compiles a route and parameters into a final URL\n * @param route – The route to use (e.g. okanjo.routes.products )\n * @param [params] - Optional route parameters\n * @returns {*}\n */\n okanjo.getRoute = function(route, params) {\n if (params) {\n for (var i in params) {\n if (params.hasOwnProperty(i)) {\n route = route.replace(\":\"+i, params[i] + \"\");\n }\n }\n }\n return okanjo.config.ads.apiUri + route;\n };\n\n\n /**\n * Execute a JSONP request\n * @param {string} url – Request URL\n * @param {*} data – Request data\n * @param {function(err:*, res:*)} callback – Closure to fire when completed\n */\n okanjo.exec = function(url, data, callback) {\n data = data || {};\n //noinspection JSUnresolvedFunction\n okanjo.JSONP({\n url: url,\n data: data,\n error: function(data) {\n var err = { statusCode: 500, error: \"Communication Error\", message: data.message || \"JSONP communication failure.\" };\n okanjo.report(\"core-jsonp\", data.error || new Error(err.message));\n callback(err, null);\n },\n success: function(data) {\n var err, res;\n if (data) {\n if (data.error) {\n err = data;\n } else {\n res = data;\n }\n } else {\n err = { statusCode: 500, error: \"Invalid Response\", message: \"Could not interpret the JSONP response.\"};\n okanjo.report('core-jsonp', new Error(err.message));\n }\n\n callback(err, res);\n }\n });\n };\n\n\n /**\n * Report a message or error back to Okanjo\n * @param {string} context – What module is responsible for emitting the error (e.g. Product)\n * @param {string|Error} mixed – The message or Error to report\n */\n okanjo.report = function(context, mixed) {\n // REPORT THIS BACK TO OKANJO!\n var error;\n if (typeof mixed === \"string\") {\n error = new Error('[Okanjo' + (context ? ' ' + context : '') + '] ' + mixed);\n } else if (typeof mixed === \"object\" && mixed instanceof Error) {\n error = mixed;\n }\n\n console.error(error);\n //TODO - integrate with Raven\n };\n\n /**\n * Utility functions\n */\n var util = okanjo.util = okanjo.util || {};\n\n\n /**\n * Trims leading and trailing whitespace on a string\n * @param val\n */\n util.trim = function(val) {\n return (val || \"\").replace(/^\\s+|\\s+$/g, '');\n };\n\n\n /**\n * Function to test whether the given var has a value\n * @param val - The var to check\n * @returns {boolean} - True when the var has value, false when it does not\n */\n util.empty = function (val) {\n return (val === null || val === undefined || (typeof val === \"string\" && util.trim(val) === \"\"));\n };\n\n /**\n * Helper to shallow clone an object so we don't ruin the top-level object reference\n * Note: If the shallow keys are objects, the references to the keyed objects will be maintained!\n *\n * @param {*} obj – Source object to copy\n * @returns {{}} – Shallow clone of the object\n */\n util.clone = function (obj) {\n var clone = {};\n obj = obj || {};\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n clone[k] = obj[k];\n }\n }\n return clone;\n };\n\n\n /**\n * Super simple hashing algorithm\n * @see http://jsperf.com/hashing-strings\n * @param str - String to hash\n * @returns {string}\n */\n util.hash = function(str) {\n var hash = 0;\n if (str.length === 0) return \"\"+hash;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash<<5)-hash)+char;\n }\n\n return hash.toString(16).replace(/^-/, 'n');\n\n };\n\n\n /**\n * Instead of using HTML5 dataset, just rip through attributes and return data attributes\n * @param element\n * @returns {{}}\n */\n util.data = function (element) {\n var data = {};\n if (element) {\n var attrs = element.attributes;\n for(var i = attrs.length - 1; i >= 0; i--) {\n if (attrs[i].name.indexOf('data-') === 0) {\n data[attrs[i].name.substr(5)] = attrs[i].value;\n }\n }\n }\n return data;\n };\n\n\n /**\n * Copies a value to the target if the source contains it\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {string} targetKey – The destination key name\n * @param {string} [sourceKey] – The source key name, if different\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSet = function(target, source, targetKey, sourceKey, options) {\n sourceKey = sourceKey || targetKey;\n options = options || { };\n\n function doCopy(sourceKey) {\n if (source && source[sourceKey] !== undefined && (!options.stripEmpty || !util.empty(source[sourceKey]))) {\n target[targetKey] = source[sourceKey];\n }\n }\n\n if (typeof sourceKey === \"object\" && Array.isArray(sourceKey)) {\n // Copy the first source key that is found\n for(var k = 0; k < sourceKey.length; k++) {\n doCopy(sourceKey[k]);\n }\n\n } else {\n doCopy(sourceKey);\n }\n };\n\n\n /**\n * Copies a mapping of target-source from source to target\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {*} map – The mapping of targetKey => sourceKey (null if same)\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSetMap = function(target, source, map, options) {\n var keys = Object.keys(map);\n for(var k = 0; k < keys.length; k++) {\n util.copyIfSet(target, source, keys[k], map[keys[k]], options);\n }\n };\n\n\n /*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n /**\n * Extends an object from another\n * @param ctor – Child class\n * @param superCtor – Parent class\n */\n util.inherits = function inherits(ctor, superCtor) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n\n\n /**\n * Gets the current page's scroll position\n * @returns {{x: Number, y: Number}}\n */\n util.getScrollPosition = function() {\n return {\n x: supportPageOffset ? window.pageXOffset : isCSS1Compatible ? document.documentElement.scrollLeft : document.body.scrollLeft,\n y: supportPageOffset ? window.pageYOffset : isCSS1Compatible ? document.documentElement.scrollTop : document.body.scrollTop\n };\n };\n\n\n /**\n * Gets the height and width of the given element\n * @param {HTMLElement|Node} el – The DOM element to get the size of\n * @param {boolean} [includeMargin] – Whether to include the margins of the element in the size\n * @returns {{height: number, width: number}}\n */\n util.getElementSize = function(el, includeMargin) {\n\n var size = {\n height: el.offsetHeight,\n width : el.offsetWidth\n }, style;\n\n if (includeMargin) {\n style = el.currentStyle || getComputedStyle(el);\n size.height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n size.width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n }\n\n return size;\n };\n\n\n /**\n * Gets the elements rectangle coordinates on the page\n * @param el - DOM Element\n * @return {{x1: *, y1: *, x2: *, y2: *}}\n */\n util.getElementPosition = function(el) {\n\n // Wrapped in try-catch because IE is super strict about the\n // element being on the DOM before you call this. Other browsers\n // let it slide, but oh well.\n var rect, pos, errMsg = '[Okanjo Core] Could not get position of element. Did you attach the element to the DOM before initializing?';\n try {\n rect = el.getBoundingClientRect();\n pos = util.getScrollPosition();\n\n if (!document.body.contains(el)) {\n console.warn(errMsg);\n }\n\n return {\n x1: rect.left + pos.x,\n y1: rect.top + pos.y,\n x2: rect.right + pos.x,\n y2: rect.bottom + pos.y\n };\n } catch (e) {\n console.warn(errMsg, e);\n return {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0\n };\n }\n\n };\n\n\n /**\n * Gets the current page size\n * @return {{w: number, h: number}}\n */\n util.getPageSize = function() {\n var body = okanjo.qwery('body')[0],\n html = document.documentElement;\n\n return {\n w: Math.max( body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth ),\n\n h: Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight )\n };\n };\n\n\n /**\n * Gets the current viewport size\n * @return {{vw: number, vh: number}}\n */\n util.getViewportSize = function() {\n var doc = document,\n win = window,\n el = (doc.compatMode && doc.compatMode === 'CSS1Compat') ? doc.documentElement : doc.body,\n width = el.clientWidth,\n height = el.clientHeight,\n inWidth = win.innerWidth || 0,\n inHeight = win.innerHeight || 0,\n mobileZoom = (inWidth && width > inWidth) || (inHeight && height > inHeight);\n\n return {\n vw: mobileZoom ? inWidth : width,\n vh: mobileZoom ? inHeight : height\n };\n };\n\n\n /**\n * Gets the x, y location of the event relative to the page\n * @param e – Event\n * @return {{ex: number, ey: number}}\n */\n util.getEventPosition = function(e) {\n var ex = e.pageX,\n ey = e.pageY,\n doc = document,\n body = doc.body,\n el = doc.documentElement,\n scrollLeft = 'scrollLeft',\n scrollTop = 'scrollTop';\n return {\n ex: ex === undefined ? e.clientX + body[scrollLeft] + el[scrollLeft] : ex,\n ey: ey === undefined ? e.clientY + body[scrollTop] + el[scrollTop] : ey\n };\n };\n\n\n /**\n * Splits the text in the element to fit within the visible height of its container, and separates with an ellipses\n * @param {HTMLElement|Node} element – The DOM element containing the text to fit\n * @param {HTMLElement} [container] – Optional container to compute fit on. Defaults to the element's parent\n */\n util.ellipsify = function(element, container) {\n\n // It's a sad day when you have to resort to JS because CSS kludges are too hacky to work down to IE8, programmatically\n //noinspection JSValidateTypes\n var parent = container || element.parentNode,\n targetHeight = util.getElementSize(parent).height,\n useTextContent = element.textContent !== undefined,\n text = useTextContent ? element.textContent : element.innerText,\n replacedText = \"\",\n safety = 5000, // Safety switch to bust out of the loop in the event something goes terribly wrong\n replacer = function(match) {\n replacedText = match.substr(0, match.length-3) + replacedText;\n return '...';\n };\n\n // Trim off characters until we can fit the text and ellipses\n // If the text already fits, this loop is ignored\n while (util.getElementSize(element).height > targetHeight && text.length > 0 && (safety-- > 0)) {\n text = useTextContent ? element.textContent : element.innerText;\n\n text = text.replace(/[\\s\\S](?:\\.\\.\\.)?$/, replacer);\n\n if (useTextContent) {\n element.textContent = text;\n } else {\n element.innerText = text;\n }\n }\n\n // If there is work to do, split the content into two span tags\n // Like so: [content]...[hidden content]\n if (replacedText.length > 0) {\n\n var content = document.createElement('span'),\n span = document.createElement('span');\n\n content.setAttribute('class','okanjo-ellipses');\n span.setAttribute('class','okanjo-visually-hidden');\n\n if (useTextContent) {\n content.textContent = text.substr(0, text.length-3);\n span.textContent = replacedText;\n } else {\n content.innerText = text.substr(0, text.length-3);\n span.innerText = replacedText;\n }\n\n element.innerHTML = '';\n element.appendChild(content);\n element.appendChild(span);\n }\n\n };\n\n\n /**\n * Return various browser detections\n * @returns {Array}\n */\n util.detectClasses = function() {\n var classDetects = [];\n if (navigator.appVersion.indexOf(\"MSIE 9.\") != -1) {\n classDetects.push('lt-ie10');\n } else if (navigator.appVersion.indexOf(\"MSIE 8.\") != -1) {\n classDetects.push('lt-ie9');\n } else if (navigator.appVersion.indexOf(\"MSIE 7.\") != -1) {\n classDetects.push('lt-ie8');\n } else if (navigator.appVersion.indexOf(\"MSIE 6.\") != -1) {\n classDetects.push('lt-ie7');\n }\n return classDetects;\n };\n\n\n /**\n * Checks if we're executing this code inside a frame or not\n * @returns {boolean}\n */\n util.isFramed = function() {\n return window.top !== window.self;\n };\n\n /**\n * Checks if the current user agent identifies as an iOS device\n * @returns {boolean}\n */\n util.isiOS = function() {\n return /(iPhone|iPad|iPod)/i.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as Android device\n * @returns {boolean}\n */\n util.isAndroid = function() {\n return /Android/.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as a mobile device\n * @returns {boolean}\n */\n util.isMobile = function() {\n return util.isiOS() || util.isAndroid();\n };\n\n\n /**\n * Returns an object hashmap of query and hash parameters\n * @param {boolean} includeHashArguments - Whether to include the hash arguments, if any\n * @return {*}\n */\n util.getPageArguments = function(includeHashArguments) {\n\n var queryArgs = splitArguments(window.location.search.substring(window.location.search.indexOf('?') + 1));\n\n if (includeHashArguments) {\n var hashArgs = splitArguments(window.location.hash.substring(Math.max(window.location.hash.indexOf('#') + 1, window.location.hash.indexOf('#!') + 2)));\n for (var k in hashArgs) {\n if (hashArgs.hasOwnProperty(k)) {\n queryArgs[k] = hashArgs[k];\n }\n }\n }\n\n return queryArgs;\n };\n\n\n /**\n * Deep clones a thing\n * @param mixed Something to clone\n * @param [out] Optional object/array receiver if clone-merge is desirable. Just make sure the type matches the source\n * @return {*}\n */\n util.deepClone = function(mixed, out) {\n var i = 0, k;\n if (Array.isArray(mixed)) {\n out = out || [];\n for ( ; i < mixed.length; i++) {\n out.push(util.deepClone(mixed[i]));\n }\n } else if (typeof mixed === \"object\") {\n out = out || {};\n for (k in mixed) {\n if (mixed.hasOwnProperty(k)) {\n out[k] = util.deepClone(mixed[k]);\n }\n }\n } else {\n out = mixed;\n }\n return out;\n };\n\n /**\n * Flattens a multi-dimensional object into a single object\n * @param obj\n * @return {{}}\n */\n util.flatten = function (obj) {\n var toReturn = {}, flatObject, x, i;\n\n for (i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n\n // Convert object ids to hex strings\n if (Array.isArray(obj[i])) {\n toReturn[i] = obj[i];\n } else if ((typeof obj[i]) == 'object') {\n flatObject = util.flatten(obj[i]);\n for (x in flatObject) {\n if (!flatObject.hasOwnProperty(x)) continue;\n toReturn[i + '_' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = obj[i];\n }\n }\n return toReturn;\n };\n\n /*! based on shortid https://github.com/dylang/shortid */\n util.shortid = (function(clusterWorkerId) {\n\n var shuffled = 'ylZM7VHLvOFcohp01x-fXNr8P_tqin6RkgWGm4SIDdK5s2TAJebzQEBUwuY9j3aC',\n\n crypto = typeof require !== 'undefined' ? require('crypto') : (window.crypto || window.msCrypto),\n\n randomByte = function() {\n if (crypto && crypto.randomBytes) {\n return crypto.randomBytes(1)[0] & 0x30;\n } else if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n },\n\n encode = function(number) {\n var loopCounter = 0,\n done,\n str = '';\n\n while (!done) {\n str = str + shuffled[ ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ];\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n },\n\n // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n // This number should be updated every year or so to keep the generated id short.\n // To regenerate `new Date() - 0` and bump the version. Always bump the version!\n\n REDUCE_TIME = 1458848907498,\n version = 6,\n counter,\n previousSeconds;\n clusterWorkerId = clusterWorkerId || 0;\n\n return function() {\n var str = '',\n seconds = Math.floor(((new Date()).getTime() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(version) + encode(clusterWorkerId);\n if (counter > 0) {\n str = str + encode(counter);\n }\n str = str + encode(seconds);\n\n return str;\n };\n })();\n\n\n function splitArguments(query) {\n var params = {},\n ampSplit = query.split('&'),\n i = 0,\n temp, key, value, eqIndex;\n for ( ; i < ampSplit.length; i++) {\n try {\n temp = ampSplit[i];\n eqIndex = temp.indexOf('=');\n if (eqIndex < 0) {\n key = decodeURIComponent(temp);\n value = null;\n } else {\n key = decodeURIComponent(temp.substring(0, eqIndex));\n value = decodeURIComponent(temp.substring(eqIndex + 1));\n }\n if (key) {\n params[key] = value;\n }\n } catch(e) {\n //noinspection JSUnusedAssignment\n console.error('[Okanjo] Failed to parse URL parameter:', temp, e);\n }\n }\n return params;\n }\n\n return okanjo;\n\n })(okanjo || window.okanjo);\n\n\n\n\n\n var config = okanjo.config = okanjo.config || {};\n\n // okanjo-ads api key\n config.key = config.key || undefined;\n\n // Marketplace config\n config.marketplace = {\n uri: 'https://shop.okanjo.com',\n apiUri: 'https://api.okanjo.com',\n routerUri: 'https://shop.okanjo.com/widgets/router/',\n balancedMarketplacePath: '/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy',\n socketIOUri: 'https://mke-rt.okanjo.com:13443'\n };\n\n // Ads config\n config.ads = {\n apiUri: 'https://ads-api.okanjo.com'\n };\n\n /**\n * Override the default production configuration\n * @param options\n */\n okanjo.configure = function(options) {\n\n // Merge keys\n Object.keys(options).every(function(root) {\n if (config[root] && typeof config[root] === \"object\" && typeof options[root] === \"object\") {\n Object.keys(options[root]).every(function(key) {\n config[root][key] = options[root][options[key]];\n return true;\n });\n } else {\n config[root] = options[root];\n }\n return true;\n });\n\n\n };\n/*\n\n Adaptation based on https://github.com/larryosborn/JSONP\n\n The MIT License (MIT)\n\n Copyright (c) 2014 Larry Osborn \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n */\n(function() {\n if(this.JSONP) { return; }\n var JSONP, computedUrl, encode, noop, objectToURI, makeUniqueCallback, head;\n\n encode = window.encodeURIComponent;\n\n noop = function() {\n return void 0;\n };\n\n computedUrl = function(params) {\n var url;\n url = params.url;\n url += params.url.indexOf('?') < 0 ? '?' : '&';\n url += objectToURI(params.data);\n return url;\n };\n\n makeUniqueCallback = function() {\n JSONP.requestCounter += 1;\n return (new Date()).getTime() + \"_\" + JSONP.requestCounter;\n };\n\n objectToURI = function(obj) {\n var data, key, value;\n data = [];\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (Array.isArray(value)) {\n var i = 0;\n for( ; i < value.length; i++ ) {\n data.push(encode(key) + '[]=' + encode(value[i]));\n }\n } else if (typeof value === \"object\") {\n // SINGLE DEPTH OBJECTS - no recursion\n for (var k in value) {\n if (value.hasOwnProperty(k)) {\n data.push(encode(key) + '['+encode(k)+']=' + encode(value[k]));\n }\n }\n } else {\n data.push(encode(key) + '=' + encode(value));\n }\n }\n }\n return data.join('&');\n };\n\n JSONP = function(options) {\n options = options ? options : {};\n var callback, done, params, script, timeoutHandle, removeCallback;\n params = {\n data: options.data || {},\n error: options.error || noop,\n success: options.success || noop,\n beforeSend: options.beforeSend || noop,\n complete: options.complete || noop,\n url: options.url || '',\n timeout: options.timeout || 30000\n };\n params.computedUrl = computedUrl(params);\n if (params.url.length === 0) {\n throw new Error('MissingUrl');\n }\n done = false;\n if (params.beforeSend({}, params) !== false) {\n //noinspection JSUnresolvedVariable\n callback = params.data[options.callbackName || 'callback'] = '_okanjo_jsonp_' + makeUniqueCallback();\n window[callback] = function(data) {\n\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n timeoutHandle = null;\n\n params.success(data, params);\n params.complete(data, params);\n removeCallback();\n };\n\n removeCallback = function() {\n try {\n return delete window[callback];\n } catch (_error) {\n window[callback] = void 0;\n return void 0;\n }\n };\n\n script = window.document.createElement('script');\n script.src = computedUrl(params);\n script.async = true;\n\n timeoutHandle = setTimeout(function() {\n timeoutHandle = null;\n var err = new Error(\"JSONP request did not respond in time!\");\n err.url = (script && script.src) || null;\n params.error(err);\n removeCallback();\n return params.complete(err, params);\n }, params.timeout);\n\n script.onerror = function(evt) {\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n params.error({\n url: script.src,\n event: evt\n });\n return params.complete({\n url: script.src,\n event: evt\n }, params);\n };\n\n script.onload = script.onreadystatechange = function() {\n if (!done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {\n done = true;\n script.onload = script.onreadystatechange = null;\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n //jshint -W093\n return script = null;\n //jshint +W093\n }\n };\n\n head = head || window.document.getElementsByTagName('head')[0] || window.document.documentElement;\n return head.insertBefore(script, head.firstChild);\n }\n };\n\n JSONP.requestCounter = 0;\n JSONP.makeUrl = computedUrl;\n JSONP.objectToURI = objectToURI;\n\n if ((typeof define !== \"undefined\" && define !== null) && define.amd) {\n define(function() {\n return JSONP;\n });\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = JSONP;\n } else {\n this.JSONP = JSONP;\n }\n\n}).call(okanjo);\n\n// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\nif (!Object.keys) {\n Object.keys = (function() {\n 'use strict';\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n return function(obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }());\n}\n\n//// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\n//if (typeof Object.create != 'function') {\n// Object.create = (function() {\n// var Temp = function() {};\n// return function (prototype) {\n// if (arguments.length > 1) {\n// throw new Error('Second argument not supported');\n// }\n// if (typeof prototype != 'object') {\n// throw new TypeError('Argument must be an object');\n// }\n// Temp.prototype = prototype;\n// var result = new Temp();\n// Temp.prototype = null;\n// return result;\n// };\n// })();\n//}\n\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\nif (!Array.isArray) {\n Array.isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n };\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.14\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\n// Reference: http://es5.github.io/#x15.4.4.14\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function(searchElement, fromIndex) {\n\n var k;\n\n /* jshint ignore:start */\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) { //\n throw new TypeError('\"this\" is null or not defined');\n }\n /* jshint ignore:end */\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\nif (!Array.prototype.every) {\n Array.prototype.every = function(callbackfn, thisArg) {\n 'use strict';\n var T, k;\n\n // jshint -W041\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n // jshint +W041\n\n // 1. Let O be the result of calling ToObject passing the this\n // value as the argument.\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get internal method\n // of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.\n if (typeof callbackfn !== 'function') {\n throw new TypeError();\n }\n\n // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 1) {\n T = thisArg;\n }\n\n // 6. Let k be 0.\n k = 0;\n\n // 7. Repeat, while k < len\n while (k < len) {\n\n var kValue;\n\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the HasProperty internal\n // method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n if (k in O) {\n\n // i. Let kValue be the result of calling the Get internal method\n // of O with argument Pk.\n kValue = O[k];\n\n // ii. Let testResult be the result of calling the Call internal method\n // of callbackfn with T as the this value and argument list\n // containing kValue, k, and O.\n var testResult = callbackfn.call(T, kValue, k, O);\n\n // iii. If ToBoolean(testResult) is false, return false.\n if (!testResult) {\n return false;\n }\n }\n k++;\n }\n return true;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\nif (!Array.prototype.filter) {\n Array.prototype.filter = function(fun/*, thisArg*/) {\n 'use strict';\n\n if (this === void 0 || this === null) {\n throw new TypeError();\n }\n\n var t = Object(this),\n len = t.length >>> 0;\n\n if (typeof fun !== 'function') {\n throw new TypeError();\n }\n\n var res = [],\n thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t) {\n var val = t[i];\n\n // NOTE: Technically this should Object.defineProperty at\n // the next index, as push can be affected by\n // properties on Object.prototype and Array.prototype.\n // But that method's new, and collisions should be\n // rare, so use the more-compatible alternative.\n if (fun.call(thisArg, val, i, t)) {\n res.push(val);\n }\n }\n }\n\n return res;\n };\n}\n\n// Doesn't work in IE7 so it's only here for reference\n//https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n(function() {\n if (!Event.prototype.preventDefault) {\n Event.prototype.preventDefault=function() {\n //noinspection JSUnusedGlobalSymbols\n this.returnValue=false;\n };\n }\n if (!Event.prototype.stopPropagation) {\n Event.prototype.stopPropagation=function() {\n //noinspection JSUnusedGlobalSymbols\n this.cancelBubble=true;\n };\n }\n if (!Element.prototype.addEventListener) {\n var eventListeners=[];\n\n var addEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var self=this;\n var wrapper=function(e) {\n e.target=e.srcElement;\n e.currentTarget=self;\n if (listener.handleEvent) {\n listener.handleEvent(e);\n } else {\n listener.call(self,e);\n }\n };\n if (type==\"DOMContentLoaded\") {\n var wrapper2=function(e) {\n if (document.readyState==\"complete\") {\n wrapper(e);\n }\n };\n document.attachEvent(\"onreadystatechange\",wrapper2);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper2});\n\n if (document.readyState==\"complete\") {\n //noinspection JSClosureCompilerSyntax\n var e=new Event();\n e.srcElement=window;\n wrapper2(e);\n }\n } else {\n this.attachEvent(\"on\"+type,wrapper);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper});\n }\n };\n var removeEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var counter=0;\n while (counter~+]/\n , normalizr = /^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g\n , splitters = /[\\s\\>\\+\\~]/\n , splittersMore = /(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/\n , specialChars = /([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g\n , simple = /^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/\n , attr = /\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/\n , pseudo = /:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/\n , easy = new RegExp(idOnly.source + '|' + tagOnly.source + '|' + classOnly.source)\n , dividers = new RegExp('(' + splitters.source + ')' + splittersMore.source, 'g')\n , tokenizr = new RegExp(splitters.source + splittersMore.source)\n , chunker = new RegExp(simple.source + '(' + attr.source + ')?' + '(' + pseudo.source + ')?')\n\n var walker = {\n ' ': function (node) {\n return node && node !== html && node.parentNode\n }\n , '>': function (node, contestant) {\n return node && node.parentNode == contestant.parentNode && node.parentNode\n }\n , '~': function (node) {\n return node && node.previousSibling\n }\n , '+': function (node, contestant, p1, p2) {\n if (!node) return false\n return (p1 = previous(node)) && (p2 = previous(contestant)) && p1 == p2 && p1\n }\n }\n\n function cache() {\n this.c = {}\n }\n cache.prototype = {\n g: function (k) {\n return this.c[k] || undefined\n }\n , s: function (k, v, r) {\n v = r ? new RegExp(v) : v\n return (this.c[k] = v)\n }\n }\n\n var classCache = new cache()\n , cleanCache = new cache()\n , attrCache = new cache()\n , tokenCache = new cache()\n\n function classRegex(c) {\n return classCache.g(c) || classCache.s(c, '(^|\\\\s+)' + c + '(\\\\s+|$)', 1)\n }\n\n // not quite as fast as inline loops in older browsers so don't use liberally\n function each(a, fn) {\n var i = 0, l = a.length\n for (; i < l; i++) fn(a[i])\n }\n\n function flatten(ar) {\n for (var r = [], i = 0, l = ar.length; i < l; ++i) arrayLike(ar[i]) ? (r = r.concat(ar[i])) : (r[r.length] = ar[i])\n return r\n }\n\n function arrayify(ar) {\n var i = 0, l = ar.length, r = []\n for (; i < l; i++) r[i] = ar[i]\n return r\n }\n\n function previous(n) {\n while (n = n.previousSibling) if (n[nodeType] == 1) break;\n return n\n }\n\n function q(query) {\n return query.match(chunker)\n }\n\n // called using `this` as element and arguments from regex group results.\n // given => div.hello[title=\"world\"]:foo('bar')\n // div.hello[title=\"world\"]:foo('bar'), div, .hello, [title=\"world\"], title, =, world, :foo('bar'), foo, ('bar'), bar]\n function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {\n var i, m, k, o, classes\n if (this[nodeType] !== 1) return false\n if (tag && tag !== '*' && this[tagName] && this[tagName].toLowerCase() !== tag) return false\n if (idsAndClasses && (m = idsAndClasses.match(id)) && m[1] !== this.id) return false\n if (idsAndClasses && (classes = idsAndClasses.match(clas))) {\n for (i = classes.length; i--;) if (!classRegex(classes[i].slice(1)).test(this.className)) return false\n }\n if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) return false\n if (wholeAttribute && !value) { // select is just for existance of attrib\n o = this.attributes\n for (k in o) {\n if (Object.prototype.hasOwnProperty.call(o, k) && (o[k].name || k) == attribute) {\n return this\n }\n }\n }\n if (wholeAttribute && !checkAttr(qualifier, getAttr(this, attribute) || '', value)) {\n // select is for attrib equality\n return false\n }\n return this\n }\n\n function clean(s) {\n return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\\\$1'))\n }\n\n function checkAttr(qualify, actual, val) {\n switch (qualify) {\n case '=':\n return actual == val\n case '^=':\n return actual.match(attrCache.g('^=' + val) || attrCache.s('^=' + val, '^' + clean(val), 1))\n case '$=':\n return actual.match(attrCache.g('$=' + val) || attrCache.s('$=' + val, clean(val) + '$', 1))\n case '*=':\n return actual.match(attrCache.g(val) || attrCache.s(val, clean(val), 1))\n case '~=':\n return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, '(?:^|\\\\s+)' + clean(val) + '(?:\\\\s+|$)', 1))\n case '|=':\n return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, '^' + clean(val) + '(-|$)', 1))\n }\n return 0\n }\n\n // given a selector, first check for simple cases then collect all base candidate matches and filter\n function _qwery(selector, _root) {\n var r = [], ret = [], i, l, m, token, tag, els, intr, item, root = _root\n , tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n , dividedTokens = selector.match(dividers)\n\n if (!tokens.length) return r\n\n token = (tokens = tokens.slice(0)).pop() // copy cached tokens, take the last one\n if (tokens.length && (m = tokens[tokens.length - 1].match(idOnly))) root = byId(_root, m[1])\n if (!root) return r\n\n intr = q(token)\n // collect base candidates to filter\n els = root !== _root && root[nodeType] !== 9 && dividedTokens && /^[+~]$/.test(dividedTokens[dividedTokens.length - 1]) ?\n function (r) {\n while (root = root.nextSibling) {\n root[nodeType] == 1 && (intr[1] ? intr[1] == root[tagName].toLowerCase() : 1) && (r[r.length] = root)\n }\n return r\n }([]) :\n root[byTag](intr[1] || '*')\n // filter elements according to the right-most part of the selector\n for (i = 0, l = els.length; i < l; i++) {\n if (item = interpret.apply(els[i], intr)) r[r.length] = item\n }\n if (!tokens.length) return r\n\n // filter further according to the rest of the selector (the left side)\n each(r, function (e) { if (ancestorMatch(e, tokens, dividedTokens)) ret[ret.length] = e })\n return ret\n }\n\n // compare element to a selector\n function is(el, selector, root) {\n if (isNode(selector)) return el == selector\n if (arrayLike(selector)) return !!~flatten(selector).indexOf(el) // if selector is an array, is el a member?\n\n var selectors = selector.split(','), tokens, dividedTokens\n while (selector = selectors.pop()) {\n tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n dividedTokens = selector.match(dividers)\n tokens = tokens.slice(0) // copy array\n if (interpret.apply(el, q(tokens.pop())) && (!tokens.length || ancestorMatch(el, tokens, dividedTokens, root))) {\n return true\n }\n }\n return false\n }\n\n // given elements matching the right-most part of a selector, filter out any that don't match the rest\n function ancestorMatch(el, tokens, dividedTokens, root) {\n var cand\n // recursively work backwards through the tokens and up the dom, covering all options\n function crawl(e, i, p) {\n while (p = walker[dividedTokens[i]](p, e)) {\n if (isNode(p) && (interpret.apply(p, q(tokens[i])))) {\n if (i) {\n if (cand = crawl(p, i - 1, p)) return cand\n } else return p\n }\n }\n }\n return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))\n }\n\n function isNode(el, t) {\n return el && typeof el === 'object' && (t = el[nodeType]) && (t == 1 || t == 9)\n }\n\n function uniq(ar) {\n var a = [], i, j;\n o:\n for (i = 0; i < ar.length; ++i) {\n for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o\n a[a.length] = ar[i]\n }\n return a\n }\n\n function arrayLike(o) {\n return (typeof o === 'object' && isFinite(o.length))\n }\n\n function normalizeRoot(root) {\n if (!root) return doc\n if (typeof root == 'string') return qwery(root)[0]\n if (!root[nodeType] && arrayLike(root)) return root[0]\n return root\n }\n\n function byId(root, id, el) {\n // if doc, query on it, else query the parent doc or if a detached fragment rewrite the query and run on the fragment\n return root[nodeType] === 9 ? root.getElementById(id) :\n root.ownerDocument &&\n (((el = root.ownerDocument.getElementById(id)) && isAncestor(el, root) && el) ||\n (!isAncestor(root, root.ownerDocument) && select('[id=\"' + id + '\"]', root)[0]))\n }\n\n function qwery(selector, _root) {\n var m, el, root = normalizeRoot(_root)\n\n // easy, fast cases that we can dispatch with simple DOM calls\n if (!root || !selector) return []\n if (selector === window || isNode(selector)) {\n return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : []\n }\n if (selector && arrayLike(selector)) return flatten(selector)\n if (m = selector.match(easy)) {\n if (m[1]) return (el = byId(root, m[1])) ? [el] : []\n if (m[2]) return arrayify(root[byTag](m[2]))\n if (hasByClass && m[3]) return arrayify(root[byClass](m[3]))\n }\n\n return select(selector, root)\n }\n\n // where the root is not document and a relationship selector is first we have to\n // do some awkward adjustments to get it to work, even with qSA\n function collectSelector(root, collector) {\n return function (s) {\n var oid, nid\n if (splittable.test(s)) {\n if (root[nodeType] !== 9) {\n // make sure the el has an id, rewrite the query, set root to doc and run it\n if (!(nid = oid = root.getAttribute('id'))) root.setAttribute('id', nid = '__qwerymeupscotty')\n s = '[id=\"' + nid + '\"]' + s // avoid byId and allow us to match context element\n collector(root.parentNode || root, s, true)\n oid || root.removeAttribute('id')\n }\n return;\n }\n s.length && collector(root, s, false)\n }\n }\n\n var isAncestor = 'compareDocumentPosition' in html ?\n function (element, container) {\n return (container.compareDocumentPosition(element) & 16) == 16\n } : 'contains' in html ?\n function (element, container) {\n container = container[nodeType] === 9 || container == window ? html : container\n return container !== element && container.contains(element)\n } :\n function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , getAttr = function () {\n // detect buggy IE src/href getAttribute() call\n var e = doc.createElement('p')\n return ((e.innerHTML = 'x') && e.firstChild.getAttribute('href') != '#x') ?\n function (e, a) {\n return a === 'class' ? e.className : (a === 'href' || a === 'src') ?\n e.getAttribute(a, 2) : e.getAttribute(a)\n } :\n function (e, a) { return e.getAttribute(a) }\n }()\n , hasByClass = !!doc[byClass]\n // has native qSA support\n , hasQSA = doc.querySelector && doc[qSA]\n // use native qSA\n , selectQSA = function (selector, root) {\n var result = [], ss, e\n try {\n if (root[nodeType] === 9 || !splittable.test(selector)) {\n // most work is done right here, defer to qSA\n return arrayify(root[qSA](selector))\n }\n // special case where we need the services of `collectSelector()`\n each(ss = selector.split(','), collectSelector(root, function (ctx, s) {\n e = ctx[qSA](s)\n if (e.length == 1) result[result.length] = e.item(0)\n else if (e.length) result = result.concat(arrayify(e))\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n } catch (ex) { }\n return selectNonNative(selector, root)\n }\n // no native selector support\n , selectNonNative = function (selector, root) {\n var result = [], items, m, i, l, r, ss\n selector = selector.replace(normalizr, '$1')\n if (m = selector.match(tagAndOrClass)) {\n r = classRegex(m[2])\n items = root[byTag](m[1] || '*')\n for (i = 0, l = items.length; i < l; i++) {\n if (r.test(items[i].className)) result[result.length] = items[i]\n }\n return result\n }\n // more complex selector, get `_qwery()` to do the work for us\n each(ss = selector.split(','), collectSelector(root, function (ctx, s, rewrite) {\n r = _qwery(s, ctx)\n for (i = 0, l = r.length; i < l; i++) {\n if (ctx[nodeType] === 9 || rewrite || isAncestor(r[i], root)) result[result.length] = r[i]\n }\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n }\n , configure = function (options) {\n // configNativeQSA: use fully-internal selector or native qSA where present\n if (typeof options[useNativeQSA] !== 'undefined')\n select = !options[useNativeQSA] ? selectNonNative : hasQSA ? selectQSA : selectNonNative\n }\n\n configure({ useNativeQSA: true })\n\n qwery.configure = configure\n qwery.uniq = uniq\n qwery.is = is\n qwery.pseudos = {}\n\n return qwery\n});\n\n/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.onDomReady = factory();\n }\n}(this, function() {\n\n 'use strict';\n\n var win = window,\n doc = win.document,\n docElem = doc.documentElement,\n\n LOAD = \"load\",\n FALSE = false,\n ONLOAD = \"on\"+LOAD,\n COMPLETE = \"complete\",\n READYSTATE = \"readyState\",\n ATTACHEVENT = \"attachEvent\",\n DETACHEVENT = \"detachEvent\",\n ADDEVENTLISTENER = \"addEventListener\",\n DOMCONTENTLOADED = \"DOMContentLoaded\",\n ONREADYSTATECHANGE = \"onreadystatechange\",\n REMOVEEVENTLISTENER = \"removeEventListener\",\n\n // W3C Event model\n w3c = ADDEVENTLISTENER in doc,\n top = FALSE,\n\n // isReady: Is the DOM ready to be used? Set to true once it occurs.\n isReady = FALSE,\n\n // Callbacks pending execution until DOM is ready\n callbacks = [];\n\n // Handle when the DOM is ready\n function ready( fn ) {\n if ( !isReady ) {\n\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return defer( ready );\n }\n\n // Remember that the DOM is ready\n isReady = true;\n\n // Execute all callbacks\n while ( fn = callbacks.shift() ) {\n defer( fn );\n }\n }\n }\n\n // The ready event handler\n function completed( event ) {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n detach();\n ready();\n }\n }\n\n // Clean-up method for dom ready events\n function detach() {\n if ( w3c ) {\n doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );\n } else {\n doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );\n win[DETACHEVENT]( ONLOAD, completed );\n }\n }\n\n // Defers a function, scheduling it to run after the current call stack has cleared.\n function defer( fn, wait ) {\n // Allow 0 to be passed\n setTimeout( fn, +wait >= 0 ? wait : 1 );\n }\n\n // Attach the listeners:\n\n // Catch cases where onDomReady is called after the browser event has already occurred.\n // we once tried to use readyState \"interactive\" here, but it caused issues like the one\n // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n if ( doc[READYSTATE] === COMPLETE ) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n defer( ready );\n\n // Standards-based browsers support DOMContentLoaded\n } else if ( w3c ) {\n // Use the handy event callback\n doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n\n // A fallback to window.onload, that will always work\n win[ADDEVENTLISTENER]( LOAD, completed, FALSE );\n\n // If IE event model is used\n } else {\n // Ensure firing before onload, maybe late but safe also for iframes\n doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );\n\n // A fallback to window.onload, that will always work\n win[ATTACHEVENT]( ONLOAD, completed );\n\n // If IE and not a frame\n // continually check to see if the document is ready\n try {\n top = win.frameElement == null && docElem;\n } catch(e) {}\n\n if ( top && top.doScroll ) {\n (function doScrollCheck() {\n if ( !isReady ) {\n try {\n // Use the trick by Diego Perini\n // http://javascript.nwbox.com/IEContentLoaded/\n top.doScroll(\"left\");\n } catch(e) {\n return defer( doScrollCheck, 50 );\n }\n\n // detach all dom ready events\n detach();\n\n // and execute any waiting functions\n ready();\n }\n })();\n }\n }\n\n function onDomReady( fn ) {\n // If DOM is ready, execute the function (async), otherwise wait\n isReady ? defer( fn ) : callbacks.push( fn );\n }\n\n // Add version\n onDomReady.version = \"1.4.0\";\n // Add method to check if DOM is ready\n onDomReady.isReady = function(){\n return isReady;\n };\n\n return onDomReady;\n}));\n\n\n\n}).apply(okanjo);\n\n/* jshint ignore:end */\n//noinspection ThisExpressionReferencesGlobalObjectJS\n(function(okanjo, window) {\n\n\n function OkanjoMetrics() {\n\n this.default_channel = this.channel.external;\n\n this._queue = [];\n\n // Generate a page id\n this.pageId = okanjo.util.shortid();\n\n var pageArgs = okanjo.util.getPageArguments(true),\n urlSid = pageArgs[this.msid_key],\n cookieSid = okanjo.Cookie.get(this.msid_key),\n sourceContext = pageArgs[this.source_cx],\n sourceChannel = pageArgs[this.source_ch];\n\n // If for some reason, both are set, replace the cookie with the uri value (# CORRELATION)\n if (urlSid && cookieSid && urlSid != cookieSid) {\n this.trackEvent(this.object_type.metric_session, this.event_type.correlation, {\n id: urlSid+\"_\"+cookieSid,\n ch: this.default_channel,\n _noProcess: true\n });\n okanjo.Cookie.set(this.msid_key, urlSid, this.msid_ttl);\n }\n\n this.sid = urlSid || cookieSid || null;\n this.sourceCh = sourceChannel || null;\n this.sourceCx = sourceContext || null;\n\n this._lastKey = undefined;\n }\n\n OkanjoMetrics.prototype = {\n\n msid_key: \"ok_msid\",\n source_cx: \"ok_cx\",\n source_ch: \"ok_ch\",\n msid_ttl: 1460,\n\n strip_meta: ['key','callback','metrics_channel_context','metrics_context','mode'],\n\n constructor: OkanjoMetrics,\n\n event_type: {\n view: 'vw',\n impression: 'imp',\n interaction: 'int',\n correlation: 'cor'\n },\n\n\n action: {\n click: \"click\",\n inline_click: \"inline_click\"\n },\n\n\n object_type: {\n thirdparty_ad: 'ta',\n cart: 'ct',\n page: 'pg',\n widget: 'wg',\n product: 'pr',\n store: 'st',\n cause: 'ca',\n marketplace: 'mp',\n order: 'or',\n order_item: 'oi',\n user: 'ur',\n metric_session: 'mt'\n },\n\n\n channel: {\n product_widget: 'pw',\n ad_widget: 'aw',\n store_widget: 'sw',\n marketplace: 'mp',\n external: 'ex'\n },\n\n\n environment: {\n live: \"live\",\n testing: \"testing\"\n },\n\n\n /**\n * Reports an event\n * @param {string} object_type\n * @param {string} event_type\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} data\n * @param callback\n */\n trackEvent: function(object_type, event_type, data, callback) {\n\n data = data || {};\n data.object_type = object_type;\n data.event_type = event_type;\n\n // Make the key stick in case future events don't have an API key, we can get a fuzzy idea who's responsible for the event\n // This is also useful for auto page load events, were there is no key defined at time the event was created\n this._lastKey = data.key || data.key || (data.m && data.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Queue the event for publishing\n this.push(data, callback);\n },\n\n\n /**\n * Reports a page view\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} [data]\n * @param callback\n */\n trackPageView: function(data, callback) {\n\n data = data || {};\n\n // Set the current page URL as the object id\n data.id = data.id || window.location.href;\n\n // Set the context to external unless instructed otherwise\n data.ch = data.ch || this.default_channel;\n\n // Track the event\n this.trackEvent(this.object_type.page, this.event_type.view, data, callback);\n },\n\n\n /**\n * Sends an event\n * @param event\n * @param callback\n */\n track: function(event, callback) {\n\n if (!event || typeof event !== \"object\") { console.warn('[Okanjo.Metrics] event object data required'); return; }\n if (!event.object_type) { console.warn('[Okanjo.Metrics] object_type required'); return; }\n if (!event.event_type) { console.warn('[Okanjo.Metrics] event_type required'); return; }\n\n var object_type = event.object_type,\n event_type = event.event_type;\n\n delete event.object_type;\n delete event.event_type;\n\n this.normalizeEventData(event);\n\n okanjo.exec(okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }), event, function(err, res) {\n if (err) { console.warn('[Okanjo.Metrics] Reporting failed', err, res); }\n\n /*jslint -W030 */\n callback && (callback(err, res));\n });\n\n },\n\n /**\n * Normalizes event data for consistency and adds common information to the event\n * @param event\n */\n normalizeEventData: function(event) {\n\n // Stick the key in there, if not already set\n event.key = event.key || (event.m && event.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Stick the publisher session token in there too, if present\n if (this.sid) {\n event.sid = this.sid;\n }\n\n // Clone the metadata, since it might be a direct reference to a widget property\n // Deleting properties on the meta object could be very destructive\n if (event.m) {\n var meta = {};\n for(var i in event.m) {\n if (event.m.hasOwnProperty(i) && this.strip_meta.indexOf(i) < 0) {\n meta[i] = event.m[i];\n }\n }\n event.m = meta;\n } else {\n event.m = {};\n }\n\n\n // If we were referred through a particular channel/context, then hold on to that for events emitted by this page\n if (this.sourceCh || this.sourceCx) {\n if (this.sourceCh) { event.m.ref_ch = this.sourceCh; }\n if (this.sourceCx) { event.m.ref_cx = this.sourceCx; }\n }\n\n // Automatically attach page load id\n event.m.pgid = this.pageId;\n\n // Automatically attach JS build version\n event.m.ok_ver = okanjo.version;\n\n // Pass the page's source reference\n if (document.referrer) {\n event.ref = document.referrer;\n }\n },\n\n\n ///**\n // * Generates the full URL to execute to track the metric. Useful for page redirection instead of straight tracking\n // * @param object_type\n // * @param event_type\n // * @param data\n // * @return {*}\n // */\n //getMetricUrl: function(object_type, event_type, data) {\n // return okanjo.JSONP.makeUrl({\n // url: okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }),\n // data: data\n // });\n //},\n\n\n /**\n * Update the metric sid to live for 4 years if not present\n * @param sid\n */\n updateSid: function(sid) {\n if (!this.sid && sid) {\n this.sid = sid;\n okanjo.Cookie.set(this.msid_key, sid, this.msid_ttl);\n }\n },\n\n\n /**\n * Queues an event for publishing\n * @param event\n * @param callback\n */\n push: function(event, callback) {\n this._queue.push({ event: event, callback: callback });\n\n // Start burning down the queue, unless the event says not to\n if (event._noProcess) {\n delete event._noProcess;\n } else {\n this._processQueue();\n }\n },\n\n\n /**\n * Processes the event queue\n * @private\n */\n _processQueue: function() {\n // If the queue is not already being processed, and there's stuff to process, continue sending them\n if (!this._processTimeout && this._queue.length > 0) {\n var self = this;\n this._processTimeout = setTimeout(function() {\n\n var item = self._queue.shift();\n if (item === undefined) {\n // Nothing in the queue, get outta here\n self._processTimeout = null;\n } else {\n // Track the item\n self.track(item.event, function(err, res) {\n\n // Update / Set the metric sid on the publisher\n if (res && res.data && res.data.sid) self.updateSid(res.data.sid);\n\n // When the item is done being tracked, iterate to the next metric then fire it's callback if set\n self._processTimeout = null;\n self._processQueue();\n /*jslint -W030 */\n item.callback && item.callback(err, res);\n });\n }\n\n }, 0);\n }\n },\n\n\n /**\n * Injects the elements box rectangle coordinates and page size into the given data object\n * @param element\n * @param [data]\n * @return {*|{}}\n */\n includeElementInfo: function(element, data) {\n\n var page = okanjo.util.getPageSize(),\n size = okanjo.util.getElementPosition(element);\n\n data = data || {};\n data.pw = page.w;\n data.ph = page.h;\n data.x1 = size.x1;\n data.y1 = size.y1;\n data.x2 = size.x2;\n data.y2 = size.y2;\n\n return data;\n },\n\n\n /**\n * Injects the viewport rectangle coordinates into the given data object\n * @param data\n * @return {*|{}}\n */\n includeViewportInfo: function(data) {\n\n var vp = okanjo.util.getViewportSize(),\n pos = okanjo.util.getScrollPosition();\n\n data = data || {};\n\n data.vx1 = pos.x;\n data.vy1 = pos.y;\n data.vx2 = data.vx1+vp.vw;\n data.vy2 = data.vy1+vp.vh;\n\n return data;\n },\n\n /**\n * Injects the event information into the given data object\n * @param event\n * @param data\n * @return {*|{}}\n */\n includeEventInfo: function(event, data) {\n var pos = okanjo.util.getEventPosition(event);\n data.ex = pos.ex;\n data.ey = pos.ey;\n return data;\n },\n\n /**\n * Copies a config object and another thing and flattens it\n * @param config\n * @param base\n * @return {{}|*}\n */\n copy: function(config, base) {\n return okanjo.util.flatten(okanjo.util.deepClone(config, base));\n },\n\n /**\n * Ensure that all parameters are less than the data limit\n * @param data\n * @return {*}\n */\n truncate: function(data) {\n for(var i in data) {\n if (data.hasOwnProperty(i) && typeof data[i] === \"string\") {\n data[i] = data[i].substr(0, 255);\n }\n }\n return data;\n }\n };\n\n okanjo.metrics = new OkanjoMetrics();\n\n})(okanjo, this);\n\nreturn okanjo;\n}));\n","/*\n\n Adaptation based on https://github.com/larryosborn/JSONP\n\n The MIT License (MIT)\n\n Copyright (c) 2014 Larry Osborn \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n */\n(function() {\n if(this.JSONP) { return; }\n var JSONP, computedUrl, encode, noop, objectToURI, makeUniqueCallback, head;\n\n encode = window.encodeURIComponent;\n\n noop = function() {\n return void 0;\n };\n\n computedUrl = function(params) {\n var url;\n url = params.url;\n url += params.url.indexOf('?') < 0 ? '?' : '&';\n url += objectToURI(params.data);\n return url;\n };\n\n makeUniqueCallback = function() {\n JSONP.requestCounter += 1;\n return (new Date()).getTime() + \"_\" + JSONP.requestCounter;\n };\n\n objectToURI = function(obj) {\n var data, key, value;\n data = [];\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (Array.isArray(value)) {\n var i = 0;\n for( ; i < value.length; i++ ) {\n data.push(encode(key) + '[]=' + encode(value[i]));\n }\n } else if (typeof value === \"object\") {\n // SINGLE DEPTH OBJECTS - no recursion\n for (var k in value) {\n if (value.hasOwnProperty(k)) {\n data.push(encode(key) + '['+encode(k)+']=' + encode(value[k]));\n }\n }\n } else {\n data.push(encode(key) + '=' + encode(value));\n }\n }\n }\n return data.join('&');\n };\n\n JSONP = function(options) {\n options = options ? options : {};\n var callback, done, params, script, timeoutHandle, removeCallback;\n params = {\n data: options.data || {},\n error: options.error || noop,\n success: options.success || noop,\n beforeSend: options.beforeSend || noop,\n complete: options.complete || noop,\n url: options.url || '',\n timeout: options.timeout || 30000\n };\n params.computedUrl = computedUrl(params);\n if (params.url.length === 0) {\n throw new Error('MissingUrl');\n }\n done = false;\n if (params.beforeSend({}, params) !== false) {\n //noinspection JSUnresolvedVariable\n callback = params.data[options.callbackName || 'callback'] = '_okanjo_jsonp_' + makeUniqueCallback();\n window[callback] = function(data) {\n\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n timeoutHandle = null;\n\n params.success(data, params);\n params.complete(data, params);\n removeCallback();\n };\n\n removeCallback = function() {\n try {\n return delete window[callback];\n } catch (_error) {\n window[callback] = void 0;\n return void 0;\n }\n };\n\n script = window.document.createElement('script');\n script.src = computedUrl(params);\n script.async = true;\n\n timeoutHandle = setTimeout(function() {\n timeoutHandle = null;\n var err = new Error(\"JSONP request did not respond in time!\");\n err.url = (script && script.src) || null;\n params.error(err);\n removeCallback();\n return params.complete(err, params);\n }, params.timeout);\n\n script.onerror = function(evt) {\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n params.error({\n url: script.src,\n event: evt\n });\n return params.complete({\n url: script.src,\n event: evt\n }, params);\n };\n\n script.onload = script.onreadystatechange = function() {\n if (!done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {\n done = true;\n script.onload = script.onreadystatechange = null;\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n //jshint -W093\n return script = null;\n //jshint +W093\n }\n };\n\n head = head || window.document.getElementsByTagName('head')[0] || window.document.documentElement;\n return head.insertBefore(script, head.firstChild);\n }\n };\n\n JSONP.requestCounter = 0;\n JSONP.makeUrl = computedUrl;\n JSONP.objectToURI = objectToURI;\n\n if ((typeof define !== \"undefined\" && define !== null) && define.amd) {\n define(function() {\n return JSONP;\n });\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = JSONP;\n } else {\n this.JSONP = JSONP;\n }\n\n}).call(okanjo);\n","// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\nif (!Object.keys) {\n Object.keys = (function() {\n 'use strict';\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n return function(obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }());\n}\n\n//// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\n//if (typeof Object.create != 'function') {\n// Object.create = (function() {\n// var Temp = function() {};\n// return function (prototype) {\n// if (arguments.length > 1) {\n// throw new Error('Second argument not supported');\n// }\n// if (typeof prototype != 'object') {\n// throw new TypeError('Argument must be an object');\n// }\n// Temp.prototype = prototype;\n// var result = new Temp();\n// Temp.prototype = null;\n// return result;\n// };\n// })();\n//}\n\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\nif (!Array.isArray) {\n Array.isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n };\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.14\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\n// Reference: http://es5.github.io/#x15.4.4.14\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function(searchElement, fromIndex) {\n\n var k;\n\n /* jshint ignore:start */\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) { //\n throw new TypeError('\"this\" is null or not defined');\n }\n /* jshint ignore:end */\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\nif (!Array.prototype.every) {\n Array.prototype.every = function(callbackfn, thisArg) {\n 'use strict';\n var T, k;\n\n // jshint -W041\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n // jshint +W041\n\n // 1. Let O be the result of calling ToObject passing the this\n // value as the argument.\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get internal method\n // of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.\n if (typeof callbackfn !== 'function') {\n throw new TypeError();\n }\n\n // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 1) {\n T = thisArg;\n }\n\n // 6. Let k be 0.\n k = 0;\n\n // 7. Repeat, while k < len\n while (k < len) {\n\n var kValue;\n\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the HasProperty internal\n // method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n if (k in O) {\n\n // i. Let kValue be the result of calling the Get internal method\n // of O with argument Pk.\n kValue = O[k];\n\n // ii. Let testResult be the result of calling the Call internal method\n // of callbackfn with T as the this value and argument list\n // containing kValue, k, and O.\n var testResult = callbackfn.call(T, kValue, k, O);\n\n // iii. If ToBoolean(testResult) is false, return false.\n if (!testResult) {\n return false;\n }\n }\n k++;\n }\n return true;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\nif (!Array.prototype.filter) {\n Array.prototype.filter = function(fun/*, thisArg*/) {\n 'use strict';\n\n if (this === void 0 || this === null) {\n throw new TypeError();\n }\n\n var t = Object(this),\n len = t.length >>> 0;\n\n if (typeof fun !== 'function') {\n throw new TypeError();\n }\n\n var res = [],\n thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t) {\n var val = t[i];\n\n // NOTE: Technically this should Object.defineProperty at\n // the next index, as push can be affected by\n // properties on Object.prototype and Array.prototype.\n // But that method's new, and collisions should be\n // rare, so use the more-compatible alternative.\n if (fun.call(thisArg, val, i, t)) {\n res.push(val);\n }\n }\n }\n\n return res;\n };\n}\n\n// Doesn't work in IE7 so it's only here for reference\n//https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n(function() {\n if (!Event.prototype.preventDefault) {\n Event.prototype.preventDefault=function() {\n //noinspection JSUnusedGlobalSymbols\n this.returnValue=false;\n };\n }\n if (!Event.prototype.stopPropagation) {\n Event.prototype.stopPropagation=function() {\n //noinspection JSUnusedGlobalSymbols\n this.cancelBubble=true;\n };\n }\n if (!Element.prototype.addEventListener) {\n var eventListeners=[];\n\n var addEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var self=this;\n var wrapper=function(e) {\n e.target=e.srcElement;\n e.currentTarget=self;\n if (listener.handleEvent) {\n listener.handleEvent(e);\n } else {\n listener.call(self,e);\n }\n };\n if (type==\"DOMContentLoaded\") {\n var wrapper2=function(e) {\n if (document.readyState==\"complete\") {\n wrapper(e);\n }\n };\n document.attachEvent(\"onreadystatechange\",wrapper2);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper2});\n\n if (document.readyState==\"complete\") {\n //noinspection JSClosureCompilerSyntax\n var e=new Event();\n e.srcElement=window;\n wrapper2(e);\n }\n } else {\n this.attachEvent(\"on\"+type,wrapper);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper});\n }\n };\n var removeEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var counter=0;\n while (counter~+]/\n , normalizr = /^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g\n , splitters = /[\\s\\>\\+\\~]/\n , splittersMore = /(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/\n , specialChars = /([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g\n , simple = /^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/\n , attr = /\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/\n , pseudo = /:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/\n , easy = new RegExp(idOnly.source + '|' + tagOnly.source + '|' + classOnly.source)\n , dividers = new RegExp('(' + splitters.source + ')' + splittersMore.source, 'g')\n , tokenizr = new RegExp(splitters.source + splittersMore.source)\n , chunker = new RegExp(simple.source + '(' + attr.source + ')?' + '(' + pseudo.source + ')?')\n\n var walker = {\n ' ': function (node) {\n return node && node !== html && node.parentNode\n }\n , '>': function (node, contestant) {\n return node && node.parentNode == contestant.parentNode && node.parentNode\n }\n , '~': function (node) {\n return node && node.previousSibling\n }\n , '+': function (node, contestant, p1, p2) {\n if (!node) return false\n return (p1 = previous(node)) && (p2 = previous(contestant)) && p1 == p2 && p1\n }\n }\n\n function cache() {\n this.c = {}\n }\n cache.prototype = {\n g: function (k) {\n return this.c[k] || undefined\n }\n , s: function (k, v, r) {\n v = r ? new RegExp(v) : v\n return (this.c[k] = v)\n }\n }\n\n var classCache = new cache()\n , cleanCache = new cache()\n , attrCache = new cache()\n , tokenCache = new cache()\n\n function classRegex(c) {\n return classCache.g(c) || classCache.s(c, '(^|\\\\s+)' + c + '(\\\\s+|$)', 1)\n }\n\n // not quite as fast as inline loops in older browsers so don't use liberally\n function each(a, fn) {\n var i = 0, l = a.length\n for (; i < l; i++) fn(a[i])\n }\n\n function flatten(ar) {\n for (var r = [], i = 0, l = ar.length; i < l; ++i) arrayLike(ar[i]) ? (r = r.concat(ar[i])) : (r[r.length] = ar[i])\n return r\n }\n\n function arrayify(ar) {\n var i = 0, l = ar.length, r = []\n for (; i < l; i++) r[i] = ar[i]\n return r\n }\n\n function previous(n) {\n while (n = n.previousSibling) if (n[nodeType] == 1) break;\n return n\n }\n\n function q(query) {\n return query.match(chunker)\n }\n\n // called using `this` as element and arguments from regex group results.\n // given => div.hello[title=\"world\"]:foo('bar')\n // div.hello[title=\"world\"]:foo('bar'), div, .hello, [title=\"world\"], title, =, world, :foo('bar'), foo, ('bar'), bar]\n function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {\n var i, m, k, o, classes\n if (this[nodeType] !== 1) return false\n if (tag && tag !== '*' && this[tagName] && this[tagName].toLowerCase() !== tag) return false\n if (idsAndClasses && (m = idsAndClasses.match(id)) && m[1] !== this.id) return false\n if (idsAndClasses && (classes = idsAndClasses.match(clas))) {\n for (i = classes.length; i--;) if (!classRegex(classes[i].slice(1)).test(this.className)) return false\n }\n if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) return false\n if (wholeAttribute && !value) { // select is just for existance of attrib\n o = this.attributes\n for (k in o) {\n if (Object.prototype.hasOwnProperty.call(o, k) && (o[k].name || k) == attribute) {\n return this\n }\n }\n }\n if (wholeAttribute && !checkAttr(qualifier, getAttr(this, attribute) || '', value)) {\n // select is for attrib equality\n return false\n }\n return this\n }\n\n function clean(s) {\n return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\\\$1'))\n }\n\n function checkAttr(qualify, actual, val) {\n switch (qualify) {\n case '=':\n return actual == val\n case '^=':\n return actual.match(attrCache.g('^=' + val) || attrCache.s('^=' + val, '^' + clean(val), 1))\n case '$=':\n return actual.match(attrCache.g('$=' + val) || attrCache.s('$=' + val, clean(val) + '$', 1))\n case '*=':\n return actual.match(attrCache.g(val) || attrCache.s(val, clean(val), 1))\n case '~=':\n return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, '(?:^|\\\\s+)' + clean(val) + '(?:\\\\s+|$)', 1))\n case '|=':\n return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, '^' + clean(val) + '(-|$)', 1))\n }\n return 0\n }\n\n // given a selector, first check for simple cases then collect all base candidate matches and filter\n function _qwery(selector, _root) {\n var r = [], ret = [], i, l, m, token, tag, els, intr, item, root = _root\n , tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n , dividedTokens = selector.match(dividers)\n\n if (!tokens.length) return r\n\n token = (tokens = tokens.slice(0)).pop() // copy cached tokens, take the last one\n if (tokens.length && (m = tokens[tokens.length - 1].match(idOnly))) root = byId(_root, m[1])\n if (!root) return r\n\n intr = q(token)\n // collect base candidates to filter\n els = root !== _root && root[nodeType] !== 9 && dividedTokens && /^[+~]$/.test(dividedTokens[dividedTokens.length - 1]) ?\n function (r) {\n while (root = root.nextSibling) {\n root[nodeType] == 1 && (intr[1] ? intr[1] == root[tagName].toLowerCase() : 1) && (r[r.length] = root)\n }\n return r\n }([]) :\n root[byTag](intr[1] || '*')\n // filter elements according to the right-most part of the selector\n for (i = 0, l = els.length; i < l; i++) {\n if (item = interpret.apply(els[i], intr)) r[r.length] = item\n }\n if (!tokens.length) return r\n\n // filter further according to the rest of the selector (the left side)\n each(r, function (e) { if (ancestorMatch(e, tokens, dividedTokens)) ret[ret.length] = e })\n return ret\n }\n\n // compare element to a selector\n function is(el, selector, root) {\n if (isNode(selector)) return el == selector\n if (arrayLike(selector)) return !!~flatten(selector).indexOf(el) // if selector is an array, is el a member?\n\n var selectors = selector.split(','), tokens, dividedTokens\n while (selector = selectors.pop()) {\n tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n dividedTokens = selector.match(dividers)\n tokens = tokens.slice(0) // copy array\n if (interpret.apply(el, q(tokens.pop())) && (!tokens.length || ancestorMatch(el, tokens, dividedTokens, root))) {\n return true\n }\n }\n return false\n }\n\n // given elements matching the right-most part of a selector, filter out any that don't match the rest\n function ancestorMatch(el, tokens, dividedTokens, root) {\n var cand\n // recursively work backwards through the tokens and up the dom, covering all options\n function crawl(e, i, p) {\n while (p = walker[dividedTokens[i]](p, e)) {\n if (isNode(p) && (interpret.apply(p, q(tokens[i])))) {\n if (i) {\n if (cand = crawl(p, i - 1, p)) return cand\n } else return p\n }\n }\n }\n return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))\n }\n\n function isNode(el, t) {\n return el && typeof el === 'object' && (t = el[nodeType]) && (t == 1 || t == 9)\n }\n\n function uniq(ar) {\n var a = [], i, j;\n o:\n for (i = 0; i < ar.length; ++i) {\n for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o\n a[a.length] = ar[i]\n }\n return a\n }\n\n function arrayLike(o) {\n return (typeof o === 'object' && isFinite(o.length))\n }\n\n function normalizeRoot(root) {\n if (!root) return doc\n if (typeof root == 'string') return qwery(root)[0]\n if (!root[nodeType] && arrayLike(root)) return root[0]\n return root\n }\n\n function byId(root, id, el) {\n // if doc, query on it, else query the parent doc or if a detached fragment rewrite the query and run on the fragment\n return root[nodeType] === 9 ? root.getElementById(id) :\n root.ownerDocument &&\n (((el = root.ownerDocument.getElementById(id)) && isAncestor(el, root) && el) ||\n (!isAncestor(root, root.ownerDocument) && select('[id=\"' + id + '\"]', root)[0]))\n }\n\n function qwery(selector, _root) {\n var m, el, root = normalizeRoot(_root)\n\n // easy, fast cases that we can dispatch with simple DOM calls\n if (!root || !selector) return []\n if (selector === window || isNode(selector)) {\n return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : []\n }\n if (selector && arrayLike(selector)) return flatten(selector)\n if (m = selector.match(easy)) {\n if (m[1]) return (el = byId(root, m[1])) ? [el] : []\n if (m[2]) return arrayify(root[byTag](m[2]))\n if (hasByClass && m[3]) return arrayify(root[byClass](m[3]))\n }\n\n return select(selector, root)\n }\n\n // where the root is not document and a relationship selector is first we have to\n // do some awkward adjustments to get it to work, even with qSA\n function collectSelector(root, collector) {\n return function (s) {\n var oid, nid\n if (splittable.test(s)) {\n if (root[nodeType] !== 9) {\n // make sure the el has an id, rewrite the query, set root to doc and run it\n if (!(nid = oid = root.getAttribute('id'))) root.setAttribute('id', nid = '__qwerymeupscotty')\n s = '[id=\"' + nid + '\"]' + s // avoid byId and allow us to match context element\n collector(root.parentNode || root, s, true)\n oid || root.removeAttribute('id')\n }\n return;\n }\n s.length && collector(root, s, false)\n }\n }\n\n var isAncestor = 'compareDocumentPosition' in html ?\n function (element, container) {\n return (container.compareDocumentPosition(element) & 16) == 16\n } : 'contains' in html ?\n function (element, container) {\n container = container[nodeType] === 9 || container == window ? html : container\n return container !== element && container.contains(element)\n } :\n function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , getAttr = function () {\n // detect buggy IE src/href getAttribute() call\n var e = doc.createElement('p')\n return ((e.innerHTML = 'x') && e.firstChild.getAttribute('href') != '#x') ?\n function (e, a) {\n return a === 'class' ? e.className : (a === 'href' || a === 'src') ?\n e.getAttribute(a, 2) : e.getAttribute(a)\n } :\n function (e, a) { return e.getAttribute(a) }\n }()\n , hasByClass = !!doc[byClass]\n // has native qSA support\n , hasQSA = doc.querySelector && doc[qSA]\n // use native qSA\n , selectQSA = function (selector, root) {\n var result = [], ss, e\n try {\n if (root[nodeType] === 9 || !splittable.test(selector)) {\n // most work is done right here, defer to qSA\n return arrayify(root[qSA](selector))\n }\n // special case where we need the services of `collectSelector()`\n each(ss = selector.split(','), collectSelector(root, function (ctx, s) {\n e = ctx[qSA](s)\n if (e.length == 1) result[result.length] = e.item(0)\n else if (e.length) result = result.concat(arrayify(e))\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n } catch (ex) { }\n return selectNonNative(selector, root)\n }\n // no native selector support\n , selectNonNative = function (selector, root) {\n var result = [], items, m, i, l, r, ss\n selector = selector.replace(normalizr, '$1')\n if (m = selector.match(tagAndOrClass)) {\n r = classRegex(m[2])\n items = root[byTag](m[1] || '*')\n for (i = 0, l = items.length; i < l; i++) {\n if (r.test(items[i].className)) result[result.length] = items[i]\n }\n return result\n }\n // more complex selector, get `_qwery()` to do the work for us\n each(ss = selector.split(','), collectSelector(root, function (ctx, s, rewrite) {\n r = _qwery(s, ctx)\n for (i = 0, l = r.length; i < l; i++) {\n if (ctx[nodeType] === 9 || rewrite || isAncestor(r[i], root)) result[result.length] = r[i]\n }\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n }\n , configure = function (options) {\n // configNativeQSA: use fully-internal selector or native qSA where present\n if (typeof options[useNativeQSA] !== 'undefined')\n select = !options[useNativeQSA] ? selectNonNative : hasQSA ? selectQSA : selectNonNative\n }\n\n configure({ useNativeQSA: true })\n\n qwery.configure = configure\n qwery.uniq = uniq\n qwery.is = is\n qwery.pseudos = {}\n\n return qwery\n});\n\n/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.onDomReady = factory();\n }\n}(this, function() {\n\n 'use strict';\n\n var win = window,\n doc = win.document,\n docElem = doc.documentElement,\n\n LOAD = \"load\",\n FALSE = false,\n ONLOAD = \"on\"+LOAD,\n COMPLETE = \"complete\",\n READYSTATE = \"readyState\",\n ATTACHEVENT = \"attachEvent\",\n DETACHEVENT = \"detachEvent\",\n ADDEVENTLISTENER = \"addEventListener\",\n DOMCONTENTLOADED = \"DOMContentLoaded\",\n ONREADYSTATECHANGE = \"onreadystatechange\",\n REMOVEEVENTLISTENER = \"removeEventListener\",\n\n // W3C Event model\n w3c = ADDEVENTLISTENER in doc,\n top = FALSE,\n\n // isReady: Is the DOM ready to be used? Set to true once it occurs.\n isReady = FALSE,\n\n // Callbacks pending execution until DOM is ready\n callbacks = [];\n\n // Handle when the DOM is ready\n function ready( fn ) {\n if ( !isReady ) {\n\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return defer( ready );\n }\n\n // Remember that the DOM is ready\n isReady = true;\n\n // Execute all callbacks\n while ( fn = callbacks.shift() ) {\n defer( fn );\n }\n }\n }\n\n // The ready event handler\n function completed( event ) {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n detach();\n ready();\n }\n }\n\n // Clean-up method for dom ready events\n function detach() {\n if ( w3c ) {\n doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );\n } else {\n doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );\n win[DETACHEVENT]( ONLOAD, completed );\n }\n }\n\n // Defers a function, scheduling it to run after the current call stack has cleared.\n function defer( fn, wait ) {\n // Allow 0 to be passed\n setTimeout( fn, +wait >= 0 ? wait : 1 );\n }\n\n // Attach the listeners:\n\n // Catch cases where onDomReady is called after the browser event has already occurred.\n // we once tried to use readyState \"interactive\" here, but it caused issues like the one\n // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n if ( doc[READYSTATE] === COMPLETE ) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n defer( ready );\n\n // Standards-based browsers support DOMContentLoaded\n } else if ( w3c ) {\n // Use the handy event callback\n doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n\n // A fallback to window.onload, that will always work\n win[ADDEVENTLISTENER]( LOAD, completed, FALSE );\n\n // If IE event model is used\n } else {\n // Ensure firing before onload, maybe late but safe also for iframes\n doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );\n\n // A fallback to window.onload, that will always work\n win[ATTACHEVENT]( ONLOAD, completed );\n\n // If IE and not a frame\n // continually check to see if the document is ready\n try {\n top = win.frameElement == null && docElem;\n } catch(e) {}\n\n if ( top && top.doScroll ) {\n (function doScrollCheck() {\n if ( !isReady ) {\n try {\n // Use the trick by Diego Perini\n // http://javascript.nwbox.com/IEContentLoaded/\n top.doScroll(\"left\");\n } catch(e) {\n return defer( doScrollCheck, 50 );\n }\n\n // detach all dom ready events\n detach();\n\n // and execute any waiting functions\n ready();\n }\n })();\n }\n }\n\n function onDomReady( fn ) {\n // If DOM is ready, execute the function (async), otherwise wait\n isReady ? defer( fn ) : callbacks.push( fn );\n }\n\n // Add version\n onDomReady.version = \"1.4.0\";\n // Add method to check if DOM is ready\n onDomReady.isReady = function(){\n return isReady;\n };\n\n return onDomReady;\n}));\n\n\n\n}).apply(okanjo);\n\n/* jshint ignore:end */","//noinspection ThisExpressionReferencesGlobalObjectJS\n(function(okanjo, window) {\n\n\n function OkanjoMetrics() {\n\n this.default_channel = this.channel.external;\n\n this._queue = [];\n\n // Generate a page id\n this.pageId = okanjo.util.shortid();\n\n var pageArgs = okanjo.util.getPageArguments(true),\n urlSid = pageArgs[this.msid_key],\n cookieSid = okanjo.Cookie.get(this.msid_key),\n sourceContext = pageArgs[this.source_cx],\n sourceChannel = pageArgs[this.source_ch];\n\n // If for some reason, both are set, replace the cookie with the uri value (# CORRELATION)\n if (urlSid && cookieSid && urlSid != cookieSid) {\n this.trackEvent(this.object_type.metric_session, this.event_type.correlation, {\n id: urlSid+\"_\"+cookieSid,\n ch: this.default_channel,\n _noProcess: true\n });\n okanjo.Cookie.set(this.msid_key, urlSid, this.msid_ttl);\n }\n\n this.sid = urlSid || cookieSid || null;\n this.sourceCh = sourceChannel || null;\n this.sourceCx = sourceContext || null;\n\n this._lastKey = undefined;\n }\n\n OkanjoMetrics.prototype = {\n\n msid_key: \"ok_msid\",\n source_cx: \"ok_cx\",\n source_ch: \"ok_ch\",\n msid_ttl: 1460,\n\n strip_meta: ['key','callback','metrics_channel_context','metrics_context','mode'],\n\n constructor: OkanjoMetrics,\n\n event_type: {\n view: 'vw',\n impression: 'imp',\n interaction: 'int',\n correlation: 'cor'\n },\n\n\n action: {\n click: \"click\",\n inline_click: \"inline_click\"\n },\n\n\n object_type: {\n thirdparty_ad: 'ta',\n cart: 'ct',\n page: 'pg',\n widget: 'wg',\n product: 'pr',\n store: 'st',\n cause: 'ca',\n marketplace: 'mp',\n order: 'or',\n order_item: 'oi',\n user: 'ur',\n metric_session: 'mt'\n },\n\n\n channel: {\n product_widget: 'pw',\n ad_widget: 'aw',\n store_widget: 'sw',\n marketplace: 'mp',\n external: 'ex'\n },\n\n\n environment: {\n live: \"live\",\n testing: \"testing\"\n },\n\n\n /**\n * Reports an event\n * @param {string} object_type\n * @param {string} event_type\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} data\n * @param callback\n */\n trackEvent: function(object_type, event_type, data, callback) {\n\n data = data || {};\n data.object_type = object_type;\n data.event_type = event_type;\n\n // Make the key stick in case future events don't have an API key, we can get a fuzzy idea who's responsible for the event\n // This is also useful for auto page load events, were there is no key defined at time the event was created\n this._lastKey = data.key || data.key || (data.m && data.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Queue the event for publishing\n this.push(data, callback);\n },\n\n\n /**\n * Reports a page view\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} [data]\n * @param callback\n */\n trackPageView: function(data, callback) {\n\n data = data || {};\n\n // Set the current page URL as the object id\n data.id = data.id || window.location.href;\n\n // Set the context to external unless instructed otherwise\n data.ch = data.ch || this.default_channel;\n\n // Track the event\n this.trackEvent(this.object_type.page, this.event_type.view, data, callback);\n },\n\n\n /**\n * Sends an event\n * @param event\n * @param callback\n */\n track: function(event, callback) {\n\n if (!event || typeof event !== \"object\") { console.warn('[Okanjo.Metrics] event object data required'); return; }\n if (!event.object_type) { console.warn('[Okanjo.Metrics] object_type required'); return; }\n if (!event.event_type) { console.warn('[Okanjo.Metrics] event_type required'); return; }\n\n var object_type = event.object_type,\n event_type = event.event_type;\n\n delete event.object_type;\n delete event.event_type;\n\n this.normalizeEventData(event);\n\n okanjo.exec(okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }), event, function(err, res) {\n if (err) { console.warn('[Okanjo.Metrics] Reporting failed', err, res); }\n\n /*jslint -W030 */\n callback && (callback(err, res));\n });\n\n },\n\n /**\n * Normalizes event data for consistency and adds common information to the event\n * @param event\n */\n normalizeEventData: function(event) {\n\n // Stick the key in there, if not already set\n event.key = event.key || (event.m && event.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Stick the publisher session token in there too, if present\n if (this.sid) {\n event.sid = this.sid;\n }\n\n // Clone the metadata, since it might be a direct reference to a widget property\n // Deleting properties on the meta object could be very destructive\n if (event.m) {\n var meta = {};\n for(var i in event.m) {\n if (event.m.hasOwnProperty(i) && this.strip_meta.indexOf(i) < 0) {\n meta[i] = event.m[i];\n }\n }\n event.m = meta;\n } else {\n event.m = {};\n }\n\n\n // If we were referred through a particular channel/context, then hold on to that for events emitted by this page\n if (this.sourceCh || this.sourceCx) {\n if (this.sourceCh) { event.m.ref_ch = this.sourceCh; }\n if (this.sourceCx) { event.m.ref_cx = this.sourceCx; }\n }\n\n // Automatically attach page load id\n event.m.pgid = this.pageId;\n\n // Automatically attach JS build version\n event.m.ok_ver = okanjo.version;\n\n // Pass the page's source reference\n if (document.referrer) {\n event.ref = document.referrer;\n }\n },\n\n\n ///**\n // * Generates the full URL to execute to track the metric. Useful for page redirection instead of straight tracking\n // * @param object_type\n // * @param event_type\n // * @param data\n // * @return {*}\n // */\n //getMetricUrl: function(object_type, event_type, data) {\n // return okanjo.JSONP.makeUrl({\n // url: okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }),\n // data: data\n // });\n //},\n\n\n /**\n * Update the metric sid to live for 4 years if not present\n * @param sid\n */\n updateSid: function(sid) {\n if (!this.sid && sid) {\n this.sid = sid;\n okanjo.Cookie.set(this.msid_key, sid, this.msid_ttl);\n }\n },\n\n\n /**\n * Queues an event for publishing\n * @param event\n * @param callback\n */\n push: function(event, callback) {\n this._queue.push({ event: event, callback: callback });\n\n // Start burning down the queue, unless the event says not to\n if (event._noProcess) {\n delete event._noProcess;\n } else {\n this._processQueue();\n }\n },\n\n\n /**\n * Processes the event queue\n * @private\n */\n _processQueue: function() {\n // If the queue is not already being processed, and there's stuff to process, continue sending them\n if (!this._processTimeout && this._queue.length > 0) {\n var self = this;\n this._processTimeout = setTimeout(function() {\n\n var item = self._queue.shift();\n if (item === undefined) {\n // Nothing in the queue, get outta here\n self._processTimeout = null;\n } else {\n // Track the item\n self.track(item.event, function(err, res) {\n\n // Update / Set the metric sid on the publisher\n if (res && res.data && res.data.sid) self.updateSid(res.data.sid);\n\n // When the item is done being tracked, iterate to the next metric then fire it's callback if set\n self._processTimeout = null;\n self._processQueue();\n /*jslint -W030 */\n item.callback && item.callback(err, res);\n });\n }\n\n }, 0);\n }\n },\n\n\n /**\n * Injects the elements box rectangle coordinates and page size into the given data object\n * @param element\n * @param [data]\n * @return {*|{}}\n */\n includeElementInfo: function(element, data) {\n\n var page = okanjo.util.getPageSize(),\n size = okanjo.util.getElementPosition(element);\n\n data = data || {};\n data.pw = page.w;\n data.ph = page.h;\n data.x1 = size.x1;\n data.y1 = size.y1;\n data.x2 = size.x2;\n data.y2 = size.y2;\n\n return data;\n },\n\n\n /**\n * Injects the viewport rectangle coordinates into the given data object\n * @param data\n * @return {*|{}}\n */\n includeViewportInfo: function(data) {\n\n var vp = okanjo.util.getViewportSize(),\n pos = okanjo.util.getScrollPosition();\n\n data = data || {};\n\n data.vx1 = pos.x;\n data.vy1 = pos.y;\n data.vx2 = data.vx1+vp.vw;\n data.vy2 = data.vy1+vp.vh;\n\n return data;\n },\n\n /**\n * Injects the event information into the given data object\n * @param event\n * @param data\n * @return {*|{}}\n */\n includeEventInfo: function(event, data) {\n var pos = okanjo.util.getEventPosition(event);\n data.ex = pos.ex;\n data.ey = pos.ey;\n return data;\n },\n\n /**\n * Copies a config object and another thing and flattens it\n * @param config\n * @param base\n * @return {{}|*}\n */\n copy: function(config, base) {\n return okanjo.util.flatten(okanjo.util.deepClone(config, base));\n },\n\n /**\n * Ensure that all parameters are less than the data limit\n * @param data\n * @return {*}\n */\n truncate: function(data) {\n for(var i in data) {\n if (data.hasOwnProperty(i) && typeof data[i] === \"string\") {\n data[i] = data[i].substr(0, 255);\n }\n }\n return data;\n }\n };\n\n okanjo.metrics = new OkanjoMetrics();\n\n})(okanjo, this);\n"],"sourceRoot":"./"} \ No newline at end of file +{"version":3,"sources":["core.js","config.js","okanjo-metrics.js","jsonp.js","ie.js","console.js","cache.js","cookie.js","json2.js","vendor-metrics.js","metrics.js"],"names":["root","factory","define","amd","exports","module","okanjo","this","ok","splitArguments","query","temp","key","value","eqIndex","params","ampSplit","split","i","length","indexOf","decodeURIComponent","substring","e","console","error","supportPageOffset","undefined","window","pageXOffset","isCSS1Compatible","document","compatMode","agent","navigator","userAgent","noop","version","qwery","metrics","trackEvent","trackPageView","routes","products","products_id","products_sense","getRoute","route","hasOwnProperty","replace","config","ads","apiUri","exec","url","data","callback","JSONP","err","statusCode","message","report","Error","success","res","context","mixed","util","trim","val","empty","clone","obj","k","hash","str","char","charCodeAt","toString","element","attrs","attributes","name","substr","copyIfSet","target","source","targetKey","sourceKey","options","doCopy","stripEmpty","Array","isArray","copyIfSetMap","map","keys","Object","inherits","ctor","superCtor","create","super_","prototype","constructor","enumerable","writable","configurable","TempCtor","getScrollPosition","x","documentElement","scrollLeft","body","y","pageYOffset","scrollTop","getElementSize","el","includeMargin","style","size","height","offsetHeight","width","offsetWidth","currentStyle","getComputedStyle","parseInt","marginTop","marginBottom","marginLeft","marginRight","getElementPosition","rect","pos","errMsg","getBoundingClientRect","contains","warn","x1","left","y1","top","x2","right","y2","bottom","getPageSize","html","w","Math","max","scrollWidth","clientWidth","h","scrollHeight","clientHeight","getViewportSize","doc","win","inWidth","innerWidth","inHeight","innerHeight","mobileZoom","vw","vh","getEventPosition","ex","pageX","ey","pageY","clientX","clientY","ellipsify","container","parent","parentNode","targetHeight","useTextContent","textContent","text","innerText","replacedText","safety","replacer","match","content","createElement","span","setAttribute","innerHTML","appendChild","detectClasses","classDetects","appVersion","push","isFramed","self","isiOS","test","isAndroid","isMobile","getPageArguments","includeHashArguments","queryArgs","location","search","hashArgs","deepClone","out","flatten","flatObject","toReturn","shortid","clusterWorkerId","counter","previousSeconds","shuffled","crypto","require","msCrypto","randomByte","randomBytes","getRandomValues","floor","random","dest","Uint8Array","encode","number","done","loopCounter","pow","REDUCE_TIME","seconds","Date","getTime","marketplace","uri","routerUri","balancedMarketplacePath","socketIOUri","configure","every","computedUrl","objectToURI","makeUniqueCallback","head","encodeURIComponent","requestCounter","join","script","timeoutHandle","removeCallback","beforeSend","complete","timeout","callbackName","clearTimeout","_error","src","async","setTimeout","onerror","evt","event","onload","onreadystatechange","readyState","removeChild","getElementsByTagName","insertBefore","firstChild","makeUrl","call","hasDontEnumBug","propertyIsEnumerable","dontEnums","dontEnumsLength","TypeError","prop","result","arg","searchElement","fromIndex","O","len","n","abs","Infinity","callbackfn","thisArg","T","arguments","kValue","testResult","filter","fun","t","Event","preventDefault","returnValue","stopPropagation","cancelBubble","Element","addEventListener","eventListeners","type","listener","wrapper","srcElement","currentTarget","handleEvent","wrapper2","attachEvent","object","removeEventListener","eventListener","detachEvent","splice","HTMLDocument","Window","method","con","dummy","properties","methods","pop","c","isLocalStorageNameSupported","testKey","storage","sessionStorage","setItem","removeItem","OkanjoCache","localStorage","_data","_updateLen","id","String","getItem","clear","index","Cache","cookie","Cookie","set","cookieName","expireDays","expireDate","setDate","getDate","cookieValue","encodeURI","toUTCString","get","idx","nameTest","cookieArray","decodeURI","JSON","f","quote","string","escapable","lastIndex","a","meta","slice","holder","v","partial","mind","gap","toJSON","rep","isFinite","indent","apply","valueOf","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","Number","Boolean","cx","\b","\t","\n","\f","\r","\"","\\","stringify","space","","parse","reviver","walk","j","eval","SyntaxError","definition","cache","classRegex","classCache","g","s","each","fn","l","ar","r","arrayLike","concat","arrayify","previous","previousSibling","nodeType","q","chunker","interpret","whole","tag","idsAndClasses","wholeAttribute","attribute","qualifier","wholePseudo","pseudo","wholePseudoVal","pseudoVal","m","o","classes","tagName","toLowerCase","clas","className","pseudos","checkAttr","getAttr","clean","cleanCache","specialChars","qualify","actual","attrCache","_qwery","selector","_root","token","els","intr","item","ret","tokens","tokenCache","tokenizr","dividedTokens","dividers","idOnly","byId","nextSibling","byTag","ancestorMatch","is","isNode","selectors","crawl","p","walker","cand","isAncestor","uniq","normalizeRoot","getElementById","ownerDocument","select","easy","hasByClass","byClass","collectSelector","collector","oid","nid","splittable","getAttribute","removeAttribute","qSA","useNativeQSA","classOnly","tagOnly","tagAndOrClass","normalizr","splitters","splittersMore","simple","attr","RegExp"," ","node",">","contestant","~","+","p1","p2","compareDocumentPosition","hasQSA","querySelector","selectQSA","ss","ctx","selectNonNative","items","rewrite","onDomReady","ready","isReady","defer","callbacks","shift","completed","w3c","LOAD","READYSTATE","COMPLETE","detach","REMOVEEVENTLISTENER","DOMCONTENTLOADED","FALSE","DETACHEVENT","ONREADYSTATECHANGE","ONLOAD","wait","docElem","ATTACHEVENT","ADDEVENTLISTENER","frameElement","doScroll","doScrollCheck","OkanjoMetrics","default_channel","channel","external","_queue","pageId","pageArgs","urlSid","msid_key","cookieSid","sourceContext","source_cx","sourceChannel","source_ch","object_type","metric_session","event_type","correlation","ch","_noProcess","msid_ttl","sid","sourceCh","sourceCx","_lastKey","strip_meta","view","impression","interaction","action","click","inline_click","thirdparty_ad","cart","page","widget","product","store","cause","order","order_item","user","product_widget","ad_widget","store_widget","environment","live","testing","href","track","normalizeEventData","ref_ch","ref_cx","pgid","ok_ver","referrer","ref","updateSid","_processQueue","_processTimeout","includeElementInfo","pw","ph","includeViewportInfo","vp","vx1","vy1","vx2","vy2","includeEventInfo","copy","base","truncate"],"mappings":";CACA,SAAAA,EAAAC,GACA,kBAAAC,SA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**\n * index.js\n * @type {okanjo|*}\n */\n var okanjo = (function(ok) {\n\n\n //noinspection JSValidateTypes,JSUnusedGlobalSymbols\n var supportPageOffset = window.pageXOffset !== undefined,\n isCSS1Compatible = ((document.compatMode || \"\") === \"CSS1Compat\"),\n agent = window.navigator.userAgent,\n noop = function(){},\n okanjo = ok || {};\n\n // Override version with this version\n okanjo.version = \"%%OKANJO_VERSION\";\n\n // Override these later\n okanjo.qwery = noop;\n\n\n /**\n * Placeholder, just in case okanjo-js is built without metrics\n */\n okanjo.metrics = {\n trackEvent: noop,\n trackPageView: noop\n };\n\n /**\n * API route definitions\n */\n okanjo.routes = {\n products: '/products',\n products_id: '/products/:product_id',\n products_sense: '/products/sense',\n metrics: '/metrics/:object_type/:event_type'\n };\n\n\n /**\n * Compiles a route and parameters into a final URL\n * @param route – The route to use (e.g. okanjo.routes.products )\n * @param [params] - Optional route parameters\n * @returns {*}\n */\n okanjo.getRoute = function(route, params) {\n if (params) {\n for (var i in params) {\n if (params.hasOwnProperty(i)) {\n route = route.replace(\":\"+i, params[i] + \"\");\n }\n }\n }\n return okanjo.config.ads.apiUri + route;\n };\n\n\n /**\n * Execute a JSONP request\n * @param {string} url – Request URL\n * @param {*} data – Request data\n * @param {function(err:*, res:*)} callback – Closure to fire when completed\n */\n okanjo.exec = function(url, data, callback) {\n data = data || {};\n //noinspection JSUnresolvedFunction\n okanjo.JSONP({\n url: url,\n data: data,\n error: function(data) {\n var err = { statusCode: 500, error: \"Communication Error\", message: data.message || \"JSONP communication failure.\" };\n okanjo.report(\"core-jsonp\", data.error || new Error(err.message));\n callback(err, null);\n },\n success: function(data) {\n var err, res;\n if (data) {\n if (data.error) {\n err = data;\n } else {\n res = data;\n }\n } else {\n err = { statusCode: 500, error: \"Invalid Response\", message: \"Could not interpret the JSONP response.\"};\n okanjo.report('core-jsonp', new Error(err.message));\n }\n\n callback(err, res);\n }\n });\n };\n\n\n /**\n * Report a message or error back to Okanjo\n * @param {string} context – What module is responsible for emitting the error (e.g. Product)\n * @param {string|Error} mixed – The message or Error to report\n */\n okanjo.report = function(context, mixed) {\n // REPORT THIS BACK TO OKANJO!\n var error;\n if (typeof mixed === \"string\") {\n error = new Error('[Okanjo' + (context ? ' ' + context : '') + '] ' + mixed);\n } else if (typeof mixed === \"object\" && mixed instanceof Error) {\n error = mixed;\n }\n\n console.error(error);\n //TODO - integrate with Raven\n };\n\n /**\n * Utility functions\n */\n var util = okanjo.util = okanjo.util || {};\n\n\n /**\n * Trims leading and trailing whitespace on a string\n * @param val\n */\n util.trim = function(val) {\n return (val || \"\").replace(/^\\s+|\\s+$/g, '');\n };\n\n\n /**\n * Function to test whether the given var has a value\n * @param val - The var to check\n * @returns {boolean} - True when the var has value, false when it does not\n */\n util.empty = function (val) {\n return (val === null || val === undefined || (typeof val === \"string\" && util.trim(val) === \"\"));\n };\n\n /**\n * Helper to shallow clone an object so we don't ruin the top-level object reference\n * Note: If the shallow keys are objects, the references to the keyed objects will be maintained!\n *\n * @param {*} obj – Source object to copy\n * @returns {{}} – Shallow clone of the object\n */\n util.clone = function (obj) {\n var clone = {};\n obj = obj || {};\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n clone[k] = obj[k];\n }\n }\n return clone;\n };\n\n\n /**\n * Super simple hashing algorithm\n * @see http://jsperf.com/hashing-strings\n * @param str - String to hash\n * @returns {string}\n */\n util.hash = function(str) {\n var hash = 0;\n if (str.length === 0) return \"\"+hash;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash<<5)-hash)+char;\n }\n\n return hash.toString(16).replace(/^-/, 'n');\n\n };\n\n\n /**\n * Instead of using HTML5 dataset, just rip through attributes and return data attributes\n * @param element\n * @returns {{}}\n */\n util.data = function (element) {\n var data = {};\n if (element) {\n var attrs = element.attributes;\n for(var i = attrs.length - 1; i >= 0; i--) {\n if (attrs[i].name.indexOf('data-') === 0) {\n data[attrs[i].name.substr(5)] = attrs[i].value;\n }\n }\n }\n return data;\n };\n\n\n /**\n * Copies a value to the target if the source contains it\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {string} targetKey – The destination key name\n * @param {string} [sourceKey] – The source key name, if different\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSet = function(target, source, targetKey, sourceKey, options) {\n sourceKey = sourceKey || targetKey;\n options = options || { };\n\n function doCopy(sourceKey) {\n if (source && source[sourceKey] !== undefined && (!options.stripEmpty || !util.empty(source[sourceKey]))) {\n target[targetKey] = source[sourceKey];\n }\n }\n\n if (typeof sourceKey === \"object\" && Array.isArray(sourceKey)) {\n // Copy the first source key that is found\n for(var k = 0; k < sourceKey.length; k++) {\n doCopy(sourceKey[k]);\n }\n\n } else {\n doCopy(sourceKey);\n }\n };\n\n\n /**\n * Copies a mapping of target-source from source to target\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {*} map – The mapping of targetKey => sourceKey (null if same)\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSetMap = function(target, source, map, options) {\n var keys = Object.keys(map);\n for(var k = 0; k < keys.length; k++) {\n util.copyIfSet(target, source, keys[k], map[keys[k]], options);\n }\n };\n\n\n /*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n /**\n * Extends an object from another\n * @param ctor – Child class\n * @param superCtor – Parent class\n */\n util.inherits = function inherits(ctor, superCtor) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n\n\n /**\n * Gets the current page's scroll position\n * @returns {{x: Number, y: Number}}\n */\n util.getScrollPosition = function() {\n return {\n x: supportPageOffset ? window.pageXOffset : isCSS1Compatible ? document.documentElement.scrollLeft : document.body.scrollLeft,\n y: supportPageOffset ? window.pageYOffset : isCSS1Compatible ? document.documentElement.scrollTop : document.body.scrollTop\n };\n };\n\n\n /**\n * Gets the height and width of the given element\n * @param {HTMLElement|Node} el – The DOM element to get the size of\n * @param {boolean} [includeMargin] – Whether to include the margins of the element in the size\n * @returns {{height: number, width: number}}\n */\n util.getElementSize = function(el, includeMargin) {\n\n var size = {\n height: el.offsetHeight,\n width : el.offsetWidth\n }, style;\n\n if (includeMargin) {\n style = el.currentStyle || getComputedStyle(el);\n size.height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n size.width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n }\n\n return size;\n };\n\n\n /**\n * Gets the elements rectangle coordinates on the page\n * @param el - DOM Element\n * @return {{x1: *, y1: *, x2: *, y2: *}}\n */\n util.getElementPosition = function(el) {\n\n // Wrapped in try-catch because IE is super strict about the\n // element being on the DOM before you call this. Other browsers\n // let it slide, but oh well.\n var rect, pos, errMsg = '[Okanjo Core] Could not get position of element. Did you attach the element to the DOM before initializing?';\n try {\n rect = el.getBoundingClientRect();\n pos = util.getScrollPosition();\n\n if (!document.body.contains(el)) {\n console.warn(errMsg);\n }\n\n return {\n x1: rect.left + pos.x,\n y1: rect.top + pos.y,\n x2: rect.right + pos.x,\n y2: rect.bottom + pos.y\n };\n } catch (e) {\n console.warn(errMsg, e);\n return {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0\n };\n }\n\n };\n\n\n /**\n * Gets the current page size\n * @return {{w: number, h: number}}\n */\n util.getPageSize = function() {\n var body = okanjo.qwery('body')[0],\n html = document.documentElement;\n\n return {\n w: Math.max( body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth ),\n\n h: Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight )\n };\n };\n\n\n /**\n * Gets the current viewport size\n * @return {{vw: number, vh: number}}\n */\n util.getViewportSize = function() {\n var doc = document,\n win = window,\n el = (doc.compatMode && doc.compatMode === 'CSS1Compat') ? doc.documentElement : doc.body,\n width = el.clientWidth,\n height = el.clientHeight,\n inWidth = win.innerWidth || 0,\n inHeight = win.innerHeight || 0,\n mobileZoom = (inWidth && width > inWidth) || (inHeight && height > inHeight);\n\n return {\n vw: mobileZoom ? inWidth : width,\n vh: mobileZoom ? inHeight : height\n };\n };\n\n\n /**\n * Gets the x, y location of the event relative to the page\n * @param e – Event\n * @return {{ex: number, ey: number}}\n */\n util.getEventPosition = function(e) {\n var ex = e.pageX,\n ey = e.pageY,\n doc = document,\n body = doc.body,\n el = doc.documentElement,\n scrollLeft = 'scrollLeft',\n scrollTop = 'scrollTop';\n return {\n ex: ex === undefined ? e.clientX + body[scrollLeft] + el[scrollLeft] : ex,\n ey: ey === undefined ? e.clientY + body[scrollTop] + el[scrollTop] : ey\n };\n };\n\n\n /**\n * Splits the text in the element to fit within the visible height of its container, and separates with an ellipses\n * @param {HTMLElement|Node} element – The DOM element containing the text to fit\n * @param {HTMLElement} [container] – Optional container to compute fit on. Defaults to the element's parent\n */\n util.ellipsify = function(element, container) {\n\n // It's a sad day when you have to resort to JS because CSS kludges are too hacky to work down to IE8, programmatically\n //noinspection JSValidateTypes\n var parent = container || element.parentNode,\n targetHeight = util.getElementSize(parent).height,\n useTextContent = element.textContent !== undefined,\n text = useTextContent ? element.textContent : element.innerText,\n replacedText = \"\",\n safety = 5000, // Safety switch to bust out of the loop in the event something goes terribly wrong\n replacer = function(match) {\n replacedText = match.substr(0, match.length-3) + replacedText;\n return '...';\n };\n\n // Trim off characters until we can fit the text and ellipses\n // If the text already fits, this loop is ignored\n while (util.getElementSize(element).height > targetHeight && text.length > 0 && (safety-- > 0)) {\n text = useTextContent ? element.textContent : element.innerText;\n\n text = text.replace(/[\\s\\S](?:\\.\\.\\.)?$/, replacer);\n\n if (useTextContent) {\n element.textContent = text;\n } else {\n element.innerText = text;\n }\n }\n\n // If there is work to do, split the content into two span tags\n // Like so: [content]...[hidden content]\n if (replacedText.length > 0) {\n\n var content = document.createElement('span'),\n span = document.createElement('span');\n\n content.setAttribute('class','okanjo-ellipses');\n span.setAttribute('class','okanjo-visually-hidden');\n\n if (useTextContent) {\n content.textContent = text.substr(0, text.length-3);\n span.textContent = replacedText;\n } else {\n content.innerText = text.substr(0, text.length-3);\n span.innerText = replacedText;\n }\n\n element.innerHTML = '';\n element.appendChild(content);\n element.appendChild(span);\n }\n\n };\n\n\n /**\n * Return various browser detections\n * @returns {Array}\n */\n util.detectClasses = function() {\n var classDetects = [];\n if (navigator.appVersion.indexOf(\"MSIE 9.\") != -1) {\n classDetects.push('lt-ie10');\n } else if (navigator.appVersion.indexOf(\"MSIE 8.\") != -1) {\n classDetects.push('lt-ie9');\n } else if (navigator.appVersion.indexOf(\"MSIE 7.\") != -1) {\n classDetects.push('lt-ie8');\n } else if (navigator.appVersion.indexOf(\"MSIE 6.\") != -1) {\n classDetects.push('lt-ie7');\n }\n return classDetects;\n };\n\n\n /**\n * Checks if we're executing this code inside a frame or not\n * @returns {boolean}\n */\n util.isFramed = function() {\n return window.top !== window.self;\n };\n\n /**\n * Checks if the current user agent identifies as an iOS device\n * @returns {boolean}\n */\n util.isiOS = function() {\n return /(iPhone|iPad|iPod)/i.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as Android device\n * @returns {boolean}\n */\n util.isAndroid = function() {\n return /Android/.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as a mobile device\n * @returns {boolean}\n */\n util.isMobile = function() {\n return util.isiOS() || util.isAndroid();\n };\n\n\n /**\n * Returns an object hashmap of query and hash parameters\n * @param {boolean} includeHashArguments - Whether to include the hash arguments, if any\n * @return {*}\n */\n util.getPageArguments = function(includeHashArguments) {\n\n var queryArgs = splitArguments(window.location.search.substring(window.location.search.indexOf('?') + 1));\n\n if (includeHashArguments) {\n var hashArgs = splitArguments(window.location.hash.substring(Math.max(window.location.hash.indexOf('#') + 1, window.location.hash.indexOf('#!') + 2)));\n for (var k in hashArgs) {\n if (hashArgs.hasOwnProperty(k)) {\n queryArgs[k] = hashArgs[k];\n }\n }\n }\n\n return queryArgs;\n };\n\n\n /**\n * Deep clones a thing\n * @param mixed Something to clone\n * @param [out] Optional object/array receiver if clone-merge is desirable. Just make sure the type matches the source\n * @return {*}\n */\n util.deepClone = function(mixed, out) {\n var i = 0, k;\n if (Array.isArray(mixed)) {\n out = out || [];\n for ( ; i < mixed.length; i++) {\n out.push(util.deepClone(mixed[i]));\n }\n } else if (typeof mixed === \"object\") {\n out = out || {};\n for (k in mixed) {\n if (mixed.hasOwnProperty(k)) {\n out[k] = util.deepClone(mixed[k]);\n }\n }\n } else {\n out = mixed;\n }\n return out;\n };\n\n /**\n * Flattens a multi-dimensional object into a single object\n * @param obj\n * @return {{}}\n */\n util.flatten = function (obj) {\n var toReturn = {}, flatObject, x, i;\n\n for (i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n\n // Convert object ids to hex strings\n if (Array.isArray(obj[i])) {\n toReturn[i] = obj[i];\n } else if ((typeof obj[i]) == 'object') {\n flatObject = util.flatten(obj[i]);\n for (x in flatObject) {\n if (!flatObject.hasOwnProperty(x)) continue;\n toReturn[i + '_' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = obj[i];\n }\n }\n return toReturn;\n };\n\n /*! based on shortid https://github.com/dylang/shortid */\n util.shortid = (function(clusterWorkerId) {\n\n var shuffled = 'ylZM7VHLvOFcohp01x-fXNr8P_tqin6RkgWGm4SIDdK5s2TAJebzQEBUwuY9j3aC',\n\n crypto = typeof require !== 'undefined' ? require('crypto') : (window.crypto || window.msCrypto),\n\n randomByte = function() {\n if (crypto && crypto.randomBytes) {\n return crypto.randomBytes(1)[0] & 0x30;\n } else if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n },\n\n encode = function(number) {\n var loopCounter = 0,\n done,\n str = '';\n\n while (!done) {\n str = str + shuffled[ ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ];\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n },\n\n // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n // This number should be updated every year or so to keep the generated id short.\n // To regenerate `new Date() - 0` and bump the version. Always bump the version!\n\n REDUCE_TIME = 1458848907498,\n version = 6,\n counter,\n previousSeconds;\n clusterWorkerId = clusterWorkerId || 0;\n\n return function() {\n var str = '',\n seconds = Math.floor(((new Date()).getTime() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(version) + encode(clusterWorkerId);\n if (counter > 0) {\n str = str + encode(counter);\n }\n str = str + encode(seconds);\n\n return str;\n };\n })();\n\n\n function splitArguments(query) {\n var params = {},\n ampSplit = query.split('&'),\n i = 0,\n temp, key, value, eqIndex;\n for ( ; i < ampSplit.length; i++) {\n try {\n temp = ampSplit[i];\n eqIndex = temp.indexOf('=');\n if (eqIndex < 0) {\n key = decodeURIComponent(temp);\n value = null;\n } else {\n key = decodeURIComponent(temp.substring(0, eqIndex));\n value = decodeURIComponent(temp.substring(eqIndex + 1));\n }\n if (key) {\n params[key] = value;\n }\n } catch(e) {\n //noinspection JSUnusedAssignment\n console.error('[Okanjo] Failed to parse URL parameter:', temp, e);\n }\n }\n return params;\n }\n\n return okanjo;\n\n })(okanjo || window.okanjo);\n\n\n\n","\n var config = okanjo.config = okanjo.config || {};\n\n // okanjo-ads api key\n config.key = config.key || undefined;\n\n // Marketplace config\n config.marketplace = {\n uri: 'https://shop.okanjo.com',\n apiUri: 'https://api.okanjo.com',\n routerUri: 'https://shop.okanjo.com/widgets/router/',\n balancedMarketplacePath: '/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy',\n socketIOUri: 'https://mke-rt.okanjo.com:13443'\n };\n\n // Ads config\n config.ads = {\n apiUri: 'https://ads-api.okanjo.com'\n };\n\n /**\n * Override the default production configuration\n * @param options\n */\n okanjo.configure = function(options) {\n\n // Merge keys\n Object.keys(options).every(function(root) {\n if (config[root] && typeof config[root] === \"object\" && typeof options[root] === \"object\") {\n Object.keys(options[root]).every(function(key) {\n config[root][key] = options[root][options[key]];\n return true;\n });\n } else {\n config[root] = options[root];\n }\n return true;\n });\n\n\n };","/*! okanjo-metrics.js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.okanjo = factory();\n }\n}(this, function() {\n\n //noinspection JSUnusedAssignment\n /**\n * index.js\n * @type {okanjo|*}\n */\n var okanjo = (function(ok) {\n\n\n //noinspection JSValidateTypes,JSUnusedGlobalSymbols\n var supportPageOffset = window.pageXOffset !== undefined,\n isCSS1Compatible = ((document.compatMode || \"\") === \"CSS1Compat\"),\n agent = window.navigator.userAgent,\n noop = function(){},\n okanjo = ok || {};\n\n // Override version with this version\n okanjo.version = \"0.8.4\";\n\n // Override these later\n okanjo.qwery = noop;\n\n\n /**\n * Placeholder, just in case okanjo-js is built without metrics\n */\n okanjo.metrics = {\n trackEvent: noop,\n trackPageView: noop\n };\n\n /**\n * API route definitions\n */\n okanjo.routes = {\n products: '/products',\n products_id: '/products/:product_id',\n products_sense: '/products/sense',\n metrics: '/metrics/:object_type/:event_type'\n };\n\n\n /**\n * Compiles a route and parameters into a final URL\n * @param route – The route to use (e.g. okanjo.routes.products )\n * @param [params] - Optional route parameters\n * @returns {*}\n */\n okanjo.getRoute = function(route, params) {\n if (params) {\n for (var i in params) {\n if (params.hasOwnProperty(i)) {\n route = route.replace(\":\"+i, params[i] + \"\");\n }\n }\n }\n return okanjo.config.ads.apiUri + route;\n };\n\n\n /**\n * Execute a JSONP request\n * @param {string} url – Request URL\n * @param {*} data – Request data\n * @param {function(err:*, res:*)} callback – Closure to fire when completed\n */\n okanjo.exec = function(url, data, callback) {\n data = data || {};\n //noinspection JSUnresolvedFunction\n okanjo.JSONP({\n url: url,\n data: data,\n error: function(data) {\n var err = { statusCode: 500, error: \"Communication Error\", message: data.message || \"JSONP communication failure.\" };\n okanjo.report(\"core-jsonp\", data.error || new Error(err.message));\n callback(err, null);\n },\n success: function(data) {\n var err, res;\n if (data) {\n if (data.error) {\n err = data;\n } else {\n res = data;\n }\n } else {\n err = { statusCode: 500, error: \"Invalid Response\", message: \"Could not interpret the JSONP response.\"};\n okanjo.report('core-jsonp', new Error(err.message));\n }\n\n callback(err, res);\n }\n });\n };\n\n\n /**\n * Report a message or error back to Okanjo\n * @param {string} context – What module is responsible for emitting the error (e.g. Product)\n * @param {string|Error} mixed – The message or Error to report\n */\n okanjo.report = function(context, mixed) {\n // REPORT THIS BACK TO OKANJO!\n var error;\n if (typeof mixed === \"string\") {\n error = new Error('[Okanjo' + (context ? ' ' + context : '') + '] ' + mixed);\n } else if (typeof mixed === \"object\" && mixed instanceof Error) {\n error = mixed;\n }\n\n console.error(error);\n //TODO - integrate with Raven\n };\n\n /**\n * Utility functions\n */\n var util = okanjo.util = okanjo.util || {};\n\n\n /**\n * Trims leading and trailing whitespace on a string\n * @param val\n */\n util.trim = function(val) {\n return (val || \"\").replace(/^\\s+|\\s+$/g, '');\n };\n\n\n /**\n * Function to test whether the given var has a value\n * @param val - The var to check\n * @returns {boolean} - True when the var has value, false when it does not\n */\n util.empty = function (val) {\n return (val === null || val === undefined || (typeof val === \"string\" && util.trim(val) === \"\"));\n };\n\n /**\n * Helper to shallow clone an object so we don't ruin the top-level object reference\n * Note: If the shallow keys are objects, the references to the keyed objects will be maintained!\n *\n * @param {*} obj – Source object to copy\n * @returns {{}} – Shallow clone of the object\n */\n util.clone = function (obj) {\n var clone = {};\n obj = obj || {};\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n clone[k] = obj[k];\n }\n }\n return clone;\n };\n\n\n /**\n * Super simple hashing algorithm\n * @see http://jsperf.com/hashing-strings\n * @param str - String to hash\n * @returns {string}\n */\n util.hash = function(str) {\n var hash = 0;\n if (str.length === 0) return \"\"+hash;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash<<5)-hash)+char;\n }\n\n return hash.toString(16).replace(/^-/, 'n');\n\n };\n\n\n /**\n * Instead of using HTML5 dataset, just rip through attributes and return data attributes\n * @param element\n * @returns {{}}\n */\n util.data = function (element) {\n var data = {};\n if (element) {\n var attrs = element.attributes;\n for(var i = attrs.length - 1; i >= 0; i--) {\n if (attrs[i].name.indexOf('data-') === 0) {\n data[attrs[i].name.substr(5)] = attrs[i].value;\n }\n }\n }\n return data;\n };\n\n\n /**\n * Copies a value to the target if the source contains it\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {string} targetKey – The destination key name\n * @param {string} [sourceKey] – The source key name, if different\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSet = function(target, source, targetKey, sourceKey, options) {\n sourceKey = sourceKey || targetKey;\n options = options || { };\n\n function doCopy(sourceKey) {\n if (source && source[sourceKey] !== undefined && (!options.stripEmpty || !util.empty(source[sourceKey]))) {\n target[targetKey] = source[sourceKey];\n }\n }\n\n if (typeof sourceKey === \"object\" && Array.isArray(sourceKey)) {\n // Copy the first source key that is found\n for(var k = 0; k < sourceKey.length; k++) {\n doCopy(sourceKey[k]);\n }\n\n } else {\n doCopy(sourceKey);\n }\n };\n\n\n /**\n * Copies a mapping of target-source from source to target\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {*} map – The mapping of targetKey => sourceKey (null if same)\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSetMap = function(target, source, map, options) {\n var keys = Object.keys(map);\n for(var k = 0; k < keys.length; k++) {\n util.copyIfSet(target, source, keys[k], map[keys[k]], options);\n }\n };\n\n\n /*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n /**\n * Extends an object from another\n * @param ctor – Child class\n * @param superCtor – Parent class\n */\n util.inherits = function inherits(ctor, superCtor) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n\n\n /**\n * Gets the current page's scroll position\n * @returns {{x: Number, y: Number}}\n */\n util.getScrollPosition = function() {\n return {\n x: supportPageOffset ? window.pageXOffset : isCSS1Compatible ? document.documentElement.scrollLeft : document.body.scrollLeft,\n y: supportPageOffset ? window.pageYOffset : isCSS1Compatible ? document.documentElement.scrollTop : document.body.scrollTop\n };\n };\n\n\n /**\n * Gets the height and width of the given element\n * @param {HTMLElement|Node} el – The DOM element to get the size of\n * @param {boolean} [includeMargin] – Whether to include the margins of the element in the size\n * @returns {{height: number, width: number}}\n */\n util.getElementSize = function(el, includeMargin) {\n\n var size = {\n height: el.offsetHeight,\n width : el.offsetWidth\n }, style;\n\n if (includeMargin) {\n style = el.currentStyle || getComputedStyle(el);\n size.height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n size.width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n }\n\n return size;\n };\n\n\n /**\n * Gets the elements rectangle coordinates on the page\n * @param el - DOM Element\n * @return {{x1: *, y1: *, x2: *, y2: *}}\n */\n util.getElementPosition = function(el) {\n\n // Wrapped in try-catch because IE is super strict about the\n // element being on the DOM before you call this. Other browsers\n // let it slide, but oh well.\n var rect, pos, errMsg = '[Okanjo Core] Could not get position of element. Did you attach the element to the DOM before initializing?';\n try {\n rect = el.getBoundingClientRect();\n pos = util.getScrollPosition();\n\n if (!document.body.contains(el)) {\n console.warn(errMsg);\n }\n\n return {\n x1: rect.left + pos.x,\n y1: rect.top + pos.y,\n x2: rect.right + pos.x,\n y2: rect.bottom + pos.y\n };\n } catch (e) {\n console.warn(errMsg, e);\n return {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0\n };\n }\n\n };\n\n\n /**\n * Gets the current page size\n * @return {{w: number, h: number}}\n */\n util.getPageSize = function() {\n var body = okanjo.qwery('body')[0],\n html = document.documentElement;\n\n return {\n w: Math.max( body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth ),\n\n h: Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight )\n };\n };\n\n\n /**\n * Gets the current viewport size\n * @return {{vw: number, vh: number}}\n */\n util.getViewportSize = function() {\n var doc = document,\n win = window,\n el = (doc.compatMode && doc.compatMode === 'CSS1Compat') ? doc.documentElement : doc.body,\n width = el.clientWidth,\n height = el.clientHeight,\n inWidth = win.innerWidth || 0,\n inHeight = win.innerHeight || 0,\n mobileZoom = (inWidth && width > inWidth) || (inHeight && height > inHeight);\n\n return {\n vw: mobileZoom ? inWidth : width,\n vh: mobileZoom ? inHeight : height\n };\n };\n\n\n /**\n * Gets the x, y location of the event relative to the page\n * @param e – Event\n * @return {{ex: number, ey: number}}\n */\n util.getEventPosition = function(e) {\n var ex = e.pageX,\n ey = e.pageY,\n doc = document,\n body = doc.body,\n el = doc.documentElement,\n scrollLeft = 'scrollLeft',\n scrollTop = 'scrollTop';\n return {\n ex: ex === undefined ? e.clientX + body[scrollLeft] + el[scrollLeft] : ex,\n ey: ey === undefined ? e.clientY + body[scrollTop] + el[scrollTop] : ey\n };\n };\n\n\n /**\n * Splits the text in the element to fit within the visible height of its container, and separates with an ellipses\n * @param {HTMLElement|Node} element – The DOM element containing the text to fit\n * @param {HTMLElement} [container] – Optional container to compute fit on. Defaults to the element's parent\n */\n util.ellipsify = function(element, container) {\n\n // It's a sad day when you have to resort to JS because CSS kludges are too hacky to work down to IE8, programmatically\n //noinspection JSValidateTypes\n var parent = container || element.parentNode,\n targetHeight = util.getElementSize(parent).height,\n useTextContent = element.textContent !== undefined,\n text = useTextContent ? element.textContent : element.innerText,\n replacedText = \"\",\n safety = 5000, // Safety switch to bust out of the loop in the event something goes terribly wrong\n replacer = function(match) {\n replacedText = match.substr(0, match.length-3) + replacedText;\n return '...';\n };\n\n // Trim off characters until we can fit the text and ellipses\n // If the text already fits, this loop is ignored\n while (util.getElementSize(element).height > targetHeight && text.length > 0 && (safety-- > 0)) {\n text = useTextContent ? element.textContent : element.innerText;\n\n text = text.replace(/[\\s\\S](?:\\.\\.\\.)?$/, replacer);\n\n if (useTextContent) {\n element.textContent = text;\n } else {\n element.innerText = text;\n }\n }\n\n // If there is work to do, split the content into two span tags\n // Like so: [content]...[hidden content]\n if (replacedText.length > 0) {\n\n var content = document.createElement('span'),\n span = document.createElement('span');\n\n content.setAttribute('class','okanjo-ellipses');\n span.setAttribute('class','okanjo-visually-hidden');\n\n if (useTextContent) {\n content.textContent = text.substr(0, text.length-3);\n span.textContent = replacedText;\n } else {\n content.innerText = text.substr(0, text.length-3);\n span.innerText = replacedText;\n }\n\n element.innerHTML = '';\n element.appendChild(content);\n element.appendChild(span);\n }\n\n };\n\n\n /**\n * Return various browser detections\n * @returns {Array}\n */\n util.detectClasses = function() {\n var classDetects = [];\n if (navigator.appVersion.indexOf(\"MSIE 9.\") != -1) {\n classDetects.push('lt-ie10');\n } else if (navigator.appVersion.indexOf(\"MSIE 8.\") != -1) {\n classDetects.push('lt-ie9');\n } else if (navigator.appVersion.indexOf(\"MSIE 7.\") != -1) {\n classDetects.push('lt-ie8');\n } else if (navigator.appVersion.indexOf(\"MSIE 6.\") != -1) {\n classDetects.push('lt-ie7');\n }\n return classDetects;\n };\n\n\n /**\n * Checks if we're executing this code inside a frame or not\n * @returns {boolean}\n */\n util.isFramed = function() {\n return window.top !== window.self;\n };\n\n /**\n * Checks if the current user agent identifies as an iOS device\n * @returns {boolean}\n */\n util.isiOS = function() {\n return /(iPhone|iPad|iPod)/i.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as Android device\n * @returns {boolean}\n */\n util.isAndroid = function() {\n return /Android/.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as a mobile device\n * @returns {boolean}\n */\n util.isMobile = function() {\n return util.isiOS() || util.isAndroid();\n };\n\n\n /**\n * Returns an object hashmap of query and hash parameters\n * @param {boolean} includeHashArguments - Whether to include the hash arguments, if any\n * @return {*}\n */\n util.getPageArguments = function(includeHashArguments) {\n\n var queryArgs = splitArguments(window.location.search.substring(window.location.search.indexOf('?') + 1));\n\n if (includeHashArguments) {\n var hashArgs = splitArguments(window.location.hash.substring(Math.max(window.location.hash.indexOf('#') + 1, window.location.hash.indexOf('#!') + 2)));\n for (var k in hashArgs) {\n if (hashArgs.hasOwnProperty(k)) {\n queryArgs[k] = hashArgs[k];\n }\n }\n }\n\n return queryArgs;\n };\n\n\n /**\n * Deep clones a thing\n * @param mixed Something to clone\n * @param [out] Optional object/array receiver if clone-merge is desirable. Just make sure the type matches the source\n * @return {*}\n */\n util.deepClone = function(mixed, out) {\n var i = 0, k;\n if (Array.isArray(mixed)) {\n out = out || [];\n for ( ; i < mixed.length; i++) {\n out.push(util.deepClone(mixed[i]));\n }\n } else if (typeof mixed === \"object\") {\n out = out || {};\n for (k in mixed) {\n if (mixed.hasOwnProperty(k)) {\n out[k] = util.deepClone(mixed[k]);\n }\n }\n } else {\n out = mixed;\n }\n return out;\n };\n\n /**\n * Flattens a multi-dimensional object into a single object\n * @param obj\n * @return {{}}\n */\n util.flatten = function (obj) {\n var toReturn = {}, flatObject, x, i;\n\n for (i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n\n // Convert object ids to hex strings\n if (Array.isArray(obj[i])) {\n toReturn[i] = obj[i];\n } else if ((typeof obj[i]) == 'object') {\n flatObject = util.flatten(obj[i]);\n for (x in flatObject) {\n if (!flatObject.hasOwnProperty(x)) continue;\n toReturn[i + '_' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = obj[i];\n }\n }\n return toReturn;\n };\n\n /*! based on shortid https://github.com/dylang/shortid */\n util.shortid = (function(clusterWorkerId) {\n\n var shuffled = 'ylZM7VHLvOFcohp01x-fXNr8P_tqin6RkgWGm4SIDdK5s2TAJebzQEBUwuY9j3aC',\n\n crypto = typeof require !== 'undefined' ? require('crypto') : (window.crypto || window.msCrypto),\n\n randomByte = function() {\n if (crypto && crypto.randomBytes) {\n return crypto.randomBytes(1)[0] & 0x30;\n } else if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n },\n\n encode = function(number) {\n var loopCounter = 0,\n done,\n str = '';\n\n while (!done) {\n str = str + shuffled[ ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ];\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n },\n\n // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n // This number should be updated every year or so to keep the generated id short.\n // To regenerate `new Date() - 0` and bump the version. Always bump the version!\n\n REDUCE_TIME = 1458848907498,\n version = 6,\n counter,\n previousSeconds;\n clusterWorkerId = clusterWorkerId || 0;\n\n return function() {\n var str = '',\n seconds = Math.floor(((new Date()).getTime() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(version) + encode(clusterWorkerId);\n if (counter > 0) {\n str = str + encode(counter);\n }\n str = str + encode(seconds);\n\n return str;\n };\n })();\n\n\n function splitArguments(query) {\n var params = {},\n ampSplit = query.split('&'),\n i = 0,\n temp, key, value, eqIndex;\n for ( ; i < ampSplit.length; i++) {\n try {\n temp = ampSplit[i];\n eqIndex = temp.indexOf('=');\n if (eqIndex < 0) {\n key = decodeURIComponent(temp);\n value = null;\n } else {\n key = decodeURIComponent(temp.substring(0, eqIndex));\n value = decodeURIComponent(temp.substring(eqIndex + 1));\n }\n if (key) {\n params[key] = value;\n }\n } catch(e) {\n //noinspection JSUnusedAssignment\n console.error('[Okanjo] Failed to parse URL parameter:', temp, e);\n }\n }\n return params;\n }\n\n return okanjo;\n\n })(okanjo || window.okanjo);\n\n\n\n\n\n var config = okanjo.config = okanjo.config || {};\n\n // okanjo-ads api key\n config.key = config.key || undefined;\n\n // Marketplace config\n config.marketplace = {\n uri: 'https://shop.okanjo.com',\n apiUri: 'https://api.okanjo.com',\n routerUri: 'https://shop.okanjo.com/widgets/router/',\n balancedMarketplacePath: '/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy',\n socketIOUri: 'https://mke-rt.okanjo.com:13443'\n };\n\n // Ads config\n config.ads = {\n apiUri: 'https://ads-api.okanjo.com'\n };\n\n /**\n * Override the default production configuration\n * @param options\n */\n okanjo.configure = function(options) {\n\n // Merge keys\n Object.keys(options).every(function(root) {\n if (config[root] && typeof config[root] === \"object\" && typeof options[root] === \"object\") {\n Object.keys(options[root]).every(function(key) {\n config[root][key] = options[root][options[key]];\n return true;\n });\n } else {\n config[root] = options[root];\n }\n return true;\n });\n\n\n };\n/*\n\n Adaptation based on https://github.com/larryosborn/JSONP\n\n The MIT License (MIT)\n\n Copyright (c) 2014 Larry Osborn \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n */\n(function() {\n if(this.JSONP) { return; }\n var JSONP, computedUrl, encode, noop, objectToURI, makeUniqueCallback, head;\n\n encode = window.encodeURIComponent;\n\n noop = function() {\n return void 0;\n };\n\n computedUrl = function(params) {\n var url;\n url = params.url;\n url += params.url.indexOf('?') < 0 ? '?' : '&';\n url += objectToURI(params.data);\n return url;\n };\n\n makeUniqueCallback = function() {\n JSONP.requestCounter += 1;\n return (new Date()).getTime() + \"_\" + JSONP.requestCounter;\n };\n\n objectToURI = function(obj) {\n var data, key, value;\n data = [];\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (Array.isArray(value)) {\n var i = 0;\n for( ; i < value.length; i++ ) {\n data.push(encode(key) + '[]=' + encode(value[i]));\n }\n } else if (typeof value === \"object\") {\n // SINGLE DEPTH OBJECTS - no recursion\n for (var k in value) {\n if (value.hasOwnProperty(k)) {\n data.push(encode(key) + '['+encode(k)+']=' + encode(value[k]));\n }\n }\n } else {\n data.push(encode(key) + '=' + encode(value));\n }\n }\n }\n return data.join('&');\n };\n\n JSONP = function(options) {\n options = options ? options : {};\n var callback, done, params, script, timeoutHandle, removeCallback;\n params = {\n data: options.data || {},\n error: options.error || noop,\n success: options.success || noop,\n beforeSend: options.beforeSend || noop,\n complete: options.complete || noop,\n url: options.url || '',\n timeout: options.timeout || 30000\n };\n params.computedUrl = computedUrl(params);\n if (params.url.length === 0) {\n throw new Error('MissingUrl');\n }\n done = false;\n if (params.beforeSend({}, params) !== false) {\n //noinspection JSUnresolvedVariable\n callback = params.data[options.callbackName || 'callback'] = '_okanjo_jsonp_' + makeUniqueCallback();\n window[callback] = function(data) {\n\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n timeoutHandle = null;\n\n params.success(data, params);\n params.complete(data, params);\n removeCallback();\n };\n\n removeCallback = function() {\n try {\n return delete window[callback];\n } catch (_error) {\n window[callback] = void 0;\n return void 0;\n }\n };\n\n script = window.document.createElement('script');\n script.src = computedUrl(params);\n script.async = true;\n\n timeoutHandle = setTimeout(function() {\n timeoutHandle = null;\n var err = new Error(\"JSONP request did not respond in time!\");\n err.url = (script && script.src) || null;\n params.error(err);\n removeCallback();\n return params.complete(err, params);\n }, params.timeout);\n\n script.onerror = function(evt) {\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n params.error({\n url: script.src,\n event: evt\n });\n return params.complete({\n url: script.src,\n event: evt\n }, params);\n };\n\n script.onload = script.onreadystatechange = function() {\n if (!done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {\n done = true;\n script.onload = script.onreadystatechange = null;\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n //jshint -W093\n return script = null;\n //jshint +W093\n }\n };\n\n head = head || window.document.getElementsByTagName('head')[0] || window.document.documentElement;\n return head.insertBefore(script, head.firstChild);\n }\n };\n\n JSONP.requestCounter = 0;\n JSONP.makeUrl = computedUrl;\n JSONP.objectToURI = objectToURI;\n\n if ((typeof define !== \"undefined\" && define !== null) && define.amd) {\n define(function() {\n return JSONP;\n });\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = JSONP;\n } else {\n this.JSONP = JSONP;\n }\n\n}).call(okanjo);\n\n// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\nif (!Object.keys) {\n Object.keys = (function() {\n 'use strict';\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n return function(obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }());\n}\n\n//// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\n//if (typeof Object.create != 'function') {\n// Object.create = (function() {\n// var Temp = function() {};\n// return function (prototype) {\n// if (arguments.length > 1) {\n// throw new Error('Second argument not supported');\n// }\n// if (typeof prototype != 'object') {\n// throw new TypeError('Argument must be an object');\n// }\n// Temp.prototype = prototype;\n// var result = new Temp();\n// Temp.prototype = null;\n// return result;\n// };\n// })();\n//}\n\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\nif (!Array.isArray) {\n Array.isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n };\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.14\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\n// Reference: http://es5.github.io/#x15.4.4.14\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function(searchElement, fromIndex) {\n\n var k;\n\n /* jshint ignore:start */\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) { //\n throw new TypeError('\"this\" is null or not defined');\n }\n /* jshint ignore:end */\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\nif (!Array.prototype.every) {\n Array.prototype.every = function(callbackfn, thisArg) {\n 'use strict';\n var T, k;\n\n // jshint -W041\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n // jshint +W041\n\n // 1. Let O be the result of calling ToObject passing the this\n // value as the argument.\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get internal method\n // of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.\n if (typeof callbackfn !== 'function') {\n throw new TypeError();\n }\n\n // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 1) {\n T = thisArg;\n }\n\n // 6. Let k be 0.\n k = 0;\n\n // 7. Repeat, while k < len\n while (k < len) {\n\n var kValue;\n\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the HasProperty internal\n // method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n if (k in O) {\n\n // i. Let kValue be the result of calling the Get internal method\n // of O with argument Pk.\n kValue = O[k];\n\n // ii. Let testResult be the result of calling the Call internal method\n // of callbackfn with T as the this value and argument list\n // containing kValue, k, and O.\n var testResult = callbackfn.call(T, kValue, k, O);\n\n // iii. If ToBoolean(testResult) is false, return false.\n if (!testResult) {\n return false;\n }\n }\n k++;\n }\n return true;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\nif (!Array.prototype.filter) {\n Array.prototype.filter = function(fun/*, thisArg*/) {\n 'use strict';\n\n if (this === void 0 || this === null) {\n throw new TypeError();\n }\n\n var t = Object(this),\n len = t.length >>> 0;\n\n if (typeof fun !== 'function') {\n throw new TypeError();\n }\n\n var res = [],\n thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t) {\n var val = t[i];\n\n // NOTE: Technically this should Object.defineProperty at\n // the next index, as push can be affected by\n // properties on Object.prototype and Array.prototype.\n // But that method's new, and collisions should be\n // rare, so use the more-compatible alternative.\n if (fun.call(thisArg, val, i, t)) {\n res.push(val);\n }\n }\n }\n\n return res;\n };\n}\n\n// Doesn't work in IE7 so it's only here for reference\n//https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n(function() {\n if (!Event.prototype.preventDefault) {\n Event.prototype.preventDefault=function() {\n //noinspection JSUnusedGlobalSymbols\n this.returnValue=false;\n };\n }\n if (!Event.prototype.stopPropagation) {\n Event.prototype.stopPropagation=function() {\n //noinspection JSUnusedGlobalSymbols\n this.cancelBubble=true;\n };\n }\n if (!Element.prototype.addEventListener) {\n var eventListeners=[];\n\n var addEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var self=this;\n var wrapper=function(e) {\n e.target=e.srcElement;\n e.currentTarget=self;\n if (listener.handleEvent) {\n listener.handleEvent(e);\n } else {\n listener.call(self,e);\n }\n };\n if (type==\"DOMContentLoaded\") {\n var wrapper2=function(e) {\n if (document.readyState==\"complete\") {\n wrapper(e);\n }\n };\n document.attachEvent(\"onreadystatechange\",wrapper2);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper2});\n\n if (document.readyState==\"complete\") {\n //noinspection JSClosureCompilerSyntax\n var e=new Event();\n e.srcElement=window;\n wrapper2(e);\n }\n } else {\n this.attachEvent(\"on\"+type,wrapper);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper});\n }\n };\n var removeEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var counter=0;\n while (counter~+]/\n , normalizr = /^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g\n , splitters = /[\\s\\>\\+\\~]/\n , splittersMore = /(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/\n , specialChars = /([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g\n , simple = /^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/\n , attr = /\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/\n , pseudo = /:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/\n , easy = new RegExp(idOnly.source + '|' + tagOnly.source + '|' + classOnly.source)\n , dividers = new RegExp('(' + splitters.source + ')' + splittersMore.source, 'g')\n , tokenizr = new RegExp(splitters.source + splittersMore.source)\n , chunker = new RegExp(simple.source + '(' + attr.source + ')?' + '(' + pseudo.source + ')?')\n\n var walker = {\n ' ': function (node) {\n return node && node !== html && node.parentNode\n }\n , '>': function (node, contestant) {\n return node && node.parentNode == contestant.parentNode && node.parentNode\n }\n , '~': function (node) {\n return node && node.previousSibling\n }\n , '+': function (node, contestant, p1, p2) {\n if (!node) return false\n return (p1 = previous(node)) && (p2 = previous(contestant)) && p1 == p2 && p1\n }\n }\n\n function cache() {\n this.c = {}\n }\n cache.prototype = {\n g: function (k) {\n return this.c[k] || undefined\n }\n , s: function (k, v, r) {\n v = r ? new RegExp(v) : v\n return (this.c[k] = v)\n }\n }\n\n var classCache = new cache()\n , cleanCache = new cache()\n , attrCache = new cache()\n , tokenCache = new cache()\n\n function classRegex(c) {\n return classCache.g(c) || classCache.s(c, '(^|\\\\s+)' + c + '(\\\\s+|$)', 1)\n }\n\n // not quite as fast as inline loops in older browsers so don't use liberally\n function each(a, fn) {\n var i = 0, l = a.length\n for (; i < l; i++) fn(a[i])\n }\n\n function flatten(ar) {\n for (var r = [], i = 0, l = ar.length; i < l; ++i) arrayLike(ar[i]) ? (r = r.concat(ar[i])) : (r[r.length] = ar[i])\n return r\n }\n\n function arrayify(ar) {\n var i = 0, l = ar.length, r = []\n for (; i < l; i++) r[i] = ar[i]\n return r\n }\n\n function previous(n) {\n while (n = n.previousSibling) if (n[nodeType] == 1) break;\n return n\n }\n\n function q(query) {\n return query.match(chunker)\n }\n\n // called using `this` as element and arguments from regex group results.\n // given => div.hello[title=\"world\"]:foo('bar')\n // div.hello[title=\"world\"]:foo('bar'), div, .hello, [title=\"world\"], title, =, world, :foo('bar'), foo, ('bar'), bar]\n function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {\n var i, m, k, o, classes\n if (this[nodeType] !== 1) return false\n if (tag && tag !== '*' && this[tagName] && this[tagName].toLowerCase() !== tag) return false\n if (idsAndClasses && (m = idsAndClasses.match(id)) && m[1] !== this.id) return false\n if (idsAndClasses && (classes = idsAndClasses.match(clas))) {\n for (i = classes.length; i--;) if (!classRegex(classes[i].slice(1)).test(this.className)) return false\n }\n if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) return false\n if (wholeAttribute && !value) { // select is just for existance of attrib\n o = this.attributes\n for (k in o) {\n if (Object.prototype.hasOwnProperty.call(o, k) && (o[k].name || k) == attribute) {\n return this\n }\n }\n }\n if (wholeAttribute && !checkAttr(qualifier, getAttr(this, attribute) || '', value)) {\n // select is for attrib equality\n return false\n }\n return this\n }\n\n function clean(s) {\n return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\\\$1'))\n }\n\n function checkAttr(qualify, actual, val) {\n switch (qualify) {\n case '=':\n return actual == val\n case '^=':\n return actual.match(attrCache.g('^=' + val) || attrCache.s('^=' + val, '^' + clean(val), 1))\n case '$=':\n return actual.match(attrCache.g('$=' + val) || attrCache.s('$=' + val, clean(val) + '$', 1))\n case '*=':\n return actual.match(attrCache.g(val) || attrCache.s(val, clean(val), 1))\n case '~=':\n return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, '(?:^|\\\\s+)' + clean(val) + '(?:\\\\s+|$)', 1))\n case '|=':\n return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, '^' + clean(val) + '(-|$)', 1))\n }\n return 0\n }\n\n // given a selector, first check for simple cases then collect all base candidate matches and filter\n function _qwery(selector, _root) {\n var r = [], ret = [], i, l, m, token, tag, els, intr, item, root = _root\n , tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n , dividedTokens = selector.match(dividers)\n\n if (!tokens.length) return r\n\n token = (tokens = tokens.slice(0)).pop() // copy cached tokens, take the last one\n if (tokens.length && (m = tokens[tokens.length - 1].match(idOnly))) root = byId(_root, m[1])\n if (!root) return r\n\n intr = q(token)\n // collect base candidates to filter\n els = root !== _root && root[nodeType] !== 9 && dividedTokens && /^[+~]$/.test(dividedTokens[dividedTokens.length - 1]) ?\n function (r) {\n while (root = root.nextSibling) {\n root[nodeType] == 1 && (intr[1] ? intr[1] == root[tagName].toLowerCase() : 1) && (r[r.length] = root)\n }\n return r\n }([]) :\n root[byTag](intr[1] || '*')\n // filter elements according to the right-most part of the selector\n for (i = 0, l = els.length; i < l; i++) {\n if (item = interpret.apply(els[i], intr)) r[r.length] = item\n }\n if (!tokens.length) return r\n\n // filter further according to the rest of the selector (the left side)\n each(r, function (e) { if (ancestorMatch(e, tokens, dividedTokens)) ret[ret.length] = e })\n return ret\n }\n\n // compare element to a selector\n function is(el, selector, root) {\n if (isNode(selector)) return el == selector\n if (arrayLike(selector)) return !!~flatten(selector).indexOf(el) // if selector is an array, is el a member?\n\n var selectors = selector.split(','), tokens, dividedTokens\n while (selector = selectors.pop()) {\n tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n dividedTokens = selector.match(dividers)\n tokens = tokens.slice(0) // copy array\n if (interpret.apply(el, q(tokens.pop())) && (!tokens.length || ancestorMatch(el, tokens, dividedTokens, root))) {\n return true\n }\n }\n return false\n }\n\n // given elements matching the right-most part of a selector, filter out any that don't match the rest\n function ancestorMatch(el, tokens, dividedTokens, root) {\n var cand\n // recursively work backwards through the tokens and up the dom, covering all options\n function crawl(e, i, p) {\n while (p = walker[dividedTokens[i]](p, e)) {\n if (isNode(p) && (interpret.apply(p, q(tokens[i])))) {\n if (i) {\n if (cand = crawl(p, i - 1, p)) return cand\n } else return p\n }\n }\n }\n return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))\n }\n\n function isNode(el, t) {\n return el && typeof el === 'object' && (t = el[nodeType]) && (t == 1 || t == 9)\n }\n\n function uniq(ar) {\n var a = [], i, j;\n o:\n for (i = 0; i < ar.length; ++i) {\n for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o\n a[a.length] = ar[i]\n }\n return a\n }\n\n function arrayLike(o) {\n return (typeof o === 'object' && isFinite(o.length))\n }\n\n function normalizeRoot(root) {\n if (!root) return doc\n if (typeof root == 'string') return qwery(root)[0]\n if (!root[nodeType] && arrayLike(root)) return root[0]\n return root\n }\n\n function byId(root, id, el) {\n // if doc, query on it, else query the parent doc or if a detached fragment rewrite the query and run on the fragment\n return root[nodeType] === 9 ? root.getElementById(id) :\n root.ownerDocument &&\n (((el = root.ownerDocument.getElementById(id)) && isAncestor(el, root) && el) ||\n (!isAncestor(root, root.ownerDocument) && select('[id=\"' + id + '\"]', root)[0]))\n }\n\n function qwery(selector, _root) {\n var m, el, root = normalizeRoot(_root)\n\n // easy, fast cases that we can dispatch with simple DOM calls\n if (!root || !selector) return []\n if (selector === window || isNode(selector)) {\n return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : []\n }\n if (selector && arrayLike(selector)) return flatten(selector)\n if (m = selector.match(easy)) {\n if (m[1]) return (el = byId(root, m[1])) ? [el] : []\n if (m[2]) return arrayify(root[byTag](m[2]))\n if (hasByClass && m[3]) return arrayify(root[byClass](m[3]))\n }\n\n return select(selector, root)\n }\n\n // where the root is not document and a relationship selector is first we have to\n // do some awkward adjustments to get it to work, even with qSA\n function collectSelector(root, collector) {\n return function (s) {\n var oid, nid\n if (splittable.test(s)) {\n if (root[nodeType] !== 9) {\n // make sure the el has an id, rewrite the query, set root to doc and run it\n if (!(nid = oid = root.getAttribute('id'))) root.setAttribute('id', nid = '__qwerymeupscotty')\n s = '[id=\"' + nid + '\"]' + s // avoid byId and allow us to match context element\n collector(root.parentNode || root, s, true)\n oid || root.removeAttribute('id')\n }\n return;\n }\n s.length && collector(root, s, false)\n }\n }\n\n var isAncestor = 'compareDocumentPosition' in html ?\n function (element, container) {\n return (container.compareDocumentPosition(element) & 16) == 16\n } : 'contains' in html ?\n function (element, container) {\n container = container[nodeType] === 9 || container == window ? html : container\n return container !== element && container.contains(element)\n } :\n function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , getAttr = function () {\n // detect buggy IE src/href getAttribute() call\n var e = doc.createElement('p')\n return ((e.innerHTML = 'x') && e.firstChild.getAttribute('href') != '#x') ?\n function (e, a) {\n return a === 'class' ? e.className : (a === 'href' || a === 'src') ?\n e.getAttribute(a, 2) : e.getAttribute(a)\n } :\n function (e, a) { return e.getAttribute(a) }\n }()\n , hasByClass = !!doc[byClass]\n // has native qSA support\n , hasQSA = doc.querySelector && doc[qSA]\n // use native qSA\n , selectQSA = function (selector, root) {\n var result = [], ss, e\n try {\n if (root[nodeType] === 9 || !splittable.test(selector)) {\n // most work is done right here, defer to qSA\n return arrayify(root[qSA](selector))\n }\n // special case where we need the services of `collectSelector()`\n each(ss = selector.split(','), collectSelector(root, function (ctx, s) {\n e = ctx[qSA](s)\n if (e.length == 1) result[result.length] = e.item(0)\n else if (e.length) result = result.concat(arrayify(e))\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n } catch (ex) { }\n return selectNonNative(selector, root)\n }\n // no native selector support\n , selectNonNative = function (selector, root) {\n var result = [], items, m, i, l, r, ss\n selector = selector.replace(normalizr, '$1')\n if (m = selector.match(tagAndOrClass)) {\n r = classRegex(m[2])\n items = root[byTag](m[1] || '*')\n for (i = 0, l = items.length; i < l; i++) {\n if (r.test(items[i].className)) result[result.length] = items[i]\n }\n return result\n }\n // more complex selector, get `_qwery()` to do the work for us\n each(ss = selector.split(','), collectSelector(root, function (ctx, s, rewrite) {\n r = _qwery(s, ctx)\n for (i = 0, l = r.length; i < l; i++) {\n if (ctx[nodeType] === 9 || rewrite || isAncestor(r[i], root)) result[result.length] = r[i]\n }\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n }\n , configure = function (options) {\n // configNativeQSA: use fully-internal selector or native qSA where present\n if (typeof options[useNativeQSA] !== 'undefined')\n select = !options[useNativeQSA] ? selectNonNative : hasQSA ? selectQSA : selectNonNative\n }\n\n configure({ useNativeQSA: true })\n\n qwery.configure = configure\n qwery.uniq = uniq\n qwery.is = is\n qwery.pseudos = {}\n\n return qwery\n});\n\n/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.onDomReady = factory();\n }\n}(this, function() {\n\n 'use strict';\n\n var win = window,\n doc = win.document,\n docElem = doc.documentElement,\n\n LOAD = \"load\",\n FALSE = false,\n ONLOAD = \"on\"+LOAD,\n COMPLETE = \"complete\",\n READYSTATE = \"readyState\",\n ATTACHEVENT = \"attachEvent\",\n DETACHEVENT = \"detachEvent\",\n ADDEVENTLISTENER = \"addEventListener\",\n DOMCONTENTLOADED = \"DOMContentLoaded\",\n ONREADYSTATECHANGE = \"onreadystatechange\",\n REMOVEEVENTLISTENER = \"removeEventListener\",\n\n // W3C Event model\n w3c = ADDEVENTLISTENER in doc,\n top = FALSE,\n\n // isReady: Is the DOM ready to be used? Set to true once it occurs.\n isReady = FALSE,\n\n // Callbacks pending execution until DOM is ready\n callbacks = [];\n\n // Handle when the DOM is ready\n function ready( fn ) {\n if ( !isReady ) {\n\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return defer( ready );\n }\n\n // Remember that the DOM is ready\n isReady = true;\n\n // Execute all callbacks\n while ( fn = callbacks.shift() ) {\n defer( fn );\n }\n }\n }\n\n // The ready event handler\n function completed( event ) {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n detach();\n ready();\n }\n }\n\n // Clean-up method for dom ready events\n function detach() {\n if ( w3c ) {\n doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );\n } else {\n doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );\n win[DETACHEVENT]( ONLOAD, completed );\n }\n }\n\n // Defers a function, scheduling it to run after the current call stack has cleared.\n function defer( fn, wait ) {\n // Allow 0 to be passed\n setTimeout( fn, +wait >= 0 ? wait : 1 );\n }\n\n // Attach the listeners:\n\n // Catch cases where onDomReady is called after the browser event has already occurred.\n // we once tried to use readyState \"interactive\" here, but it caused issues like the one\n // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n if ( doc[READYSTATE] === COMPLETE ) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n defer( ready );\n\n // Standards-based browsers support DOMContentLoaded\n } else if ( w3c ) {\n // Use the handy event callback\n doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n\n // A fallback to window.onload, that will always work\n win[ADDEVENTLISTENER]( LOAD, completed, FALSE );\n\n // If IE event model is used\n } else {\n // Ensure firing before onload, maybe late but safe also for iframes\n doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );\n\n // A fallback to window.onload, that will always work\n win[ATTACHEVENT]( ONLOAD, completed );\n\n // If IE and not a frame\n // continually check to see if the document is ready\n try {\n top = win.frameElement == null && docElem;\n } catch(e) {}\n\n if ( top && top.doScroll ) {\n (function doScrollCheck() {\n if ( !isReady ) {\n try {\n // Use the trick by Diego Perini\n // http://javascript.nwbox.com/IEContentLoaded/\n top.doScroll(\"left\");\n } catch(e) {\n return defer( doScrollCheck, 50 );\n }\n\n // detach all dom ready events\n detach();\n\n // and execute any waiting functions\n ready();\n }\n })();\n }\n }\n\n function onDomReady( fn ) {\n // If DOM is ready, execute the function (async), otherwise wait\n isReady ? defer( fn ) : callbacks.push( fn );\n }\n\n // Add version\n onDomReady.version = \"1.4.0\";\n // Add method to check if DOM is ready\n onDomReady.isReady = function(){\n return isReady;\n };\n\n return onDomReady;\n}));\n\n\n\n}).apply(okanjo);\n\n/* jshint ignore:end */\n//noinspection ThisExpressionReferencesGlobalObjectJS\n(function(okanjo, window) {\n\n\n function OkanjoMetrics() {\n\n this.default_channel = this.channel.external;\n\n this._queue = [];\n\n // Generate a page id\n this.pageId = okanjo.util.shortid();\n\n var pageArgs = okanjo.util.getPageArguments(true),\n urlSid = pageArgs[this.msid_key],\n cookieSid = okanjo.Cookie.get(this.msid_key),\n sourceContext = pageArgs[this.source_cx],\n sourceChannel = pageArgs[this.source_ch];\n\n // If for some reason, both are set, replace the cookie with the uri value (# CORRELATION)\n if (urlSid && cookieSid && urlSid != cookieSid) {\n this.trackEvent(this.object_type.metric_session, this.event_type.correlation, {\n id: urlSid+\"_\"+cookieSid,\n ch: this.default_channel,\n _noProcess: true\n });\n okanjo.Cookie.set(this.msid_key, urlSid, this.msid_ttl);\n }\n\n this.sid = urlSid || cookieSid || null;\n this.sourceCh = sourceChannel || null;\n this.sourceCx = sourceContext || null;\n\n this._lastKey = undefined;\n }\n\n OkanjoMetrics.prototype = {\n\n msid_key: \"ok_msid\",\n source_cx: \"ok_cx\",\n source_ch: \"ok_ch\",\n msid_ttl: 1460,\n\n strip_meta: ['key','callback','metrics_channel_context','metrics_context','mode'],\n\n constructor: OkanjoMetrics,\n\n event_type: {\n view: 'vw',\n impression: 'imp',\n interaction: 'int',\n correlation: 'cor'\n },\n\n\n action: {\n click: \"click\",\n inline_click: \"inline_click\"\n },\n\n\n object_type: {\n thirdparty_ad: 'ta',\n cart: 'ct',\n page: 'pg',\n widget: 'wg',\n product: 'pr',\n store: 'st',\n cause: 'ca',\n marketplace: 'mp',\n order: 'or',\n order_item: 'oi',\n user: 'ur',\n metric_session: 'mt'\n },\n\n\n channel: {\n product_widget: 'pw',\n ad_widget: 'aw',\n store_widget: 'sw',\n marketplace: 'mp',\n external: 'ex'\n },\n\n\n environment: {\n live: \"live\",\n testing: \"testing\"\n },\n\n\n /**\n * Reports an event\n * @param {string} object_type\n * @param {string} event_type\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} data\n * @param callback\n */\n trackEvent: function(object_type, event_type, data, callback) {\n\n data = data || {};\n data.object_type = object_type;\n data.event_type = event_type;\n\n // Make the key stick in case future events don't have an API key, we can get a fuzzy idea who's responsible for the event\n // This is also useful for auto page load events, were there is no key defined at time the event was created\n this._lastKey = data.key || data.key || (data.m && data.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Queue the event for publishing\n this.push(data, callback);\n },\n\n\n /**\n * Reports a page view\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} [data]\n * @param callback\n */\n trackPageView: function(data, callback) {\n\n data = data || {};\n\n // Set the current page URL as the object id\n data.id = data.id || window.location.href;\n\n // Set the context to external unless instructed otherwise\n data.ch = data.ch || this.default_channel;\n\n // Track the event\n this.trackEvent(this.object_type.page, this.event_type.view, data, callback);\n },\n\n\n /**\n * Sends an event\n * @param event\n * @param callback\n */\n track: function(event, callback) {\n\n if (!event || typeof event !== \"object\") { console.warn('[Okanjo.Metrics] event object data required'); return; }\n if (!event.object_type) { console.warn('[Okanjo.Metrics] object_type required'); return; }\n if (!event.event_type) { console.warn('[Okanjo.Metrics] event_type required'); return; }\n\n var object_type = event.object_type,\n event_type = event.event_type;\n\n delete event.object_type;\n delete event.event_type;\n\n this.normalizeEventData(event);\n\n okanjo.exec(okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }), event, function(err, res) {\n if (err) { console.warn('[Okanjo.Metrics] Reporting failed', err, res); }\n\n /*jslint -W030 */\n callback && (callback(err, res));\n });\n\n },\n\n /**\n * Normalizes event data for consistency and adds common information to the event\n * @param event\n */\n normalizeEventData: function(event) {\n\n // Stick the key in there, if not already set\n event.key = event.key || (event.m && event.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Stick the publisher session token in there too, if present\n if (this.sid) {\n event.sid = this.sid;\n }\n\n // Clone the metadata, since it might be a direct reference to a widget property\n // Deleting properties on the meta object could be very destructive\n if (event.m) {\n var meta = {};\n for(var i in event.m) {\n if (event.m.hasOwnProperty(i) && this.strip_meta.indexOf(i) < 0) {\n meta[i] = event.m[i];\n }\n }\n event.m = meta;\n } else {\n event.m = {};\n }\n\n\n // If we were referred through a particular channel/context, then hold on to that for events emitted by this page\n if (this.sourceCh || this.sourceCx) {\n if (this.sourceCh) { event.m.ref_ch = this.sourceCh; }\n if (this.sourceCx) { event.m.ref_cx = this.sourceCx; }\n }\n\n // Automatically attach page load id\n event.m.pgid = this.pageId;\n\n // Automatically attach JS build version\n event.m.ok_ver = okanjo.version;\n\n // Pass the page's source reference\n if (document.referrer) {\n event.ref = document.referrer;\n }\n },\n\n\n ///**\n // * Generates the full URL to execute to track the metric. Useful for page redirection instead of straight tracking\n // * @param object_type\n // * @param event_type\n // * @param data\n // * @return {*}\n // */\n //getMetricUrl: function(object_type, event_type, data) {\n // return okanjo.JSONP.makeUrl({\n // url: okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }),\n // data: data\n // });\n //},\n\n\n /**\n * Update the metric sid to live for 4 years if not present\n * @param sid\n */\n updateSid: function(sid) {\n if (!this.sid && sid) {\n this.sid = sid;\n okanjo.Cookie.set(this.msid_key, sid, this.msid_ttl);\n }\n },\n\n\n /**\n * Queues an event for publishing\n * @param event\n * @param callback\n */\n push: function(event, callback) {\n this._queue.push({ event: event, callback: callback });\n\n // Start burning down the queue, unless the event says not to\n if (event._noProcess) {\n delete event._noProcess;\n } else {\n this._processQueue();\n }\n },\n\n\n /**\n * Processes the event queue\n * @private\n */\n _processQueue: function() {\n // If the queue is not already being processed, and there's stuff to process, continue sending them\n if (!this._processTimeout && this._queue.length > 0) {\n var self = this;\n this._processTimeout = setTimeout(function() {\n\n var item = self._queue.shift();\n if (item === undefined) {\n // Nothing in the queue, get outta here\n self._processTimeout = null;\n } else {\n // Track the item\n self.track(item.event, function(err, res) {\n\n // Update / Set the metric sid on the publisher\n if (res && res.data && res.data.sid) self.updateSid(res.data.sid);\n\n // When the item is done being tracked, iterate to the next metric then fire it's callback if set\n self._processTimeout = null;\n self._processQueue();\n /*jslint -W030 */\n item.callback && item.callback(err, res);\n });\n }\n\n }, 0);\n }\n },\n\n\n /**\n * Injects the elements box rectangle coordinates and page size into the given data object\n * @param element\n * @param [data]\n * @return {*|{}}\n */\n includeElementInfo: function(element, data) {\n\n var page = okanjo.util.getPageSize(),\n size = okanjo.util.getElementPosition(element);\n\n data = data || {};\n data.pw = page.w;\n data.ph = page.h;\n data.x1 = size.x1;\n data.y1 = size.y1;\n data.x2 = size.x2;\n data.y2 = size.y2;\n\n return data;\n },\n\n\n /**\n * Injects the viewport rectangle coordinates into the given data object\n * @param data\n * @return {*|{}}\n */\n includeViewportInfo: function(data) {\n\n var vp = okanjo.util.getViewportSize(),\n pos = okanjo.util.getScrollPosition();\n\n data = data || {};\n\n data.vx1 = pos.x;\n data.vy1 = pos.y;\n data.vx2 = data.vx1+vp.vw;\n data.vy2 = data.vy1+vp.vh;\n\n return data;\n },\n\n /**\n * Injects the event information into the given data object\n * @param event\n * @param data\n * @return {*|{}}\n */\n includeEventInfo: function(event, data) {\n var pos = okanjo.util.getEventPosition(event);\n data.ex = pos.ex;\n data.ey = pos.ey;\n return data;\n },\n\n /**\n * Copies a config object and another thing and flattens it\n * @param config\n * @param base\n * @return {{}|*}\n */\n copy: function(config, base) {\n return okanjo.util.flatten(okanjo.util.deepClone(config, base));\n },\n\n /**\n * Ensure that all parameters are less than the data limit\n * @param data\n * @return {*}\n */\n truncate: function(data) {\n for(var i in data) {\n if (data.hasOwnProperty(i) && typeof data[i] === \"string\") {\n data[i] = data[i].substr(0, 255);\n }\n }\n return data;\n }\n };\n\n okanjo.metrics = new OkanjoMetrics();\n\n})(okanjo, this);\n\nreturn okanjo;\n}));\n","/*\n\n Adaptation based on https://github.com/larryosborn/JSONP\n\n The MIT License (MIT)\n\n Copyright (c) 2014 Larry Osborn \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n */\n(function() {\n if(this.JSONP) { return; }\n var JSONP, computedUrl, encode, noop, objectToURI, makeUniqueCallback, head;\n\n encode = window.encodeURIComponent;\n\n noop = function() {\n return void 0;\n };\n\n computedUrl = function(params) {\n var url;\n url = params.url;\n url += params.url.indexOf('?') < 0 ? '?' : '&';\n url += objectToURI(params.data);\n return url;\n };\n\n makeUniqueCallback = function() {\n JSONP.requestCounter += 1;\n return (new Date()).getTime() + \"_\" + JSONP.requestCounter;\n };\n\n objectToURI = function(obj) {\n var data, key, value;\n data = [];\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (Array.isArray(value)) {\n var i = 0;\n for( ; i < value.length; i++ ) {\n data.push(encode(key) + '[]=' + encode(value[i]));\n }\n } else if (typeof value === \"object\") {\n // SINGLE DEPTH OBJECTS - no recursion\n for (var k in value) {\n if (value.hasOwnProperty(k)) {\n data.push(encode(key) + '['+encode(k)+']=' + encode(value[k]));\n }\n }\n } else {\n data.push(encode(key) + '=' + encode(value));\n }\n }\n }\n return data.join('&');\n };\n\n JSONP = function(options) {\n options = options ? options : {};\n var callback, done, params, script, timeoutHandle, removeCallback;\n params = {\n data: options.data || {},\n error: options.error || noop,\n success: options.success || noop,\n beforeSend: options.beforeSend || noop,\n complete: options.complete || noop,\n url: options.url || '',\n timeout: options.timeout || 30000\n };\n params.computedUrl = computedUrl(params);\n if (params.url.length === 0) {\n throw new Error('MissingUrl');\n }\n done = false;\n if (params.beforeSend({}, params) !== false) {\n //noinspection JSUnresolvedVariable\n callback = params.data[options.callbackName || 'callback'] = '_okanjo_jsonp_' + makeUniqueCallback();\n window[callback] = function(data) {\n\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n timeoutHandle = null;\n\n params.success(data, params);\n params.complete(data, params);\n removeCallback();\n };\n\n removeCallback = function() {\n try {\n return delete window[callback];\n } catch (_error) {\n window[callback] = void 0;\n return void 0;\n }\n };\n\n script = window.document.createElement('script');\n script.src = computedUrl(params);\n script.async = true;\n\n timeoutHandle = setTimeout(function() {\n timeoutHandle = null;\n var err = new Error(\"JSONP request did not respond in time!\");\n err.url = (script && script.src) || null;\n params.error(err);\n removeCallback();\n return params.complete(err, params);\n }, params.timeout);\n\n script.onerror = function(evt) {\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n params.error({\n url: script.src,\n event: evt\n });\n return params.complete({\n url: script.src,\n event: evt\n }, params);\n };\n\n script.onload = script.onreadystatechange = function() {\n if (!done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {\n done = true;\n script.onload = script.onreadystatechange = null;\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n //jshint -W093\n return script = null;\n //jshint +W093\n }\n };\n\n head = head || window.document.getElementsByTagName('head')[0] || window.document.documentElement;\n return head.insertBefore(script, head.firstChild);\n }\n };\n\n JSONP.requestCounter = 0;\n JSONP.makeUrl = computedUrl;\n JSONP.objectToURI = objectToURI;\n\n if ((typeof define !== \"undefined\" && define !== null) && define.amd) {\n define(function() {\n return JSONP;\n });\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = JSONP;\n } else {\n this.JSONP = JSONP;\n }\n\n}).call(okanjo);\n","// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\nif (!Object.keys) {\n Object.keys = (function() {\n 'use strict';\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n return function(obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }());\n}\n\n//// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\n//if (typeof Object.create != 'function') {\n// Object.create = (function() {\n// var Temp = function() {};\n// return function (prototype) {\n// if (arguments.length > 1) {\n// throw new Error('Second argument not supported');\n// }\n// if (typeof prototype != 'object') {\n// throw new TypeError('Argument must be an object');\n// }\n// Temp.prototype = prototype;\n// var result = new Temp();\n// Temp.prototype = null;\n// return result;\n// };\n// })();\n//}\n\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\nif (!Array.isArray) {\n Array.isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n };\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.14\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\n// Reference: http://es5.github.io/#x15.4.4.14\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function(searchElement, fromIndex) {\n\n var k;\n\n /* jshint ignore:start */\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) { //\n throw new TypeError('\"this\" is null or not defined');\n }\n /* jshint ignore:end */\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\nif (!Array.prototype.every) {\n Array.prototype.every = function(callbackfn, thisArg) {\n 'use strict';\n var T, k;\n\n // jshint -W041\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n // jshint +W041\n\n // 1. Let O be the result of calling ToObject passing the this\n // value as the argument.\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get internal method\n // of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.\n if (typeof callbackfn !== 'function') {\n throw new TypeError();\n }\n\n // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 1) {\n T = thisArg;\n }\n\n // 6. Let k be 0.\n k = 0;\n\n // 7. Repeat, while k < len\n while (k < len) {\n\n var kValue;\n\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the HasProperty internal\n // method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n if (k in O) {\n\n // i. Let kValue be the result of calling the Get internal method\n // of O with argument Pk.\n kValue = O[k];\n\n // ii. Let testResult be the result of calling the Call internal method\n // of callbackfn with T as the this value and argument list\n // containing kValue, k, and O.\n var testResult = callbackfn.call(T, kValue, k, O);\n\n // iii. If ToBoolean(testResult) is false, return false.\n if (!testResult) {\n return false;\n }\n }\n k++;\n }\n return true;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\nif (!Array.prototype.filter) {\n Array.prototype.filter = function(fun/*, thisArg*/) {\n 'use strict';\n\n if (this === void 0 || this === null) {\n throw new TypeError();\n }\n\n var t = Object(this),\n len = t.length >>> 0;\n\n if (typeof fun !== 'function') {\n throw new TypeError();\n }\n\n var res = [],\n thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t) {\n var val = t[i];\n\n // NOTE: Technically this should Object.defineProperty at\n // the next index, as push can be affected by\n // properties on Object.prototype and Array.prototype.\n // But that method's new, and collisions should be\n // rare, so use the more-compatible alternative.\n if (fun.call(thisArg, val, i, t)) {\n res.push(val);\n }\n }\n }\n\n return res;\n };\n}\n\n// Doesn't work in IE7 so it's only here for reference\n//https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n(function() {\n if (!Event.prototype.preventDefault) {\n Event.prototype.preventDefault=function() {\n //noinspection JSUnusedGlobalSymbols\n this.returnValue=false;\n };\n }\n if (!Event.prototype.stopPropagation) {\n Event.prototype.stopPropagation=function() {\n //noinspection JSUnusedGlobalSymbols\n this.cancelBubble=true;\n };\n }\n if (!Element.prototype.addEventListener) {\n var eventListeners=[];\n\n var addEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var self=this;\n var wrapper=function(e) {\n e.target=e.srcElement;\n e.currentTarget=self;\n if (listener.handleEvent) {\n listener.handleEvent(e);\n } else {\n listener.call(self,e);\n }\n };\n if (type==\"DOMContentLoaded\") {\n var wrapper2=function(e) {\n if (document.readyState==\"complete\") {\n wrapper(e);\n }\n };\n document.attachEvent(\"onreadystatechange\",wrapper2);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper2});\n\n if (document.readyState==\"complete\") {\n //noinspection JSClosureCompilerSyntax\n var e=new Event();\n e.srcElement=window;\n wrapper2(e);\n }\n } else {\n this.attachEvent(\"on\"+type,wrapper);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper});\n }\n };\n var removeEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var counter=0;\n while (counter~+]/\n , normalizr = /^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g\n , splitters = /[\\s\\>\\+\\~]/\n , splittersMore = /(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/\n , specialChars = /([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g\n , simple = /^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/\n , attr = /\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/\n , pseudo = /:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/\n , easy = new RegExp(idOnly.source + '|' + tagOnly.source + '|' + classOnly.source)\n , dividers = new RegExp('(' + splitters.source + ')' + splittersMore.source, 'g')\n , tokenizr = new RegExp(splitters.source + splittersMore.source)\n , chunker = new RegExp(simple.source + '(' + attr.source + ')?' + '(' + pseudo.source + ')?')\n\n var walker = {\n ' ': function (node) {\n return node && node !== html && node.parentNode\n }\n , '>': function (node, contestant) {\n return node && node.parentNode == contestant.parentNode && node.parentNode\n }\n , '~': function (node) {\n return node && node.previousSibling\n }\n , '+': function (node, contestant, p1, p2) {\n if (!node) return false\n return (p1 = previous(node)) && (p2 = previous(contestant)) && p1 == p2 && p1\n }\n }\n\n function cache() {\n this.c = {}\n }\n cache.prototype = {\n g: function (k) {\n return this.c[k] || undefined\n }\n , s: function (k, v, r) {\n v = r ? new RegExp(v) : v\n return (this.c[k] = v)\n }\n }\n\n var classCache = new cache()\n , cleanCache = new cache()\n , attrCache = new cache()\n , tokenCache = new cache()\n\n function classRegex(c) {\n return classCache.g(c) || classCache.s(c, '(^|\\\\s+)' + c + '(\\\\s+|$)', 1)\n }\n\n // not quite as fast as inline loops in older browsers so don't use liberally\n function each(a, fn) {\n var i = 0, l = a.length\n for (; i < l; i++) fn(a[i])\n }\n\n function flatten(ar) {\n for (var r = [], i = 0, l = ar.length; i < l; ++i) arrayLike(ar[i]) ? (r = r.concat(ar[i])) : (r[r.length] = ar[i])\n return r\n }\n\n function arrayify(ar) {\n var i = 0, l = ar.length, r = []\n for (; i < l; i++) r[i] = ar[i]\n return r\n }\n\n function previous(n) {\n while (n = n.previousSibling) if (n[nodeType] == 1) break;\n return n\n }\n\n function q(query) {\n return query.match(chunker)\n }\n\n // called using `this` as element and arguments from regex group results.\n // given => div.hello[title=\"world\"]:foo('bar')\n // div.hello[title=\"world\"]:foo('bar'), div, .hello, [title=\"world\"], title, =, world, :foo('bar'), foo, ('bar'), bar]\n function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {\n var i, m, k, o, classes\n if (this[nodeType] !== 1) return false\n if (tag && tag !== '*' && this[tagName] && this[tagName].toLowerCase() !== tag) return false\n if (idsAndClasses && (m = idsAndClasses.match(id)) && m[1] !== this.id) return false\n if (idsAndClasses && (classes = idsAndClasses.match(clas))) {\n for (i = classes.length; i--;) if (!classRegex(classes[i].slice(1)).test(this.className)) return false\n }\n if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) return false\n if (wholeAttribute && !value) { // select is just for existance of attrib\n o = this.attributes\n for (k in o) {\n if (Object.prototype.hasOwnProperty.call(o, k) && (o[k].name || k) == attribute) {\n return this\n }\n }\n }\n if (wholeAttribute && !checkAttr(qualifier, getAttr(this, attribute) || '', value)) {\n // select is for attrib equality\n return false\n }\n return this\n }\n\n function clean(s) {\n return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\\\$1'))\n }\n\n function checkAttr(qualify, actual, val) {\n switch (qualify) {\n case '=':\n return actual == val\n case '^=':\n return actual.match(attrCache.g('^=' + val) || attrCache.s('^=' + val, '^' + clean(val), 1))\n case '$=':\n return actual.match(attrCache.g('$=' + val) || attrCache.s('$=' + val, clean(val) + '$', 1))\n case '*=':\n return actual.match(attrCache.g(val) || attrCache.s(val, clean(val), 1))\n case '~=':\n return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, '(?:^|\\\\s+)' + clean(val) + '(?:\\\\s+|$)', 1))\n case '|=':\n return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, '^' + clean(val) + '(-|$)', 1))\n }\n return 0\n }\n\n // given a selector, first check for simple cases then collect all base candidate matches and filter\n function _qwery(selector, _root) {\n var r = [], ret = [], i, l, m, token, tag, els, intr, item, root = _root\n , tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n , dividedTokens = selector.match(dividers)\n\n if (!tokens.length) return r\n\n token = (tokens = tokens.slice(0)).pop() // copy cached tokens, take the last one\n if (tokens.length && (m = tokens[tokens.length - 1].match(idOnly))) root = byId(_root, m[1])\n if (!root) return r\n\n intr = q(token)\n // collect base candidates to filter\n els = root !== _root && root[nodeType] !== 9 && dividedTokens && /^[+~]$/.test(dividedTokens[dividedTokens.length - 1]) ?\n function (r) {\n while (root = root.nextSibling) {\n root[nodeType] == 1 && (intr[1] ? intr[1] == root[tagName].toLowerCase() : 1) && (r[r.length] = root)\n }\n return r\n }([]) :\n root[byTag](intr[1] || '*')\n // filter elements according to the right-most part of the selector\n for (i = 0, l = els.length; i < l; i++) {\n if (item = interpret.apply(els[i], intr)) r[r.length] = item\n }\n if (!tokens.length) return r\n\n // filter further according to the rest of the selector (the left side)\n each(r, function (e) { if (ancestorMatch(e, tokens, dividedTokens)) ret[ret.length] = e })\n return ret\n }\n\n // compare element to a selector\n function is(el, selector, root) {\n if (isNode(selector)) return el == selector\n if (arrayLike(selector)) return !!~flatten(selector).indexOf(el) // if selector is an array, is el a member?\n\n var selectors = selector.split(','), tokens, dividedTokens\n while (selector = selectors.pop()) {\n tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n dividedTokens = selector.match(dividers)\n tokens = tokens.slice(0) // copy array\n if (interpret.apply(el, q(tokens.pop())) && (!tokens.length || ancestorMatch(el, tokens, dividedTokens, root))) {\n return true\n }\n }\n return false\n }\n\n // given elements matching the right-most part of a selector, filter out any that don't match the rest\n function ancestorMatch(el, tokens, dividedTokens, root) {\n var cand\n // recursively work backwards through the tokens and up the dom, covering all options\n function crawl(e, i, p) {\n while (p = walker[dividedTokens[i]](p, e)) {\n if (isNode(p) && (interpret.apply(p, q(tokens[i])))) {\n if (i) {\n if (cand = crawl(p, i - 1, p)) return cand\n } else return p\n }\n }\n }\n return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))\n }\n\n function isNode(el, t) {\n return el && typeof el === 'object' && (t = el[nodeType]) && (t == 1 || t == 9)\n }\n\n function uniq(ar) {\n var a = [], i, j;\n o:\n for (i = 0; i < ar.length; ++i) {\n for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o\n a[a.length] = ar[i]\n }\n return a\n }\n\n function arrayLike(o) {\n return (typeof o === 'object' && isFinite(o.length))\n }\n\n function normalizeRoot(root) {\n if (!root) return doc\n if (typeof root == 'string') return qwery(root)[0]\n if (!root[nodeType] && arrayLike(root)) return root[0]\n return root\n }\n\n function byId(root, id, el) {\n // if doc, query on it, else query the parent doc or if a detached fragment rewrite the query and run on the fragment\n return root[nodeType] === 9 ? root.getElementById(id) :\n root.ownerDocument &&\n (((el = root.ownerDocument.getElementById(id)) && isAncestor(el, root) && el) ||\n (!isAncestor(root, root.ownerDocument) && select('[id=\"' + id + '\"]', root)[0]))\n }\n\n function qwery(selector, _root) {\n var m, el, root = normalizeRoot(_root)\n\n // easy, fast cases that we can dispatch with simple DOM calls\n if (!root || !selector) return []\n if (selector === window || isNode(selector)) {\n return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : []\n }\n if (selector && arrayLike(selector)) return flatten(selector)\n if (m = selector.match(easy)) {\n if (m[1]) return (el = byId(root, m[1])) ? [el] : []\n if (m[2]) return arrayify(root[byTag](m[2]))\n if (hasByClass && m[3]) return arrayify(root[byClass](m[3]))\n }\n\n return select(selector, root)\n }\n\n // where the root is not document and a relationship selector is first we have to\n // do some awkward adjustments to get it to work, even with qSA\n function collectSelector(root, collector) {\n return function (s) {\n var oid, nid\n if (splittable.test(s)) {\n if (root[nodeType] !== 9) {\n // make sure the el has an id, rewrite the query, set root to doc and run it\n if (!(nid = oid = root.getAttribute('id'))) root.setAttribute('id', nid = '__qwerymeupscotty')\n s = '[id=\"' + nid + '\"]' + s // avoid byId and allow us to match context element\n collector(root.parentNode || root, s, true)\n oid || root.removeAttribute('id')\n }\n return;\n }\n s.length && collector(root, s, false)\n }\n }\n\n var isAncestor = 'compareDocumentPosition' in html ?\n function (element, container) {\n return (container.compareDocumentPosition(element) & 16) == 16\n } : 'contains' in html ?\n function (element, container) {\n container = container[nodeType] === 9 || container == window ? html : container\n return container !== element && container.contains(element)\n } :\n function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , getAttr = function () {\n // detect buggy IE src/href getAttribute() call\n var e = doc.createElement('p')\n return ((e.innerHTML = 'x') && e.firstChild.getAttribute('href') != '#x') ?\n function (e, a) {\n return a === 'class' ? e.className : (a === 'href' || a === 'src') ?\n e.getAttribute(a, 2) : e.getAttribute(a)\n } :\n function (e, a) { return e.getAttribute(a) }\n }()\n , hasByClass = !!doc[byClass]\n // has native qSA support\n , hasQSA = doc.querySelector && doc[qSA]\n // use native qSA\n , selectQSA = function (selector, root) {\n var result = [], ss, e\n try {\n if (root[nodeType] === 9 || !splittable.test(selector)) {\n // most work is done right here, defer to qSA\n return arrayify(root[qSA](selector))\n }\n // special case where we need the services of `collectSelector()`\n each(ss = selector.split(','), collectSelector(root, function (ctx, s) {\n e = ctx[qSA](s)\n if (e.length == 1) result[result.length] = e.item(0)\n else if (e.length) result = result.concat(arrayify(e))\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n } catch (ex) { }\n return selectNonNative(selector, root)\n }\n // no native selector support\n , selectNonNative = function (selector, root) {\n var result = [], items, m, i, l, r, ss\n selector = selector.replace(normalizr, '$1')\n if (m = selector.match(tagAndOrClass)) {\n r = classRegex(m[2])\n items = root[byTag](m[1] || '*')\n for (i = 0, l = items.length; i < l; i++) {\n if (r.test(items[i].className)) result[result.length] = items[i]\n }\n return result\n }\n // more complex selector, get `_qwery()` to do the work for us\n each(ss = selector.split(','), collectSelector(root, function (ctx, s, rewrite) {\n r = _qwery(s, ctx)\n for (i = 0, l = r.length; i < l; i++) {\n if (ctx[nodeType] === 9 || rewrite || isAncestor(r[i], root)) result[result.length] = r[i]\n }\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n }\n , configure = function (options) {\n // configNativeQSA: use fully-internal selector or native qSA where present\n if (typeof options[useNativeQSA] !== 'undefined')\n select = !options[useNativeQSA] ? selectNonNative : hasQSA ? selectQSA : selectNonNative\n }\n\n configure({ useNativeQSA: true })\n\n qwery.configure = configure\n qwery.uniq = uniq\n qwery.is = is\n qwery.pseudos = {}\n\n return qwery\n});\n\n/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.onDomReady = factory();\n }\n}(this, function() {\n\n 'use strict';\n\n var win = window,\n doc = win.document,\n docElem = doc.documentElement,\n\n LOAD = \"load\",\n FALSE = false,\n ONLOAD = \"on\"+LOAD,\n COMPLETE = \"complete\",\n READYSTATE = \"readyState\",\n ATTACHEVENT = \"attachEvent\",\n DETACHEVENT = \"detachEvent\",\n ADDEVENTLISTENER = \"addEventListener\",\n DOMCONTENTLOADED = \"DOMContentLoaded\",\n ONREADYSTATECHANGE = \"onreadystatechange\",\n REMOVEEVENTLISTENER = \"removeEventListener\",\n\n // W3C Event model\n w3c = ADDEVENTLISTENER in doc,\n top = FALSE,\n\n // isReady: Is the DOM ready to be used? Set to true once it occurs.\n isReady = FALSE,\n\n // Callbacks pending execution until DOM is ready\n callbacks = [];\n\n // Handle when the DOM is ready\n function ready( fn ) {\n if ( !isReady ) {\n\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return defer( ready );\n }\n\n // Remember that the DOM is ready\n isReady = true;\n\n // Execute all callbacks\n while ( fn = callbacks.shift() ) {\n defer( fn );\n }\n }\n }\n\n // The ready event handler\n function completed( event ) {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n detach();\n ready();\n }\n }\n\n // Clean-up method for dom ready events\n function detach() {\n if ( w3c ) {\n doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );\n } else {\n doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );\n win[DETACHEVENT]( ONLOAD, completed );\n }\n }\n\n // Defers a function, scheduling it to run after the current call stack has cleared.\n function defer( fn, wait ) {\n // Allow 0 to be passed\n setTimeout( fn, +wait >= 0 ? wait : 1 );\n }\n\n // Attach the listeners:\n\n // Catch cases where onDomReady is called after the browser event has already occurred.\n // we once tried to use readyState \"interactive\" here, but it caused issues like the one\n // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n if ( doc[READYSTATE] === COMPLETE ) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n defer( ready );\n\n // Standards-based browsers support DOMContentLoaded\n } else if ( w3c ) {\n // Use the handy event callback\n doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n\n // A fallback to window.onload, that will always work\n win[ADDEVENTLISTENER]( LOAD, completed, FALSE );\n\n // If IE event model is used\n } else {\n // Ensure firing before onload, maybe late but safe also for iframes\n doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );\n\n // A fallback to window.onload, that will always work\n win[ATTACHEVENT]( ONLOAD, completed );\n\n // If IE and not a frame\n // continually check to see if the document is ready\n try {\n top = win.frameElement == null && docElem;\n } catch(e) {}\n\n if ( top && top.doScroll ) {\n (function doScrollCheck() {\n if ( !isReady ) {\n try {\n // Use the trick by Diego Perini\n // http://javascript.nwbox.com/IEContentLoaded/\n top.doScroll(\"left\");\n } catch(e) {\n return defer( doScrollCheck, 50 );\n }\n\n // detach all dom ready events\n detach();\n\n // and execute any waiting functions\n ready();\n }\n })();\n }\n }\n\n function onDomReady( fn ) {\n // If DOM is ready, execute the function (async), otherwise wait\n isReady ? defer( fn ) : callbacks.push( fn );\n }\n\n // Add version\n onDomReady.version = \"1.4.0\";\n // Add method to check if DOM is ready\n onDomReady.isReady = function(){\n return isReady;\n };\n\n return onDomReady;\n}));\n\n\n\n}).apply(okanjo);\n\n/* jshint ignore:end */","//noinspection ThisExpressionReferencesGlobalObjectJS\n(function(okanjo, window) {\n\n\n function OkanjoMetrics() {\n\n this.default_channel = this.channel.external;\n\n this._queue = [];\n\n // Generate a page id\n this.pageId = okanjo.util.shortid();\n\n var pageArgs = okanjo.util.getPageArguments(true),\n urlSid = pageArgs[this.msid_key],\n cookieSid = okanjo.Cookie.get(this.msid_key),\n sourceContext = pageArgs[this.source_cx],\n sourceChannel = pageArgs[this.source_ch];\n\n // If for some reason, both are set, replace the cookie with the uri value (# CORRELATION)\n if (urlSid && cookieSid && urlSid != cookieSid) {\n this.trackEvent(this.object_type.metric_session, this.event_type.correlation, {\n id: urlSid+\"_\"+cookieSid,\n ch: this.default_channel,\n _noProcess: true\n });\n okanjo.Cookie.set(this.msid_key, urlSid, this.msid_ttl);\n }\n\n this.sid = urlSid || cookieSid || null;\n this.sourceCh = sourceChannel || null;\n this.sourceCx = sourceContext || null;\n\n this._lastKey = undefined;\n }\n\n OkanjoMetrics.prototype = {\n\n msid_key: \"ok_msid\",\n source_cx: \"ok_cx\",\n source_ch: \"ok_ch\",\n msid_ttl: 1460,\n\n strip_meta: ['key','callback','metrics_channel_context','metrics_context','mode'],\n\n constructor: OkanjoMetrics,\n\n event_type: {\n view: 'vw',\n impression: 'imp',\n interaction: 'int',\n correlation: 'cor'\n },\n\n\n action: {\n click: \"click\",\n inline_click: \"inline_click\"\n },\n\n\n object_type: {\n thirdparty_ad: 'ta',\n cart: 'ct',\n page: 'pg',\n widget: 'wg',\n product: 'pr',\n store: 'st',\n cause: 'ca',\n marketplace: 'mp',\n order: 'or',\n order_item: 'oi',\n user: 'ur',\n metric_session: 'mt'\n },\n\n\n channel: {\n product_widget: 'pw',\n ad_widget: 'aw',\n store_widget: 'sw',\n marketplace: 'mp',\n external: 'ex'\n },\n\n\n environment: {\n live: \"live\",\n testing: \"testing\"\n },\n\n\n /**\n * Reports an event\n * @param {string} object_type\n * @param {string} event_type\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} data\n * @param callback\n */\n trackEvent: function(object_type, event_type, data, callback) {\n\n data = data || {};\n data.object_type = object_type;\n data.event_type = event_type;\n\n // Make the key stick in case future events don't have an API key, we can get a fuzzy idea who's responsible for the event\n // This is also useful for auto page load events, were there is no key defined at time the event was created\n this._lastKey = data.key || data.key || (data.m && data.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Queue the event for publishing\n this.push(data, callback);\n },\n\n\n /**\n * Reports a page view\n * @param {{key: string, ea: string, id: string, ch: string, cx: string, url: string, env: string, m: object }} [data]\n * @param callback\n */\n trackPageView: function(data, callback) {\n\n data = data || {};\n\n // Set the current page URL as the object id\n data.id = data.id || window.location.href;\n\n // Set the context to external unless instructed otherwise\n data.ch = data.ch || this.default_channel;\n\n // Track the event\n this.trackEvent(this.object_type.page, this.event_type.view, data, callback);\n },\n\n\n /**\n * Sends an event\n * @param event\n * @param callback\n */\n track: function(event, callback) {\n\n if (!event || typeof event !== \"object\") { console.warn('[Okanjo.Metrics] event object data required'); return; }\n if (!event.object_type) { console.warn('[Okanjo.Metrics] object_type required'); return; }\n if (!event.event_type) { console.warn('[Okanjo.Metrics] event_type required'); return; }\n\n var object_type = event.object_type,\n event_type = event.event_type;\n\n delete event.object_type;\n delete event.event_type;\n\n this.normalizeEventData(event);\n\n okanjo.exec(okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }), event, function(err, res) {\n if (err) { console.warn('[Okanjo.Metrics] Reporting failed', err, res); }\n\n /*jslint -W030 */\n callback && (callback(err, res));\n });\n\n },\n\n /**\n * Normalizes event data for consistency and adds common information to the event\n * @param event\n */\n normalizeEventData: function(event) {\n\n // Stick the key in there, if not already set\n event.key = event.key || (event.m && event.m.key) || okanjo.key || this._lastKey || undefined;\n\n // Stick the publisher session token in there too, if present\n if (this.sid) {\n event.sid = this.sid;\n }\n\n // Clone the metadata, since it might be a direct reference to a widget property\n // Deleting properties on the meta object could be very destructive\n if (event.m) {\n var meta = {};\n for(var i in event.m) {\n if (event.m.hasOwnProperty(i) && this.strip_meta.indexOf(i) < 0) {\n meta[i] = event.m[i];\n }\n }\n event.m = meta;\n } else {\n event.m = {};\n }\n\n\n // If we were referred through a particular channel/context, then hold on to that for events emitted by this page\n if (this.sourceCh || this.sourceCx) {\n if (this.sourceCh) { event.m.ref_ch = this.sourceCh; }\n if (this.sourceCx) { event.m.ref_cx = this.sourceCx; }\n }\n\n // Automatically attach page load id\n event.m.pgid = this.pageId;\n\n // Automatically attach JS build version\n event.m.ok_ver = okanjo.version;\n\n // Pass the page's source reference\n if (document.referrer) {\n event.ref = document.referrer;\n }\n },\n\n\n ///**\n // * Generates the full URL to execute to track the metric. Useful for page redirection instead of straight tracking\n // * @param object_type\n // * @param event_type\n // * @param data\n // * @return {*}\n // */\n //getMetricUrl: function(object_type, event_type, data) {\n // return okanjo.JSONP.makeUrl({\n // url: okanjo.getRoute(okanjo.routes.metrics, { object_type: object_type, event_type: event_type }),\n // data: data\n // });\n //},\n\n\n /**\n * Update the metric sid to live for 4 years if not present\n * @param sid\n */\n updateSid: function(sid) {\n if (!this.sid && sid) {\n this.sid = sid;\n okanjo.Cookie.set(this.msid_key, sid, this.msid_ttl);\n }\n },\n\n\n /**\n * Queues an event for publishing\n * @param event\n * @param callback\n */\n push: function(event, callback) {\n this._queue.push({ event: event, callback: callback });\n\n // Start burning down the queue, unless the event says not to\n if (event._noProcess) {\n delete event._noProcess;\n } else {\n this._processQueue();\n }\n },\n\n\n /**\n * Processes the event queue\n * @private\n */\n _processQueue: function() {\n // If the queue is not already being processed, and there's stuff to process, continue sending them\n if (!this._processTimeout && this._queue.length > 0) {\n var self = this;\n this._processTimeout = setTimeout(function() {\n\n var item = self._queue.shift();\n if (item === undefined) {\n // Nothing in the queue, get outta here\n self._processTimeout = null;\n } else {\n // Track the item\n self.track(item.event, function(err, res) {\n\n // Update / Set the metric sid on the publisher\n if (res && res.data && res.data.sid) self.updateSid(res.data.sid);\n\n // When the item is done being tracked, iterate to the next metric then fire it's callback if set\n self._processTimeout = null;\n self._processQueue();\n /*jslint -W030 */\n item.callback && item.callback(err, res);\n });\n }\n\n }, 0);\n }\n },\n\n\n /**\n * Injects the elements box rectangle coordinates and page size into the given data object\n * @param element\n * @param [data]\n * @return {*|{}}\n */\n includeElementInfo: function(element, data) {\n\n var page = okanjo.util.getPageSize(),\n size = okanjo.util.getElementPosition(element);\n\n data = data || {};\n data.pw = page.w;\n data.ph = page.h;\n data.x1 = size.x1;\n data.y1 = size.y1;\n data.x2 = size.x2;\n data.y2 = size.y2;\n\n return data;\n },\n\n\n /**\n * Injects the viewport rectangle coordinates into the given data object\n * @param data\n * @return {*|{}}\n */\n includeViewportInfo: function(data) {\n\n var vp = okanjo.util.getViewportSize(),\n pos = okanjo.util.getScrollPosition();\n\n data = data || {};\n\n data.vx1 = pos.x;\n data.vy1 = pos.y;\n data.vx2 = data.vx1+vp.vw;\n data.vy2 = data.vy1+vp.vh;\n\n return data;\n },\n\n /**\n * Injects the event information into the given data object\n * @param event\n * @param data\n * @return {*|{}}\n */\n includeEventInfo: function(event, data) {\n var pos = okanjo.util.getEventPosition(event);\n data.ex = pos.ex;\n data.ey = pos.ey;\n return data;\n },\n\n /**\n * Copies a config object and another thing and flattens it\n * @param config\n * @param base\n * @return {{}|*}\n */\n copy: function(config, base) {\n return okanjo.util.flatten(okanjo.util.deepClone(config, base));\n },\n\n /**\n * Ensure that all parameters are less than the data limit\n * @param data\n * @return {*}\n */\n truncate: function(data) {\n for(var i in data) {\n if (data.hasOwnProperty(i) && typeof data[i] === \"string\") {\n data[i] = data[i].substr(0, 255);\n }\n }\n return data;\n }\n };\n\n okanjo.metrics = new OkanjoMetrics();\n\n})(okanjo, this);\n"],"sourceRoot":"./"} \ No newline at end of file diff --git a/dist/okanjo-templates.js b/dist/okanjo-templates.js index 7c345fb..be11884 100644 --- a/dist/okanjo-templates.js +++ b/dist/okanjo-templates.js @@ -1,4 +1,4 @@ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ (function(okanjo) {okanjo.mvc.registerCss("ad.block", ".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}", { id: 'okanjo-ad-block' }); okanjo.mvc.registerTemplate("ad.block", "
", function(data, options) { @@ -20,7 +20,7 @@ okanjo.mvc.registerCss("okanjo.modal", ".okanjo-expansion-root{position:relative okanjo.mvc.registerTemplate("okanjo.error", "{{ message }} {{#code}} Reference: {{ code }} {{/code}}", { css: ['okanjo.core'] }); - okanjo.mvc.registerCss("product.block", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\" \";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block' }); + okanjo.mvc.registerCss("product.block", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\" \";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block' }); var product_block = "
"; @@ -49,7 +49,7 @@ okanjo.mvc.registerTemplate("okanjo.error", "{{ message - okanjo.mvc.registerCss("product.block2", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\" \";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block2' }); + okanjo.mvc.registerCss("product.block2", ".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\" \";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\"...\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}", { id: 'okanjo-product-block2' }); var product_block2 = "", blockId = 0; diff --git a/dist/okanjo-templates.min.js b/dist/okanjo-templates.min.js index e9641cb..3c73ac3 100644 --- a/dist/okanjo-templates.min.js +++ b/dist/okanjo-templates.min.js @@ -1,4 +1,4 @@ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ -!function(o){o.mvc.registerCss("ad.block",".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}",{id:"okanjo-ad-block"}),o.mvc.registerTemplate("ad.block",'
',function(t,a){return t=t||{config:{}},a=o.util.clone(a),a.config=t.config,a.size=t.config.size||"undefined",a},{css:["ad.block"]}),o.mvc.registerCss("okanjo.core","",{id:"okanjo-core"}),o.mvc.registerCss("okanjo.modal",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:" ";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}',{id:"okanjo-modal"}),o.mvc.registerTemplate("okanjo.error","{{ message }} {{#code}} Reference: {{ code }} {{/code}}",{css:["okanjo.core"]}),o.mvc.registerCss("product.block",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:" ";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:"..."}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block"});var t='
';o.mvc.registerTemplate("product.block",t,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-block",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var n=o.util.deepClone(this.metricBase,{});return n.m=o.metrics.truncate(o.metrics.copy(this.config,n.m)),a.metricBaseJSON=JSON.stringify(n),a},{css:["product.block","okanjo.modal"]}),o.mvc.registerCss("product.block2",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:" ";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:"..."}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block2"});var a='',n=0;o.mvc.registerTemplate("product.block2",a,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-block2",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var e=o.util.deepClone(this.metricBase,{});e.m=o.metrics.truncate(o.metrics.copy(this.config,e.m)),a.metricBaseJSON=JSON.stringify(e),"leaderboard"==a.config.size||"large_mobile_banner"==a.config.size?(a.config.template_layout="list",a.config.template_cta_style="link"):"half_page"!=a.config.size&&"auto"!=a.config.size||(a.config.template_layout="list");var i=a.config.template_cta_color;if(i){var r,c="okanjo-product-block2-cus-"+n;r=".okanjo-product-block2."+c+" .okanjo-product-buy-button { color: "+i+";} .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid "+i+"; } .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: "+i+"; } ",o.mvc.registerCss(c,r,{id:c}),o.mvc.ensureCss(c)}return a.blockId=n++,a},{css:["product.block2","okanjo.modal"]}),o.mvc.registerCss("product.sidebar",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:" ";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:"..."}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-sidebar"}),o.mvc.registerTemplate("product.sidebar",t,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-sidebar",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var n=o.util.deepClone(this.metricBase,{});return n.m=o.metrics.truncate(o.metrics.copy(this.config,n.m)),a.metricBaseJSON=JSON.stringify(n),a},{css:["product.sidebar","okanjo.modal"]}),o.mvc.registerCss("product.single",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:" ";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:"..."}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-single"}),o.mvc.registerTemplate("product.single",t,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-single",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var n=o.util.deepClone(this.metricBase,{});return n.m=o.metrics.truncate(o.metrics.copy(this.config,n.m)),a.metricBaseJSON=JSON.stringify(n),a},{css:["product.single","okanjo.modal"]})}(okanjo); +/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +!function(o){o.mvc.registerCss("ad.block",".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}",{id:"okanjo-ad-block"}),o.mvc.registerTemplate("ad.block",'
',function(t,a){return t=t||{config:{}},a=o.util.clone(a),a.config=t.config,a.size=t.config.size||"undefined",a},{css:["ad.block"]}),o.mvc.registerCss("okanjo.core","",{id:"okanjo-core"}),o.mvc.registerCss("okanjo.modal",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:" ";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}',{id:"okanjo-modal"}),o.mvc.registerTemplate("okanjo.error","{{ message }} {{#code}} Reference: {{ code }} {{/code}}",{css:["okanjo.core"]}),o.mvc.registerCss("product.block",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:" ";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:"..."}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block"});var t='
';o.mvc.registerTemplate("product.block",t,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-block",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var n=o.util.deepClone(this.metricBase,{});return n.m=o.metrics.truncate(o.metrics.copy(this.config,n.m)),a.metricBaseJSON=JSON.stringify(n),a},{css:["product.block","okanjo.modal"]}),o.mvc.registerCss("product.block2",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:" ";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:"..."}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-block2"});var a='',n=0;o.mvc.registerTemplate("product.block2",a,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-block2",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var e=o.util.deepClone(this.metricBase,{});e.m=o.metrics.truncate(o.metrics.copy(this.config,e.m)),a.metricBaseJSON=JSON.stringify(e),"leaderboard"==a.config.size||"large_mobile_banner"==a.config.size?(a.config.template_layout="list",a.config.template_cta_style="link"):"half_page"!=a.config.size&&"auto"!=a.config.size||(a.config.template_layout="list");var i=a.config.template_cta_color;if(i){var r,c="okanjo-product-block2-cus-"+n;r=".okanjo-product-block2."+c+" .okanjo-product-buy-button { color: "+i+";} .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid "+i+"; } .okanjo-product-block2."+c+".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: "+i+"; } ",o.mvc.registerCss(c,r,{id:c}),o.mvc.ensureCss(c)}return a.blockId=n++,a},{css:["product.block2","okanjo.modal"]}),o.mvc.registerCss("product.sidebar",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:" ";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:"..."}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-sidebar"}),o.mvc.registerTemplate("product.sidebar",t,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-sidebar",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var n=o.util.deepClone(this.metricBase,{});return n.m=o.metrics.truncate(o.metrics.copy(this.config,n.m)),a.metricBaseJSON=JSON.stringify(n),a},{css:["product.sidebar","okanjo.modal"]}),o.mvc.registerCss("product.single",'.okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:" ";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:"..."}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}',{id:"okanjo-product-single"}),o.mvc.registerTemplate("product.single",t,function(t,a){t=t||{products:[],config:{}},a=o.util.clone(a),a.template_name="okanjo-product-single",a.config=t.config,a.proxy_url=this.proxy_url,a.products=o.mvc.formats.product(t.products),a.disable_popup=this.disable_popup?"1":"",a.instanceId=this.instanceId;var n=o.util.deepClone(this.metricBase,{});return n.m=o.metrics.truncate(o.metrics.copy(this.config,n.m)),a.metricBaseJSON=JSON.stringify(n),a},{css:["product.single","okanjo.modal"]})}(okanjo); //# sourceMappingURL=okanjo-templates.min.js.map diff --git a/dist/okanjo-templates.min.js.map b/dist/okanjo-templates.min.js.map index 7ace92b..fe65ac4 100644 --- a/dist/okanjo-templates.min.js.map +++ b/dist/okanjo-templates.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["ad.block.js","okanjo.core.js","product.block.js","product.block2.js","product.sidebar.js","product.single.js","okanjo-templates.js"],"names":["okanjo","mvc","registerCss","id","registerTemplate","data","options","config","util","clone","size","css","product_block","products","template_name","proxy_url","this","formats","product","disable_popup","instanceId","eventData","deepClone","metricBase","m","metrics","truncate","copy","metricBaseJSON","JSON","stringify","product_block2","blockId","template_layout","template_cta_style","brandColor","template_cta_color","brandCSS","brandCSSId","ensureCss"],"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IAAAgB,QAAAC,QAAAb,EAAAQ,UACAP,EAAAa,cAAAH,KAAAG,cAAA,IAAA,GACAb,EAAAc,WAAAJ,KAAAI,UAEA,IAAAC,GAAArB,EAAAQ,KAAAc,UAAAN,KAAAO,cAIA,OAHAF,GAAAG,EAAAxB,EAAAyB,QAAAC,SAAA1B,EAAAyB,QAAAE,KAAAX,KAAAT,OAAAc,EAAAG,IACAlB,EAAAsB,eAAAC,KAAAC,UAAAT,GAEAf,IAEAK,KAAA,kBAAA,kBCtBAX,EAAAC,IAAAC,YAAA,iBAAA,g3FAAAC,GAAA,0BAGAH,EAAAC,IAAAG,iBAAA,iBAAAQ,EAAA,SAAAP,EAAAC,GAEAD,EAAAA,IAAAQ,YAAAN,WACAD,EAAAN,EAAAQ,KAAAC,MAAAH,GAGAA,EAAAQ,cAAA,wBACAR,EAAAC,OAAAF,EAAAE,OACAD,EAAAS,UAAAC,KAAAD,UACAT,EAAAO,SAAAb,EAAAC,IAAAgB,QAAAC,QAAAb,EAAAQ,UACAP,EAAAa,cAAAH,KAAAG,cAAA,IAAA,GACAb,EAAAc,WAAAJ,KAAAI,UAEA,IAAAC,GAAArB,EAAAQ,KAAAc,UAAAN,KAAAO,cAIA,OAHAF,GAAAG,EAAAxB,EAAAyB,QAAAC,SAAA1B,EAAAyB,QAAAE,KAAAX,KAAAT,OAAAc,EAAAG,IACAlB,EAAAsB,eAAAC,KAAAC,UAAAT,GAEAf,IAEAK,KAAA,iBAAA,mBC2IGX","file":"okanjo-templates.min.js","sourcesContent":["okanjo.mvc.registerCss(\"ad.block\", \".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}\", { id: 'okanjo-ad-block' });\n\nokanjo.mvc.registerTemplate(\"ad.block\", \"
\", function(data, options) {\n // Ensure params\n data = data || { config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.config = data.config;\n options.size = data.config.size || \"undefined\";\n return options;\n}, {\n css: [ 'ad.block' ]\n});\n","\nokanjo.mvc.registerCss(\"okanjo.core\", \"\", { id: 'okanjo-core' });\nokanjo.mvc.registerCss(\"okanjo.modal\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:\\\" \\\";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}\", { id: 'okanjo-modal' });\n\nokanjo.mvc.registerTemplate(\"okanjo.error\", \"{{ message }} {{#code}} Reference: {{ code }} {{/code}}\", { css: ['okanjo.core'] });","\n okanjo.mvc.registerCss(\"product.block\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\\\" \\\";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block' });\n\n var product_block = \"
\";\n\n okanjo.mvc.registerTemplate(\"product.block\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block', 'okanjo.modal']\n });\n\n\n","\n okanjo.mvc.registerCss(\"product.block2\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \\\"Helvetica Neue\\\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\\\" \\\";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block2' });\n\n var product_block2 = \"\",\n blockId = 0;\n\n okanjo.mvc.registerTemplate(\"product.block2\", product_block2, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block2';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n\n // enforce format restrictions\n if ((options.config.size == \"leaderboard\") || (options.config.size == \"large_mobile_banner\")) {\n options.config.template_layout = \"list\";\n options.config.template_cta_style = \"link\";\n } else if ((options.config.size == \"half_page\") || (options.config.size == \"auto\")){\n options.config.template_layout = \"list\";\n }\n\n // add branding if necessary\n var brandColor = options.config.template_cta_color;\n\n if (brandColor) {\n var brandCSS,\n brandCSSId = \"okanjo-product-block2-cus-\" + blockId;\n\n brandCSS = \".okanjo-product-block2.\"+brandCSSId+\" .okanjo-product-buy-button { color: \"+brandColor+\";} \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid \"+brandColor+\"; } \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: \"+brandColor+\"; } \";\n\n okanjo.mvc.registerCss(brandCSSId, brandCSS, { id: brandCSSId });\n okanjo.mvc.ensureCss(brandCSSId);\n }\n\n options.blockId = blockId++;\n\n\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block2', 'okanjo.modal']\n });\n\n\n","\nokanjo.mvc.registerCss(\"product.sidebar\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:\\\" \\\";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-sidebar' });\n\n// Note: Requires product.block.js for product_block content\nokanjo.mvc.registerTemplate(\"product.sidebar\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-sidebar';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n}, {\n css: [ /*'okanjo.core',*/ 'product.sidebar', 'okanjo.modal']\n});\n \n \n","\n okanjo.mvc.registerCss(\"product.single\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:\\\" \\\";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-single' });\n\n // Note: Requires product.block.js for product_block content\n okanjo.mvc.registerTemplate(\"product.single\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-single';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.single', 'okanjo.modal']\n });\n\n\n","/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n(function(okanjo) {okanjo.mvc.registerCss(\"ad.block\", \".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}\", { id: 'okanjo-ad-block' });\n\nokanjo.mvc.registerTemplate(\"ad.block\", \"
\", function(data, options) {\n // Ensure params\n data = data || { config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.config = data.config;\n options.size = data.config.size || \"undefined\";\n return options;\n}, {\n css: [ 'ad.block' ]\n});\n\n\nokanjo.mvc.registerCss(\"okanjo.core\", \"\", { id: 'okanjo-core' });\nokanjo.mvc.registerCss(\"okanjo.modal\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:\\\" \\\";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}\", { id: 'okanjo-modal' });\n\nokanjo.mvc.registerTemplate(\"okanjo.error\", \"{{ message }} {{#code}} Reference: {{ code }} {{/code}}\", { css: ['okanjo.core'] });\n\n okanjo.mvc.registerCss(\"product.block\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\\\" \\\";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block' });\n\n var product_block = \"
\";\n\n okanjo.mvc.registerTemplate(\"product.block\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block', 'okanjo.modal']\n });\n\n\n\n\n okanjo.mvc.registerCss(\"product.block2\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \\\"Helvetica Neue\\\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\\\" \\\";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block2' });\n\n var product_block2 = \"\",\n blockId = 0;\n\n okanjo.mvc.registerTemplate(\"product.block2\", product_block2, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block2';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n\n // enforce format restrictions\n if ((options.config.size == \"leaderboard\") || (options.config.size == \"large_mobile_banner\")) {\n options.config.template_layout = \"list\";\n options.config.template_cta_style = \"link\";\n } else if ((options.config.size == \"half_page\") || (options.config.size == \"auto\")){\n options.config.template_layout = \"list\";\n }\n\n // add branding if necessary\n var brandColor = options.config.template_cta_color;\n\n if (brandColor) {\n var brandCSS,\n brandCSSId = \"okanjo-product-block2-cus-\" + blockId;\n\n brandCSS = \".okanjo-product-block2.\"+brandCSSId+\" .okanjo-product-buy-button { color: \"+brandColor+\";} \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid \"+brandColor+\"; } \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: \"+brandColor+\"; } \";\n\n okanjo.mvc.registerCss(brandCSSId, brandCSS, { id: brandCSSId });\n okanjo.mvc.ensureCss(brandCSSId);\n }\n\n options.blockId = blockId++;\n\n\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block2', 'okanjo.modal']\n });\n\n\n\n\nokanjo.mvc.registerCss(\"product.sidebar\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:\\\" \\\";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-sidebar' });\n\n// Note: Requires product.block.js for product_block content\nokanjo.mvc.registerTemplate(\"product.sidebar\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-sidebar';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n}, {\n css: [ /*'okanjo.core',*/ 'product.sidebar', 'okanjo.modal']\n});\n \n \n\n\n okanjo.mvc.registerCss(\"product.single\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:\\\" \\\";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-single' });\n\n // Note: Requires product.block.js for product_block content\n okanjo.mvc.registerTemplate(\"product.single\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-single';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.single', 'okanjo.modal']\n });\n\n\n})(okanjo);"],"sourceRoot":"./"} \ No newline at end of file +{"version":3,"sources":["ad.block.js","okanjo.core.js","product.block.js","product.block2.js","product.sidebar.js","product.single.js","okanjo-templates.js"],"names":["okanjo","mvc","registerCss","id","registerTemplate","data","options","config","util","clone","size","css","product_block","products","template_name","proxy_url","this","formats","product","disable_popup","instanceId","eventData","deepClone","metricBase","m","metrics","truncate","copy","metricBaseJSON","JSON","stringify","product_block2","blockId","template_layout","template_cta_style","brandColor","template_cta_color","brandCSS","brandCSSId","ensureCss"],"mappings":";CACA,SAAAA,GAAAA,EAAA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,UACAP,EAAAa,cAAAH,KAAAG,cAAA,IAAA,GACAb,EAAAc,WAAAJ,KAAAI,UAEA,IAAAC,GAAArB,EAAAQ,KAAAc,UAAAN,KAAAO,cAIA,OAHAF,GAAAG,EAAAxB,EAAAyB,QAAAC,SAAA1B,EAAAyB,QAAAE,KAAAX,KAAAT,OAAAc,EAAAG,IACAlB,EAAAsB,eAAAC,KAAAC,UAAAT,GAEAf,IAEAK,KAAA,kBAAA,kBCtBAX,EAAAC,IAAAC,YAAA,iBAAA,g3FAAAC,GAAA,0BAGAH,EAAAC,IAAAG,iBAAA,iBAAAQ,EAAA,SAAAP,EAAAC,GAEAD,EAAAA,IAAAQ,YAAAN,WACAD,EAAAN,EAAAQ,KAAAC,MAAAH,GAGAA,EAAAQ,cAAA,wBACAR,EAAAC,OAAAF,EAAAE,OACAD,EAAAS,UAAAC,KAAAD,UACAT,EAAAO,SAAAb,EAAAC,IAAAgB,QAAAC,QAAAb,EAAAQ,UACAP,EAAAa,cAAAH,KAAAG,cAAA,IAAA,GACAb,EAAAc,WAAAJ,KAAAI,UAEA,IAAAC,GAAArB,EAAAQ,KAAAc,UAAAN,KAAAO,cAIA,OAHAF,GAAAG,EAAAxB,EAAAyB,QAAAC,SAAA1B,EAAAyB,QAAAE,KAAAX,KAAAT,OAAAc,EAAAG,IACAlB,EAAAsB,eAAAC,KAAAC,UAAAT,GAEAf,IAEAK,KAAA,iBAAA,mBC2IGX","file":"okanjo-templates.min.js","sourcesContent":["okanjo.mvc.registerCss(\"ad.block\", \".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}\", { id: 'okanjo-ad-block' });\n\nokanjo.mvc.registerTemplate(\"ad.block\", \"
\", function(data, options) {\n // Ensure params\n data = data || { config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.config = data.config;\n options.size = data.config.size || \"undefined\";\n return options;\n}, {\n css: [ 'ad.block' ]\n});\n","\nokanjo.mvc.registerCss(\"okanjo.core\", \"\", { id: 'okanjo-core' });\nokanjo.mvc.registerCss(\"okanjo.modal\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:\\\" \\\";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}\", { id: 'okanjo-modal' });\n\nokanjo.mvc.registerTemplate(\"okanjo.error\", \"{{ message }} {{#code}} Reference: {{ code }} {{/code}}\", { css: ['okanjo.core'] });","\n okanjo.mvc.registerCss(\"product.block\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\\\" \\\";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block' });\n\n var product_block = \"
\";\n\n okanjo.mvc.registerTemplate(\"product.block\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block', 'okanjo.modal']\n });\n\n\n","\n okanjo.mvc.registerCss(\"product.block2\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \\\"Helvetica Neue\\\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\\\" \\\";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block2' });\n\n var product_block2 = \"\",\n blockId = 0;\n\n okanjo.mvc.registerTemplate(\"product.block2\", product_block2, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block2';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n\n // enforce format restrictions\n if ((options.config.size == \"leaderboard\") || (options.config.size == \"large_mobile_banner\")) {\n options.config.template_layout = \"list\";\n options.config.template_cta_style = \"link\";\n } else if ((options.config.size == \"half_page\") || (options.config.size == \"auto\")){\n options.config.template_layout = \"list\";\n }\n\n // add branding if necessary\n var brandColor = options.config.template_cta_color;\n\n if (brandColor) {\n var brandCSS,\n brandCSSId = \"okanjo-product-block2-cus-\" + blockId;\n\n brandCSS = \".okanjo-product-block2.\"+brandCSSId+\" .okanjo-product-buy-button { color: \"+brandColor+\";} \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid \"+brandColor+\"; } \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: \"+brandColor+\"; } \";\n\n okanjo.mvc.registerCss(brandCSSId, brandCSS, { id: brandCSSId });\n okanjo.mvc.ensureCss(brandCSSId);\n }\n\n options.blockId = blockId++;\n\n\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block2', 'okanjo.modal']\n });\n\n\n","\nokanjo.mvc.registerCss(\"product.sidebar\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:\\\" \\\";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-sidebar' });\n\n// Note: Requires product.block.js for product_block content\nokanjo.mvc.registerTemplate(\"product.sidebar\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-sidebar';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n}, {\n css: [ /*'okanjo.core',*/ 'product.sidebar', 'okanjo.modal']\n});\n \n \n","\n okanjo.mvc.registerCss(\"product.single\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:\\\" \\\";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-single' });\n\n // Note: Requires product.block.js for product_block content\n okanjo.mvc.registerTemplate(\"product.single\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-single';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.single', 'okanjo.modal']\n });\n\n\n","/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n(function(okanjo) {okanjo.mvc.registerCss(\"ad.block\", \".okanjo-ad-block{position:relative}.okanjo-ad-block .okanjo-ad-dynamic-product .okanjo-product-list{margin:0;width:100%}.okanjo-ad-block.okanjo-ad-fit{width:100%;height:100%;position:relative}.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-container,.okanjo-ad-block.okanjo-ad-fit .okanjo-ad-dynamic-product,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block,.okanjo-ad-block.okanjo-ad-fit .okanjo-product-list{height:100%;width:100%}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product{height:100%;width:100%;padding:0;box-sizing:border-box;margin:0}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-image-container{margin:.5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-title-container{height:auto;margin:1em .5em}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block .okanjo-product-price-container{position:absolute;bottom:.5em;background:#fff;padding:.25em 0 0;margin:0 1px 0 0;left:1px;right:1px}.okanjo-ad-block.okanjo-ad-fit .okanjo-product-block.lt-ie9 .okanjo-product-title-container:before{display:none}\", { id: 'okanjo-ad-block' });\n\nokanjo.mvc.registerTemplate(\"ad.block\", \"
\", function(data, options) {\n // Ensure params\n data = data || { config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.config = data.config;\n options.size = data.config.size || \"undefined\";\n return options;\n}, {\n css: [ 'ad.block' ]\n});\n\n\nokanjo.mvc.registerCss(\"okanjo.core\", \"\", { id: 'okanjo-core' });\nokanjo.mvc.registerCss(\"okanjo.modal\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}html.okanjo-modal-active{overflow:hidden!important}html.okanjo-modal-active body{overflow:hidden!important;margin:0}.okanjo-modal-margin-fix{margin-right:15px!important}.okanjo-modal-container{position:fixed;top:0;right:0;left:0;bottom:0;z-index:2147483647;background-color:rgba(0,0,0,.65);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-property:background-color;transition-property:background-color}.okanjo-modal-container.lt-ie9{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiWAoAAK4AqL41IDIAAAAASUVORK5CYII=)}.okanjo-modal-container.okanjo-modal-fade-out{background-color:rgba(0,0,0,0)}.okanjo-modal-container.okanjo-modal-fade-out .okanjo-modal-window{opacity:0;-webkit-transform:scale(.95,.95) translateY(50px);transform:scale(.95,.95) translateY(50px)}.okanjo-modal-container.okanjo-modal-hidden{display:none!important}.okanjo-modal-container .okanjo-modal-window{position:relative;max-width:900px;width:90%;background:0 0;margin:56px auto 40px;opacity:1;-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0);-webkit-transition-duration:210ms;transition-duration:210ms;-webkit-transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-timing-function:cubic-bezier(.13,.025,.15,1.15);transition-property:-webkit-transform,opacity}.okanjo-modal-container .okanjo-modal-window:after,.okanjo-modal-container .okanjo-modal-window:before{content:\\\" \\\";display:table}.okanjo-modal-container .okanjo-modal-window:after{clear:both}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #d7d7d7}.okanjo-modal-container .okanjo-modal-window .okanjo-modal-header img{height:50px;width:auto}.okanjo-modal-container .okanjo-modal-window-skin{width:auto;height:auto;box-shadow:0 10px 25px rgba(0,0,0,.5);position:absolute;background:#fff;border-radius:4px;top:0;bottom:0;left:0;right:0}.okanjo-modal-container .okanjo-modal-window-outer{position:absolute;top:15px;left:15px;bottom:15px;right:15px;vertical-align:top}.okanjo-modal-container .okanjo-modal-window-inner{position:relative;width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow:auto}.okanjo-modal-container .okanjo-modal-window-inner iframe{height:100%;width:100%;margin-right:-15px}.okanjo-modal-container .okanjo-modal-close-button{color:#fff;cursor:pointer;position:absolute;right:0;top:-48px;text-align:right;font-size:40px;line-height:1em;overflow:visible;width:40px;height:40px}\", { id: 'okanjo-modal' });\n\nokanjo.mvc.registerTemplate(\"okanjo.error\", \"{{ message }} {{#code}} Reference: {{ code }} {{/code}}\", { css: ['okanjo.core'] });\n\n okanjo.mvc.registerCss(\"product.block\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-block a{display:block;text-decoration:none}.okanjo-product-block a:after,.okanjo-product-block a:before{content:\\\" \\\";display:table}.okanjo-product-block a:after{clear:both}.okanjo-product-block .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-block .okanjo-product{width:130px;overflow:hidden;text-align:center;border:1px solid #ccc;padding:7px;margin:0 4px 1px 0;display:inline-block;box-shadow:1px 1px 1px 1px #eee;background-color:#fff;box-sizing:content-box}.lt-ie8.okanjo-product-block .okanjo-product{display:inline;zoom:1}.okanjo-product-block .okanjo-product-image-container{height:130px}.okanjo-product-block .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-block .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-block .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.okanjo-product-block .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px}.okanjo-product-block a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-block .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block' });\n\n var product_block = \"
\";\n\n okanjo.mvc.registerTemplate(\"product.block\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block', 'okanjo.modal']\n });\n\n\n\n\n okanjo.mvc.registerCss(\"product.block2\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-block2{color:#333;font:12px/1.2 \\\"Helvetica Neue\\\",Helvetica,Roboto,Arial,sans-serif}.okanjo-product-block2:after,.okanjo-product-block2:before{content:\\\" \\\";display:table}.okanjo-product-block2:after{clear:both}.okanjo-product-block2 .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-block2 .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-block2 .okanjo-product{display:block;float:left;background-color:#fff;box-sizing:content-box;width:148px;border:1px solid #e6e6e6;margin:0 -1px -1px 0}.okanjo-product-block2 .okanjo-product:last-child{margin:0}.okanjo-product-block2 a{display:block;overflow:hidden;color:#333;text-decoration:none;padding:10px}.okanjo-product-block2 a:hover{color:inherit;text-decoration:none}.okanjo-product-block2 .okanjo-product-image-container{float:left;overflow:hidden;text-align:center;vertical-align:middle;width:100%;height:128px;line-height:127px;margin:0 0 3px}.okanjo-product-block2 .okanjo-product-image{max-width:100%;max-height:100%;border:none;vertical-align:middle}.okanjo-product-block2 .okanjo-product-info-container{float:left;height:auto;width:100%}.okanjo-product-block2 .okanjo-product-seller-container{color:#999;font-size:11px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product-seller-container.newsprint{font-family:Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container{overflow:hidden;margin-top:3px;margin-bottom:4px;font-weight:700;font-size:12px;line-height:14px;height:45px;word-wrap:break-word}.okanjo-product-block2 .okanjo-product-title-container.newsprint{font:13px/15px Georgia,serif}.okanjo-product-block2 .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-block2 .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-block2 .okanjo-product-price-container{font-size:15px;line-height:1;margin-bottom:5px}.okanjo-product-block2 .okanjo-product-buy-button{color:#09f;font-size:12px;line-height:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-block2 .okanjo-product.list{width:298px;height:122px}.okanjo-product-block2 .okanjo-product.list a{padding:11px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-title-container{margin-top:4px;margin-bottom:6px}.okanjo-product-block2 .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px;margin:0 11px 0 0}.okanjo-product-block2 .okanjo-product.list .okanjo-product-info-container{height:auto;float:none}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-title-container{height:30px}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button{display:block;text-align:center;line-height:26px;padding:0 8px;border:1px solid #09f;border-radius:2px;-webkit-transition:50ms ease;transition:50ms ease}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:hover{background:#09f;color:#fff}.okanjo-product-block2.okanjo-cta-style-button .okanjo-product-buy-button:active{box-shadow:inset 0 3px 10px rgba(0,0,0,.15)}.okanjo-product-block2.medium_rectangle .okanjo-product{width:148px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product:first-child{width:149px;height:248px}.okanjo-product-block2.medium_rectangle .okanjo-product.list{width:298px;height:123px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-image-container{width:100px;height:100px;line-height:1px}.okanjo-product-block2.medium_rectangle .okanjo-product.list .okanjo-product-info-container{height:auto;float:left;width:165px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child{height:124px}.okanjo-product-block2.medium_rectangle .okanjo-product.list:first-child a{padding-top:12px}.okanjo-product-block2.leaderboard .okanjo-product{width:241px;height:88px}.okanjo-product-block2.leaderboard .okanjo-product:first-child{width:242px}.okanjo-product-block2.leaderboard .okanjo-product a{padding:7px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-image-container{width:74px;height:74px;line-height:1px;margin:0 7px 0 0}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container{font-size:11px;line-height:13px;height:26px;margin-top:1px;margin-bottom:4px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-title-container,.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-price-container{margin-bottom:3px}.okanjo-product-block2.leaderboard .okanjo-product .okanjo-product-title-container.newsprint{font:700 11px/13px Georgia,serif}.okanjo-product-block2.half_page .okanjo-product{height:118px}.okanjo-product-block2.half_page .okanjo-product:nth-last-child(n+2){height:119px}.okanjo-product-block2.half_page .okanjo-product .okanjo-product-image-container{width:96px;height:96px}.okanjo-product-block2.large_mobile_banner .okanjo-product{width:318px;height:98px}.okanjo-product-block2.large_mobile_banner .okanjo-product a{padding:6px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-image-container{width:86px;height:86px}.okanjo-product-block2.large_mobile_banner .okanjo-product .okanjo-product-title-container{height:30px}.okanjo-product-block2.auto{font-size:1em;width:100%}.okanjo-product-block2.auto .okanjo-product{width:100%;height:auto;border-left:none;border-right:none}.okanjo-product-block2.auto .okanjo-product a{max-width:500px;width:95%;margin:0 auto;padding:2.5%}.okanjo-product-block2.auto .okanjo-product.list{height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-image-container{width:18%;height:auto;line-height:1px}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-info-container{height:auto;float:none;margin-left:21%;width:79%}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-seller-container{height:auto;font-size:12px;line-height:1.2}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-price-container{height:auto;font-size:15px;line-height:1.5}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-title-container{font-size:15px;line-height:1.4;height:auto}.okanjo-product-block2.auto .okanjo-product.list .okanjo-product-buy-button{display:inline-block;font-size:14px;line-height:1.8;margin-bottom:-1.7%}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-price-container{line-height:1.3}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-title-container{line-height:1.25}.okanjo-product-block2.auto.okanjo-cta-style-button .okanjo-product.list .okanjo-product-buy-button{font-size:13px}.okanjo-adx-container{text-align:center}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-block2' });\n\n var product_block2 = \"\",\n blockId = 0;\n\n okanjo.mvc.registerTemplate(\"product.block2\", product_block2, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-block2';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n\n // enforce format restrictions\n if ((options.config.size == \"leaderboard\") || (options.config.size == \"large_mobile_banner\")) {\n options.config.template_layout = \"list\";\n options.config.template_cta_style = \"link\";\n } else if ((options.config.size == \"half_page\") || (options.config.size == \"auto\")){\n options.config.template_layout = \"list\";\n }\n\n // add branding if necessary\n var brandColor = options.config.template_cta_color;\n\n if (brandColor) {\n var brandCSS,\n brandCSSId = \"okanjo-product-block2-cus-\" + blockId;\n\n brandCSS = \".okanjo-product-block2.\"+brandCSSId+\" .okanjo-product-buy-button { color: \"+brandColor+\";} \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button { border: 1px solid \"+brandColor+\"; } \" +\n \".okanjo-product-block2.\"+brandCSSId+\".okanjo-cta-style-button .okanjo-product-buy-button:hover { background: \"+brandColor+\"; } \";\n\n okanjo.mvc.registerCss(brandCSSId, brandCSS, { id: brandCSSId });\n okanjo.mvc.ensureCss(brandCSSId);\n }\n\n options.blockId = blockId++;\n\n\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.block2', 'okanjo.modal']\n });\n\n\n\n\nokanjo.mvc.registerCss(\"product.sidebar\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-sidebar{font:14px Helvetica,Arial,sans-serif;line-height:1.2em;border:1px solid #ccc;background-color:#fff;width:298px;height:auto}.okanjo-product-sidebar a{display:block;text-decoration:none}.okanjo-product-sidebar a:after,.okanjo-product-sidebar a:before{content:\\\" \\\";display:table}.okanjo-product-sidebar a:after{clear:both}.okanjo-product-sidebar .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-sidebar .okanjo-product{height:123px;width:298px;overflow:hidden;border-top:1px solid #eee}.okanjo-product-sidebar .okanjo-product:first-of-type{height:124px;border-top:none}.okanjo-product-sidebar .okanjo-product-image-container{height:105px;width:105px;margin:10px;float:left}.okanjo-product-sidebar .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-sidebar .okanjo-product-title-container{line-height:17px;overflow:hidden;height:51px;margin:10px 10px 0 0;word-wrap:break-word}.okanjo-product-sidebar .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-sidebar .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-sidebar .okanjo-product-price-container{display:inline-block;line-height:21px;font-weight:700;color:#333;margin-top:5px;margin-bottom:5px;margin-right:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-price-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-sidebar .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-sidebar .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block;margin-top:5px}.lt-ie8.okanjo-product-sidebar .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-sidebar a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-sidebar .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-sidebar .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-sidebar' });\n\n// Note: Requires product.block.js for product_block content\nokanjo.mvc.registerTemplate(\"product.sidebar\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-sidebar';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n}, {\n css: [ /*'okanjo.core',*/ 'product.sidebar', 'okanjo.modal']\n});\n \n \n\n\n okanjo.mvc.registerCss(\"product.single\", \".okanjo-expansion-root{position:relative}.okanjo-expansion-root iframe.okanjo-ad-in-unit{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1}.okanjo-product-single{font:14px Helvetica,Arial,sans-serif;line-height:1.2em}.okanjo-product-single a{display:block;text-decoration:none}.okanjo-product-single a:after,.okanjo-product-single a:before{content:\\\" \\\";display:table}.okanjo-product-single a:after{clear:both}.okanjo-product-single .okanjo-product-list{list-style-type:none;padding:0;margin:0}.okanjo-product-single .okanjo-product{width:284px;height:234px;padding:7px;overflow:hidden;text-align:center;border:1px solid #ccc;display:inline-block;background-color:#fff}.lt-ie8.okanjo-product-single .okanjo-product{display:inline;zoom:1}.okanjo-product-single .okanjo-product-image-container{height:113px}.okanjo-product-single .okanjo-product-image{max-width:100%;max-height:100%;border:0}.okanjo-product-single .okanjo-product-title-container{line-height:17px;overflow:hidden;height:34px;margin:10px 0 0;word-wrap:break-word}.okanjo-product-single .okanjo-product-title-container>span{max-width:100%}.okanjo-product-single .okanjo-product-title-container span{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-title-container span{display:inline;zoom:1}.okanjo-product-single .okanjo-ellipses:after{content:\\\"...\\\"}.okanjo-product-single .okanjo-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.okanjo-product-single .okanjo-product-price-container{line-height:21px;font-weight:700;color:#333;margin-top:3px;margin-bottom:5px;margin-right:5px}.okanjo-product-single .okanjo-product-button-container{display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-button-container{display:inline;zoom:1}.okanjo-product-single .okanjo-product-buy-button{color:#333;border:1px solid #ccc;border-bottom-color:#bbb;background-color:#eee;background-repeat:no-repeat;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:.1s;transition:.1s;font-size:13px;border-radius:4px;padding:5px 12px 6px;position:relative;bottom:2px;display:inline-block}.lt-ie8.okanjo-product-single .okanjo-product-buy-button{display:inline;zoom:1}.okanjo-product-single a:hover .okanjo-product-buy-button{color:#111;border:1px solid #bbb;border-bottom-color:#aaa;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 3px rgba(0,0,0,.1)}.okanjo-product-single .okanjo-product-seller-container{margin-top:5px;height:17px;font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.okanjo-product-single .okanjo-product-seller-container .okanjo-product-seller-intro{color:#333}.okanjo-inline-buy-frame{display:block;height:100%;width:100%}\", { id: 'okanjo-product-single' });\n\n // Note: Requires product.block.js for product_block content\n okanjo.mvc.registerTemplate(\"product.single\", product_block, function(data, options) {\n // Ensure params\n data = data || { products: [], config: {} };\n options = okanjo.util.clone(options);\n\n // Copy, format and return the config and products\n options.template_name = 'okanjo-product-single';\n options.config = data.config;\n options.proxy_url = this.proxy_url;\n options.products = okanjo.mvc.formats.product(data.products);\n options.disable_popup = this.disable_popup ? \"1\" : \"\";\n options.instanceId = this.instanceId;\n\n var eventData = okanjo.util.deepClone(this.metricBase, {});\n eventData.m = okanjo.metrics.truncate(okanjo.metrics.copy(this.config, eventData.m));\n options.metricBaseJSON = JSON.stringify(eventData);\n\n return options;\n }, {\n css: [ /*'okanjo.core',*/ 'product.single', 'okanjo.modal']\n });\n\n\n})(okanjo);"],"sourceRoot":"./"} \ No newline at end of file diff --git a/dist/okanjo.js b/dist/okanjo.js index 101f786..dcac1a2 100644 --- a/dist/okanjo.js +++ b/dist/okanjo.js @@ -1,4 +1,4 @@ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ +/*! okanjo-js v0.8.4 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ (function(root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); @@ -25,7 +25,7 @@ okanjo = ok || {}; // Override version with this version - okanjo.version = "0.8.3"; + okanjo.version = "0.8.4"; // Override these later okanjo.qwery = noop; @@ -4677,7 +4677,7 @@ if (typeof JSON !== 'object') { // Load the container with placeholders to see how big we expand to. var size, items = [], i = 0, //sizes = '980x120|980x90|970x250|970x90|970x66|960x90|950x90|930x180|750x300|750x200|750x100|728x90|580x400|468x60|336x280|320x100|320x50|300x1050|300x600|300x250|300x100|300x50|300x31|292x30|250x360|250x250|240x400|240x133|234x60|220x90|200x446|200x200|180x150|160x600|125x125|120x600|120x240|120x60|88x31'.split('|'), - sizes = '300x250|728x90|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60'.split('|'), + sizes = '728x90|300x250|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60'.split('|'), sizeInstance, sizeInstanceWidth, sizeInstanceHeight; for ( ; i < this.config.take; i++) { @@ -4756,9 +4756,10 @@ if (typeof JSON !== 'object') { * @param size */ proto.loadAd = function(size) { - var adxframe = document.createElement('iframe'), + var adxContainer = document.createElement('div'), + adxFrame = document.createElement('iframe'), frameAttributes = { - 'class': 'okanjo-inline-buy-frame', + 'class': 'okanjo-adx-frame', frameborder: 0, vspace: 0, hspace: 0, @@ -4779,21 +4780,25 @@ if (typeof JSON !== 'object') { '<'+'/script>' + '<' +'script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"><'+'/script>'; + adxContainer.className = "okanjo-adx-container"; + adxContainer.appendChild(adxFrame); + this.element.innerHTML = ""; - this.element.appendChild(adxframe); - adxframe.contentWindow.document.open(); - adxframe.contentWindow.document.write(adxframeContent); - adxframe.contentWindow.document.close(); + this.element.appendChild(adxContainer); + + adxFrame.contentWindow.document.open(); + adxFrame.contentWindow.document.write(adxframeContent); + adxFrame.contentWindow.document.close(); for (var i in frameAttributes) { if (frameAttributes.hasOwnProperty(i)) { - adxframe.setAttribute(i, frameAttributes[i]); + adxFrame.setAttribute(i, frameAttributes[i]); } } - adxframe.className = "okanjo-ad-backfill"; - adxframe.setAttribute('width', size.width + "px"); - adxframe.setAttribute('height', size.height + "px"); + adxFrame.className = "okanjo-ad-backfill"; + adxFrame.setAttribute('width', size.width + "px"); + adxFrame.setAttribute('height', size.height + "px"); // Track backfill impression var eventData = okanjo.util.deepClone(this.metricBase, {}); diff --git a/dist/okanjo.min.js b/dist/okanjo.min.js index 785a008..1faa5fd 100644 --- a/dist/okanjo.min.js +++ b/dist/okanjo.min.js @@ -1,20 +1,20 @@ -/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */ -!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.okanjo=t()}(this,function(){var okanjo=function(e){function t(e){for(var t,n,i,r,o={},s=e.split("&"),a=0;ar?(n=decodeURIComponent(t),i=null):(n=decodeURIComponent(t.substring(0,r)),i=decodeURIComponent(t.substring(r+1))),n&&(o[n]=i)}catch(c){console.error("[Okanjo] Failed to parse URL parameter:",t,c)}return o}var n=void 0!==window.pageXOffset,i="CSS1Compat"===(document.compatMode||""),r=window.navigator.userAgent,o=function(){},s=e||{};s.version="0.8.4",s.qwery=o,s.metrics={trackEvent:o,trackPageView:o},s.routes={products:"/products",products_id:"/products/:product_id",products_sense:"/products/sense",metrics:"/metrics/:object_type/:event_type"},s.getRoute=function(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e=e.replace(":"+n,t[n]+""));return s.config.ads.apiUri+e},s.exec=function(e,t,n){t=t||{},s.JSONP({url:e,data:t,error:function(e){var t={statusCode:500,error:"Communication Error",message:e.message||"JSONP communication failure."};s.report("core-jsonp",e.error||new Error(t.message)),n(t,null)},success:function(e){var t,i;e?e.error?t=e:i=e:(t={statusCode:500,error:"Invalid Response",message:"Could not interpret the JSONP response."},s.report("core-jsonp",new Error(t.message))),n(t,i)}})},s.report=function(e,t){var n;"string"==typeof t?n=new Error("[Okanjo"+(e?" "+e:"")+"] "+t):"object"==typeof t&&t instanceof Error&&(n=t),console.error(n)};var a=s.util=s.util||{};/*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */ /*! based on shortid https://github.com/dylang/shortid */ -return a.trim=function(e){return(e||"").replace(/^\s+|\s+$/g,"")},a.empty=function(e){return null===e||void 0===e||"string"==typeof e&&""===a.trim(e)},a.clone=function(e){var t={};e=e||{};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},a.hash=function(e){var t=0;if(0===e.length)return""+t;for(var n=0;n=0;i--)0===n[i].name.indexOf("data-")&&(t[n[i].name.substr(5)]=n[i].value);return t},a.copyIfSet=function(e,t,n,i,r){function o(i){!t||void 0===t[i]||r.stripEmpty&&a.empty(t[i])||(e[n]=t[i])}if(i=i||n,r=r||{},"object"==typeof i&&Array.isArray(i))for(var s=0;so||s&&r>s;return{vw:a?o:i,vh:a?s:r}},a.getEventPosition=function(e){var t=e.pageX,n=e.pageY,i=document,r=i.body,o=i.documentElement,s="scrollLeft",a="scrollTop";return{ex:void 0===t?e.clientX+r[s]+o[s]:t,ey:void 0===n?e.clientY+r[a]+o[a]:n}},a.ellipsify=function(e,t){for(var n=t||e.parentNode,i=a.getElementSize(n).height,r=void 0!==e.textContent,o=r?e.textContent:e.innerText,s="",c=5e3,l=function(e){return s=e.substr(0,e.length-3)+s,"..."};a.getElementSize(e).height>i&&o.length>0&&c-- >0;)o=r?e.textContent:e.innerText,o=o.replace(/[\s\S](?:\.\.\.)?$/,l),r?e.textContent=o:e.innerText=o;if(s.length>0){var u=document.createElement("span"),d=document.createElement("span");u.setAttribute("class","okanjo-ellipses"),d.setAttribute("class","okanjo-visually-hidden"),r?(u.textContent=o.substr(0,o.length-3),d.textContent=s):(u.innerText=o.substr(0,o.length-3),d.innerText=s),e.innerHTML="",e.appendChild(u),e.appendChild(d)}},a.detectClasses=function(){var e=[];return navigator.appVersion.indexOf("MSIE 9.")!=-1?e.push("lt-ie10"):navigator.appVersion.indexOf("MSIE 8.")!=-1?e.push("lt-ie9"):navigator.appVersion.indexOf("MSIE 7.")!=-1?e.push("lt-ie8"):navigator.appVersion.indexOf("MSIE 6.")!=-1&&e.push("lt-ie7"),e},a.isFramed=function(){return window.top!==window.self},a.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(r)},a.isAndroid=function(){return/Android/.test(r)},a.isMobile=function(){return a.isiOS()||a.isAndroid()},a.getPageArguments=function(e){var n=t(window.location.search.substring(window.location.search.indexOf("?")+1));if(e){var i=t(window.location.hash.substring(Math.max(window.location.hash.indexOf("#")+1,window.location.hash.indexOf("#!")+2)));for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])}return n},a.deepClone=function(e,t){var n,i=0;if(Array.isArray(e))for(t=t||[];i>4*n&15|o()],t=e0&&(i+=s(t)),i+=s(r)}}(),s}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */ +return a.trim=function(e){return(e||"").replace(/^\s+|\s+$/g,"")},a.empty=function(e){return null===e||void 0===e||"string"==typeof e&&""===a.trim(e)},a.clone=function(e){var t={};e=e||{};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},a.hash=function(e){var t=0;if(0===e.length)return""+t;for(var n=0;n=0;i--)0===n[i].name.indexOf("data-")&&(t[n[i].name.substr(5)]=n[i].value);return t},a.copyIfSet=function(e,t,n,i,r){function o(i){!t||void 0===t[i]||r.stripEmpty&&a.empty(t[i])||(e[n]=t[i])}if(i=i||n,r=r||{},"object"==typeof i&&Array.isArray(i))for(var s=0;so||s&&r>s;return{vw:a?o:i,vh:a?s:r}},a.getEventPosition=function(e){var t=e.pageX,n=e.pageY,i=document,r=i.body,o=i.documentElement,s="scrollLeft",a="scrollTop";return{ex:void 0===t?e.clientX+r[s]+o[s]:t,ey:void 0===n?e.clientY+r[a]+o[a]:n}},a.ellipsify=function(e,t){for(var n=t||e.parentNode,i=a.getElementSize(n).height,r=void 0!==e.textContent,o=r?e.textContent:e.innerText,s="",c=5e3,l=function(e){return s=e.substr(0,e.length-3)+s,"..."};a.getElementSize(e).height>i&&o.length>0&&c-- >0;)o=r?e.textContent:e.innerText,o=o.replace(/[\s\S](?:\.\.\.)?$/,l),r?e.textContent=o:e.innerText=o;if(s.length>0){var u=document.createElement("span"),d=document.createElement("span");u.setAttribute("class","okanjo-ellipses"),d.setAttribute("class","okanjo-visually-hidden"),r?(u.textContent=o.substr(0,o.length-3),d.textContent=s):(u.innerText=o.substr(0,o.length-3),d.innerText=s),e.innerHTML="",e.appendChild(u),e.appendChild(d)}},a.detectClasses=function(){var e=[];return-1!=navigator.appVersion.indexOf("MSIE 9.")?e.push("lt-ie10"):-1!=navigator.appVersion.indexOf("MSIE 8.")?e.push("lt-ie9"):-1!=navigator.appVersion.indexOf("MSIE 7.")?e.push("lt-ie8"):-1!=navigator.appVersion.indexOf("MSIE 6.")&&e.push("lt-ie7"),e},a.isFramed=function(){return window.top!==window.self},a.isiOS=function(){return/(iPhone|iPad|iPod)/i.test(r)},a.isAndroid=function(){return/Android/.test(r)},a.isMobile=function(){return a.isiOS()||a.isAndroid()},a.getPageArguments=function(e){var n=t(window.location.search.substring(window.location.search.indexOf("?")+1));if(e){var i=t(window.location.hash.substring(Math.max(window.location.hash.indexOf("#")+1,window.location.hash.indexOf("#!")+2)));for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])}return n},a.deepClone=function(e,t){var n,i=0;if(Array.isArray(e))for(t=t||[];i>4*n&15|o()],t=e0&&(i+=s(t)),i+=s(r)}}(),s}(okanjo||window.okanjo),config=okanjo.config=okanjo.config||{};/*! Console-polyfill. | MIT license. | https://github.com/paulmillr/console-polyfill */ /*! Okanjo Local Storage Polyfill v1.0.0 | (c) 2013 Okanjo Partners Inc | Based on https://gist.github.com/juliocesar/926500/ddb28fb72903be87cb9044a945c6edbe1aa28b3a */ /*! Okanjo Cookie Helper v1.0.0 | (c) 2013 Okanjo Partners Inc */ -return config.key=config.key||void 0,config.marketplace={uri:"https://shop.okanjo.com",apiUri:"https://api.okanjo.com",routerUri:"https://shop.okanjo.com/widgets/router/",balancedMarketplacePath:"/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy",socketIOUri:"https://mke-rt.okanjo.com:13443"},config.ads={apiUri:"https://ads-api.okanjo.com"},okanjo.configure=function(e){Object.keys(e).every(function(t){return config[t]&&"object"==typeof config[t]&&"object"==typeof e[t]?Object.keys(e[t]).every(function(n){return config[t][n]=e[t][e[n]],!0}):config[t]=e[t],!0})},function(e,t){var n=e.TemplateEngine=function(t){t=t||{templates:{},css:{}},this._templates=t.templates||{},this._css=t.css||{},this.classDetects=e.util.detectClasses(),this.classDetects=this.classDetects.join(" ")};n.prototype={constructor:n,registerTemplate:function(t,n,i,r){if("object"==typeof n){if(void 0===n.nodeType)throw new Error("Parameter template must be a string or a DOM element");e.Mustache.parse(n)}else if("string"!=typeof n)throw new Error("Parameter template must be a string or a DOM element");if(3===arguments.length&&"object"==typeof i?(r=i,i=void 0):r=r||{},void 0!==i&&"function"!=typeof i)throw new Error("Parameter viewClosure must be a function");this._templates[t]={markup:n,options:r,viewClosure:i||null}},registerCss:function(e,t,n){if(n=n||{},"object"==typeof t){if(void 0===t.nodeType)throw new Error("Parameter css must be a string or a DOM element")}else if("string"!=typeof t)throw new Error("Parameter css must be a string or a DOM element");this._css[e]={markup:t,options:n}},isTemplateRegistered:function(e){return!!this._templates[e]},isCssRegistered:function(e){return!!this._css[e]},ensureCss:function(t){if(this._css[t]){var n=this._css[t],i=void 0===n.markup.nodeType?n.options.id||"okanjo-css-"+t:null;if(i){var r=e.qwery("#"+i);if(0===r.length){var o=e.qwery("head"),s=document.createElement("style");if(s.id=i,s.setAttribute("type","text/css"),s.hasOwnProperty?s.innerHTML=n.markup:s.styleSheet.cssText=n.markup,o.length>0)o[0].appendChild(s);else{var a=e.qwery("body");a.length>0&&a[0].appendChild(s)}}}}else console.warn('[Okanjo.Template] Attempted to add CSS template "'+t+'" to the DOM, however it does not appear to be registered?')},render:function(t,n,i,r){r=r||{};var o=this._templates[t],s=i;if(o.viewClosure&&(s=o.viewClosure.call(n,i,r)),s.okanjoConfig=e.config,s.okanjoMetricUrl=e.config.ads.apiUri.replace(/^https?:\/\//,""),s.now=function(){return(new Date).getTime()},s.classDetects=this.classDetects,r.blockClasses&&Array.isArray(r.blockClasses)&&(s.classDetects=s.classDetects+=" "+r.blockClasses.join(" ")),r.css!==!1&&o.options.css&&o.options.css.length>0)for(var a=0;a3?s%3:0,r+(s?o.substr(0,s)+i:"")+o.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+i)+(t?n+Math.abs(e-o).toFixed(t).slice(2):"")},product:function(t){if("object"==typeof t&&Array.isArray(t)){for(var n=[],i=0;i>>0;if(0===r)return-1;var o=+t||0;if(Math.abs(o)===1/0&&(o=0),o>=r)return-1;for(n=Math.max(o>=0?o:r-Math.abs(o),0);n>>0;if("function"!=typeof e)throw new TypeError;for(arguments.length>1&&(n=t),i=0;i>>0;if("function"!=typeof e)throw new TypeError;for(var i=[],r=arguments.length>=2?arguments[1]:void 0,o=0;o0)o[0].appendChild(s);else{var a=e.qwery("body");a.length>0&&a[0].appendChild(s)}}}}else console.warn('[Okanjo.Template] Attempted to add CSS template "'+t+'" to the DOM, however it does not appear to be registered?')},render:function(t,n,i,r){r=r||{};var o=this._templates[t],s=i;if(o.viewClosure&&(s=o.viewClosure.call(n,i,r)),s.okanjoConfig=e.config,s.okanjoMetricUrl=e.config.ads.apiUri.replace(/^https?:\/\//,""),s.now=function(){return(new Date).getTime()},s.classDetects=this.classDetects,r.blockClasses&&Array.isArray(r.blockClasses)&&(s.classDetects=s.classDetects+=" "+r.blockClasses.join(" ")),r.css!==!1&&o.options.css&&o.options.css.length>0)for(var a=0;ae?"-":"",o=parseInt(e=Math.abs(+e||0).toFixed(t))+"",s=o.length;return s=s>3?s%3:0,r+(s?o.substr(0,s)+i:"")+o.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+i)+(t?n+Math.abs(e-o).toFixed(t).slice(2):"")},product:function(t){if("object"==typeof t&&Array.isArray(t)){for(var n=[],i=0;is;s++)e.call(r,n[s])&&a.push(n[s]);return a}}()),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),r=i.length>>>0;if(0===r)return-1;var o=+t||0;if(Math.abs(o)===1/0&&(o=0),o>=r)return-1;for(n=Math.max(o>=0?o:r-Math.abs(o),0);r>n;){if(n in i&&i[n]===e)return n;n++}return-1}),Array.prototype.every||(Array.prototype.every=function(e,t){"use strict";var n,i;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),o=r.length>>>0;if("function"!=typeof e)throw new TypeError;for(arguments.length>1&&(n=t),i=0;o>i;){var s;if(i in r){s=r[i];var a=e.call(n,s,i,r);if(!a)return!1}i++}return!0}),Array.prototype.filter||(Array.prototype.filter=function(e){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var i=[],r=arguments.length>=2?arguments[1]:void 0,o=0;n>o;o++)if(o in t){var s=t[o];e.call(r,s,o,t)&&i.push(s)}return i}),function(){if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),!Element.prototype.addEventListener){var e=[],t=function(t,n){var i=this,r=function(e){e.target=e.srcElement,e.currentTarget=i,n.handleEvent?n.handleEvent(e):n.call(i,e)};if("DOMContentLoaded"==t){var o=function(e){"complete"==document.readyState&&r(e)};if(document.attachEvent("onreadystatechange",o),e.push({object:this,type:t,listener:n,wrapper:o}),"complete"==document.readyState){var s=new Event;s.srcElement=window,o(s)}}else this.attachEvent("on"+t,r),e.push({object:this,type:t,listener:n,wrapper:r})},n=function(t,n){for(var i=0;ie?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,i,r,o,s,a=gap,c=t[e];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(c)){for(o=c.length,n=0;o>n;n+=1)s[n]=str(n,c)||"null";return r=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,r}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;o>n;n+=1)"string"==typeof rep[n]&&(i=rep[n],r=str(i,c),r&&s.push(quote(i)+(gap?": ":":")+r));else for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(r=str(i,c),r&&s.push(quote(i)+(gap?": ":":")+r));return r=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,r}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){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(){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","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,n){var i;if(gap="",indent="","number"==typeof n)for(i=0;n>i;i+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,i,r=e[t];if(r&&"object"==typeof r)for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i=walk(r,n),void 0!==i?r[n]=i:delete r[n]);return reviver.call(e,t,r)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\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,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),function(){/*! * @preserve Qwery - A Blazing Fast query selector engine * https://github.com/ded/qwery * copyright Dustin Diaz 2012 * MIT License */ -!function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t[e]=n()}("qwery",this,function(){function e(){this.c={}}function t(e){return K.g(e)||K.s(e,"(^|\\s+)"+e+"(\\s+|$)",1)}function n(e,t){for(var n=0,i=e.length;n~+]/,D=/^\s+|\s*([,\s\+\~>]|$)\s*/g,U=/[\s\>\+\~]/,q=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,z=/([.*+?\^=!:${}()|\[\]\/\\])/g,R=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,W=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,$=new RegExp(P.source+"|"+N.source+"|"+I.source),J=new RegExp("("+U.source+")"+q.source,"g"),B=new RegExp(U.source+q.source),V=new RegExp(R.source+"("+W.source+")?("+H.source+")?"),F={" ":function(e){return e&&e!==k&&e.parentNode},">":function(e,t){return e&&e.parentNode==t.parentNode&&e.parentNode},"~":function(e){return e&&e.previousSibling},"+":function(e,t,n,i){return!!e&&((n=o(e))&&(i=o(t))&&n==i&&n)}};e.prototype={g:function(e){return this.c[e]||void 0},s:function(e,t,n){return t=n?new RegExp(t):t,this.c[e]=t}};var K=new e,Q=new e,X=new e,Y=new e,Z="compareDocumentPosition"in k?function(e,t){return 16==(16&t.compareDocumentPosition(e))}:"contains"in k?function(e,t){return t=9===t[T]||t==window?k:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},G=function(){var e=b.createElement("p");return(e.innerHTML='x')&&"#x"!=e.firstChild.getAttribute("href")?function(e,t){return"class"===t?e.className:"href"===t||"src"===t?e.getAttribute(t,2):e.getAttribute(t)}:function(e,t){return e.getAttribute(t)}}(),ee=!!b[x],te=b.querySelector&&b[E],ne=function(e,t){var i,o,s=[];try{return 9!==t[T]&&L.test(e)?(n(i=e.split(","),_(t,function(e,t){o=e[E](t),1==o.length?s[s.length]=o.item(0):o.length&&(s=s.concat(r(o)))})),i.length>1&&s.length>1?f(s):s):r(t[E](e))}catch(a){}return ie(e,t)},ie=function(e,i){var r,o,s,a,c,l,d=[];if(e=e.replace(D,"$1"),o=e.match(M)){for(c=t(o[2]),r=i[j](o[1]||"*"),s=0,a=r.length;s1&&d.length>1?f(d):d},re=function(e){"undefined"!=typeof e[C]&&(w=e[C]&&te?ne:ie)};return re({useNativeQSA:!0}),v.configure=re,v.uniq=f,v.is=d,v.pseudos={},v}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */ +!function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t[e]=n()}("qwery",this,function(){function e(){this.c={}}function t(e){return K.g(e)||K.s(e,"(^|\\s+)"+e+"(\\s+|$)",1)}function n(e,t){for(var n=0,i=e.length;i>n;n++)t(e[n])}function i(e){for(var t=[],n=0,i=e.length;i>n;++n)m(e[n])?t=t.concat(e[n]):t[t.length]=e[n];return t}function r(e){for(var t=0,n=e.length,i=[];n>t;t++)i[t]=e[t];return i}function o(e){for(;(e=e.previousSibling)&&1!=e[T];);return e}function s(e){return e.match(V)}function a(e,n,i,r,o,s,a,c,u,d,h){var p,f,m,g,y;if(1!==this[T])return!1;if(n&&"*"!==n&&this[O]&&this[O].toLowerCase()!==n)return!1;if(i&&(f=i.match(S))&&f[1]!==this.id)return!1;if(i&&(y=i.match(A)))for(p=y.length;p--;)if(!t(y[p].slice(1)).test(this.className))return!1;if(u&&v.pseudos[u]&&!v.pseudos[u](this,h))return!1;if(r&&!a){g=this.attributes;for(m in g)if(Object.prototype.hasOwnProperty.call(g,m)&&(g[m].name||m)==o)return this}return r&&!l(s,G(this,o)||"",a)?!1:this}function c(e){return Q.g(e)||Q.s(e,e.replace(z,"\\$1"))}function l(e,t,n){switch(e){case"=":return t==n;case"^=":return t.match(X.g("^="+n)||X.s("^="+n,"^"+c(n),1));case"$=":return t.match(X.g("$="+n)||X.s("$="+n,c(n)+"$",1));case"*=":return t.match(X.g(n)||X.s(n,c(n),1));case"~=":return t.match(X.g("~="+n)||X.s("~="+n,"(?:^|\\s+)"+c(n)+"(?:\\s+|$)",1));case"|=":return t.match(X.g("|="+n)||X.s("|="+n,"^"+c(n)+"(-|$)",1))}return 0}function u(e,t){var i,r,o,c,l,u,d,p=[],f=[],m=t,g=Y.g(e)||Y.s(e,e.split(B)),v=e.match(J);if(!g.length)return p;if(c=(g=g.slice(0)).pop(),g.length&&(o=g[g.length-1].match(P))&&(m=y(t,o[1])),!m)return p;for(u=s(c),l=m!==t&&9!==m[T]&&v&&/^[+~]$/.test(v[v.length-1])?function(e){for(;m=m.nextSibling;)1==m[T]&&(u[1]?u[1]==m[O].toLowerCase():1)&&(e[e.length]=m);return e}([]):m[j](u[1]||"*"),i=0,r=l.length;r>i;i++)(d=a.apply(l[i],u))&&(p[p.length]=d);return g.length?(n(p,function(e){h(e,g,v)&&(f[f.length]=e)}),f):p}function d(e,t,n){if(p(t))return e==t;if(m(t))return!!~i(t).indexOf(e);for(var r,o,c=t.split(",");t=c.pop();)if(r=Y.g(t)||Y.s(t,t.split(B)),o=t.match(J),r=r.slice(0),a.apply(e,s(r.pop()))&&(!r.length||h(e,r,o,n)))return!0;return!1}function h(e,t,n,i){function r(e,i,c){for(;c=F[n[i]](c,e);)if(p(c)&&a.apply(c,s(t[i]))){if(!i)return c;if(o=r(c,i-1,c))return o}}var o;return(o=r(e,t.length-1,e))&&(!i||Z(o,i))}function p(e,t){return e&&"object"==typeof e&&(t=e[T])&&(1==t||9==t)}function f(e){var t,n,i=[];e:for(t=0;t~+]/,D=/^\s+|\s*([,\s\+\~>]|$)\s*/g,U=/[\s\>\+\~]/,q=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,z=/([.*+?\^=!:${}()|\[\]\/\\])/g,R=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,W=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,$=new RegExp(P.source+"|"+I.source+"|"+N.source),J=new RegExp("("+U.source+")"+q.source,"g"),B=new RegExp(U.source+q.source),V=new RegExp(R.source+"("+W.source+")?("+H.source+")?"),F={" ":function(e){return e&&e!==k&&e.parentNode},">":function(e,t){return e&&e.parentNode==t.parentNode&&e.parentNode},"~":function(e){return e&&e.previousSibling},"+":function(e,t,n,i){return e?(n=o(e))&&(i=o(t))&&n==i&&n:!1}};e.prototype={g:function(e){return this.c[e]||void 0},s:function(e,t,n){return t=n?new RegExp(t):t,this.c[e]=t}};var K=new e,Q=new e,X=new e,Y=new e,Z="compareDocumentPosition"in k?function(e,t){return 16==(16&t.compareDocumentPosition(e))}:"contains"in k?function(e,t){return t=9===t[T]||t==window?k:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},G=function(){var e=b.createElement("p");return(e.innerHTML='x')&&"#x"!=e.firstChild.getAttribute("href")?function(e,t){return"class"===t?e.className:"href"===t||"src"===t?e.getAttribute(t,2):e.getAttribute(t)}:function(e,t){return e.getAttribute(t)}}(),ee=!!b[x],te=b.querySelector&&b[E],ne=function(e,t){var i,o,s=[];try{return 9!==t[T]&&L.test(e)?(n(i=e.split(","),_(t,function(e,t){o=e[E](t),1==o.length?s[s.length]=o.item(0):o.length&&(s=s.concat(r(o)))})),i.length>1&&s.length>1?f(s):s):r(t[E](e))}catch(a){}return ie(e,t)},ie=function(e,i){var r,o,s,a,c,l,d=[];if(e=e.replace(D,"$1"),o=e.match(M)){for(c=t(o[2]),r=i[j](o[1]||"*"),s=0,a=r.length;a>s;s++)c.test(r[s].className)&&(d[d.length]=r[s]);return d}return n(l=e.split(","),_(i,function(e,t,n){for(c=u(t,e),s=0,a=c.length;a>s;s++)(9===e[T]||n||Z(c[s],i))&&(d[d.length]=c[s])})),l.length>1&&d.length>1?f(d):d},re=function(e){"undefined"!=typeof e[C]&&(w=e[C]&&te?ne:ie)};return re({useNativeQSA:!0}),v.configure=re,v.uniq=f,v.is=d,v.pseudos={},v}),/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */ function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.onDomReady=t()}(this,function(){"use strict";function e(t){if(!b){if(!s.body)return i(e);for(b=!0;t=k.shift();)i(t)}}function t(t){(_||t.type===c||s[h]===d)&&(n(),e())}function n(){_?(s[v](g,t,l),o[v](c,t,l)):(s[f](y,t),o[f](u,t))}function i(e,t){setTimeout(e,+t>=0?t:1)}function r(e){b?i(e):k.push(e)}var o=window,s=o.document,a=s.documentElement,c="load",l=!1,u="on"+c,d="complete",h="readyState",p="attachEvent",f="detachEvent",m="addEventListener",g="DOMContentLoaded",y="onreadystatechange",v="removeEventListener",_=m in s,w=l,b=l,k=[];if(s[h]===d)i(e);else if(_)s[m](g,t,l),o[m](c,t,l);else{s[p](y,t),o[p](u,t);try{w=null==o.frameElement&&a}catch(x){}w&&w.doScroll&&!function j(){if(!b){try{w.doScroll("left")}catch(t){return i(j,50)}n(),e()}}()}return r.version="1.4.0",r.isReady=function(){return b},r}),/*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ -function(e,t){"object"==typeof exports&&exports?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Mustache={})}(this,function(e){function t(e){return"function"==typeof e}function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(e,t){return f.call(e,t)}function r(e){return!i(m,e)}function o(e){return String(e).replace(/[&<>"'\/]/g,function(e){return g[e]})}function s(t,i){function o(){if(k&&!x)for(;g.length;)delete m[g.pop()];else g=[];k=!1,x=!1}function s(e){if("string"==typeof e&&(e=e.split(v,2)),!p(e)||2!==e.length)throw new Error("Invalid tags: "+e);u=new RegExp(n(e[0])+"\\s*"),d=new RegExp("\\s*"+n(e[1])),h=new RegExp("\\s*"+n("}"+e[1]))}if(!t)return[];var u,d,h,f=[],m=[],g=[],k=!1,x=!1;s(i||e.tags);for(var j,E,C,O,T,S,A=new l(t);!A.eos();){if(j=A.pos,C=A.scanUntil(u))for(var P=0,I=C.length;P0?o[o.length-1][4]:i;break;default:r.push(t)}return i}function l(e){this.string=e,this.tail=e,this.pos=0}function u(e,t){this.view=null==e?{}:e,this.cache={".":this.view},this.parent=t}function d(){this.cache={}}var h=Object.prototype.toString,p=Array.isArray||function(e){return"[object Array]"===h.call(e)},f=RegExp.prototype.test,m=/\S/,g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},y=/\s*/,v=/\s+/,_=/\s*=/,w=/\s*\}/,b=/#|\^|\/|>|\{|&|=|!/;l.prototype.eos=function(){return""===this.tail},l.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},l.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},u.prototype.push=function(e){return new u(e,this)},u.prototype.lookup=function(e){var n,i=this.cache;if(e in i)n=i[e];else{for(var r,o,s=this;s;){if(e.indexOf(".")>0)for(n=s.view,r=e.split("."),o=0;null!=n&&o"===o?s=this._renderPartial(r,t,n,i):"&"===o?s=this._unescapedValue(r,t):"name"===o?s=this._escapedValue(r,t):"text"===o&&(s=this._rawValue(r)),void 0!==s&&(a+=s);return a},d.prototype._renderSection=function(e,n,i,r){function o(e){return s.render(e,n,i)}var s=this,a="",c=n.lookup(e[1]);if(c){if(p(c))for(var l=0,u=c.length;l0){var e=this;this._processTimeout=setTimeout(function(){var t=e._queue.shift();void 0===t?e._processTimeout=null:e.track(t.event,function(n,i){i&&i.data&&i.data.sid&&e.updateSid(i.data.sid),e._processTimeout=null,e._processQueue(),t.callback&&t.callback(n,i)})},0)}},includeElementInfo:function(t,n){var i=e.util.getPageSize(),r=e.util.getElementPosition(t);return n=n||{},n.pw=i.w,n.ph=i.h,n.x1=r.x1,n.y1=r.y1,n.x2=r.x2,n.y2=r.y2,n},includeViewportInfo:function(t){var n=e.util.getViewportSize(),i=e.util.getScrollPosition();return t=t||{},t.vx1=i.x,t.vy1=i.y,t.vx2=t.vx1+n.vw,t.vy2=t.vy1+n.vh,t},includeEventInfo:function(t,n){var i=e.util.getEventPosition(t);return n.ex=i.ex,n.ey=i.ey,n},copy:function(t,n){return e.util.flatten(e.util.deepClone(t,n))},truncate:function(e){for(var t in e)e.hasOwnProperty(t)&&"string"==typeof e[t]&&(e[t]=e[t].substr(0,255));return e}},e.metrics=new n}(okanjo,this),function(e,t){e.metrics.trackPageView({_noProcess:!0}),setTimeout(function(){e.metrics._processQueue()},1e3)}(okanjo||this),function(e,t){var n=function(e,t){return e.indexOf(t)},i=function(){this.events={}};return i.prototype.on=function(e,t){"object"!=typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t)},i.prototype.removeListener=function(e,t){var i;"object"==typeof this.events[e]&&(i=n(this.events[e],t),i>-1&&this.events[e].splice(i,1))},i.prototype.emit=function(e){var t,n,i,r=[].slice.call(arguments,1);if("object"==typeof this.events[e])for(n=this.events[e].slice(),i=n.length,t=0;t=0}),i=n.length>0?Math.min.apply(null,n):-1;return i>0?e.substr(0,i):e},r.getCacheKey=function(){for(var n=[t.location.host+t.location.pathname],i=this.cacheKeyAttributes,r=0;r=0&&i.push(s)}for(o=0;ot,i.articleId&&(i.metricBase.m.aid=i.articleId),i.metricBase.m.pten=i.placementTest&&i.placementTest.enabled?"1":"0",i.placementTest&&(i.placementTest.id&&(i.metricBase.m.ptid=i.placementTest.id),i.placementTest.seed&&(i.metricBase.m.ptseed=i.placementTest.seed)),i.emit("data",o),i.showProducts(i.items),!i.shorted&&i.use_cache&&(!i.placementTest||i.placementTest&&!i.placementTest.enabled)){var s=i.getCacheKey();i.saveInCache(s,i.items)}i.emit("load",{fromCache:!1})}})},r.executeSearch=function(t){var i=e.util.deepClone(this.config);this.config.mode===n.contentTypes.sense?e.exec(e.getRoute(e.routes.products_sense),i,t):this.config.mode===n.contentTypes.single?e.exec(e.getRoute(e.routes.products_id,{product_id:this.config.id}),i,function(e,n){!e&&n&&n.data&&(n.data=[n.data]),t&&t(e,n)}):e.exec(e.getRoute(e.routes.products),i,t)},r.handleInlineBuyOption=function(){if(this.disable_inline_buy)for(var e=0;e=0&&(j=x);if(j){w.className+=" okanjo-ad-in-unit",w.setAttribute("height","100%"),w.setAttribute("width","100%"),j.appendChild(w),f=!0;var E=e.util.getElementSize(j);p.expandable=0,p.frame_height=E.height,p.frame_width=E.width,p.ad_size=j.getAttribute("data-size")||"undefined"}}a.ea=e.metrics.action.inline_click,a.m.expandable=1===p.expandable?"true":"false",o=i(a,_,h,p),w.src=o,f||e.modal.show(w)}else r?(a.ea=e.metrics.action.click,this.href=i(a,v,h,{}),this.click()):(a.ea=e.metrics.action.click,this.href=i(a,v,h,{}))},r.bindEvents=function(){var t=this;e.qwery("a",this.element).every(function(i){var r=i.getAttribute("data-id");if(r&&(i.addEventListener?i.addEventListener("click",n.interactTile):i.attachEvent("onclick",function(e){n.interactTile.call(i,e)}),t.config.metrics_context==e.metrics.channel.product_widget)){var o=i.getAttribute("data-backfill"),s=e.util.deepClone(t.metricBase,{});s.id=i.getAttribute("data-id"),s.m.bf="true"===o?1:0,s.m=e.metrics.truncate(e.metrics.copy(t.config,e.metrics.includeElementInfo(i.parentNode,s.m))),e.metrics.trackEvent(e.metrics.object_type.product,e.metrics.event_type.impression,s)}return!0}),e.qwery(".okanjo-product-title",this.element).every(function(t){return e.util.ellipsify(t),!0})},r.guessAdSize=function(){for(var t,n,i,r,o=[],s=0,a="300x250|728x90|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60".split("|");s';this.element.innerHTML="",this.element.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.write(a),i.contentWindow.document.close();for(var c in r)r.hasOwnProperty(c)&&i.setAttribute(c,r[c]);i.className="okanjo-ad-backfill",i.setAttribute("width",n.width+"px"),i.setAttribute("height",n.height+"px");var l=e.util.deepClone(this.metricBase,{});l.m.ta_w=n.width,l.m.ta_h=n.height,l.m.ta_pubid=o,l.m.ta_slotid=s,l.m=e.metrics.truncate(e.metrics.copy(this.config,e.metrics.includeElementInfo(this.element,l.m))),e.metrics.trackEvent(e.metrics.object_type.thirdparty_ad,e.metrics.event_type.impression,l)},e.Product=n,n}(okanjo,this),function(e,t){function n(t,n){e._Widget.call(this,t,n),this.config=n=n||{},this.templates={ad_error:"okanjo.error",ad_main:"ad.block"},this.css={ad_main:"ad.block"},this.disable_inline_buy=void 0!==this.config.disable_inline_buy&&n.disable_inline_buy===!0,this.proxy_url=null,this.configMap={key:"key",proxy_url:"proxy-url",content:"content",size:"size",expandable:"expandable",type:"type",id:"id",template_ad_main:"template-ad-main",template_ad_error:"template-ad-error",disable_inline_buy:"disable-inline-buy",template_product_main:"template-product-main",template_product_error:"template-product-error"},n.no_init||this.init()}e.util.inherits(n,e._Widget),n.contentTypes={creative:"creative",dynamic:"dynamic"},n.types={product:"product"},n.sizes={billboard:{width:970,height:250},button_2:{width:120,height:60},half_page:{width:300,height:600},leaderboard:{width:728,height:90},medium_rectangle:{width:300,height:250},micro_bar:{width:88,height:31},portrait:{width:300,height:1050},rectangle:{width:180,height:150},super_leaderboard:{width:970,height:90},wide_skyscraper:{width:160,height:600},large_mobile_banner:{width:320,height:100},mobile_leaderboard:{width:320,height:50},small_square:{width:200,height:200},button_1:{width:120,height:90},full_banner:{width:468,height:60},half_banner:{width:234,height:60},large_rectangle:{width:336,height:280},pop_under:{width:720,height:300},three_to_one_rectangle:{width:300,height:100},skyscraper:{width:120,height:600},square:{width:250,height:250},square_button:{width:125,height:125},vertical_banner:{width:120,height:240},vertical_rectangle:{width:240,height:400}};var i=n.prototype;return i.widgetName="Ad",i.load=function(){if(e.util.empty(this.config.content))this.hasCreativeContent()?this.config.content=n.contentTypes.creative:this.config.content=n.contentTypes.dynamic;else if(this.config.content!==n.contentTypes.creative||this.hasCreativeContent()){if(this.config.content===n.contentTypes.dynamic&&this.hasCreativeContent())console.warn("[Okanjo.Ad] Ad content is dynamic, but ad placement contains markup. Markup will be clobbered!");else if(!n.contentTypes.hasOwnProperty(this.config.content))return this.element.innerHTML=e.mvc.render(this.templates.ad_error,this,{message:"Invalid ad content: "+this.config.content}),e.report(this.widgetName,"Invalid ad content: "+this.config.content),!1}else console.warn("[Okanjo.Ad] Ad content is creative, but ad placement does not contain creative markup. Switching to dynamic!"),this.config.content=n.contentTypes.dynamic;if(e.util.empty(this.config.type)?this.config.type=n.types.product:n.types.hasOwnProperty(this.config.type)||(console.warn("[Okanjo."+this.widgetName+"] Unknown type",this.config.type,"given, using type `product` instead"),this.config.type=n.types.product),!e.util.empty(this.config.size)&&n.sizes.hasOwnProperty(this.config.size)&&this.setElementSize(n.sizes[this.config.size]),this.config.disable_inline_buy&&"string"==typeof this.config.disable_inline_buy&&(this.disable_inline_buy="true"===this.config.disable_inline_buy.toLowerCase()),this.config.proxy_url&&(this.proxy_url=this.config.proxy_url,delete this.config.proxy_url),e.metrics.trackEvent(e.metrics.object_type.widget,e.metrics.event_type.impression,{ch:e.metrics.channel.ad_widget,cx:this.config.content,m:e.metrics.copy(this.config,e.metrics.includeElementInfo(this.element,{wgid:this.instanceId}))}),this.config.type===n.types.product){if(e.util.empty(this.config.id))return this.element.innerHTML=e.mvc.render(this.templates.ad_error,this,{message:"Missing ad product id"}),e.report(this.widgetName,"Missing ad product id"),!1;if(this.config.content==n.contentTypes.dynamic)this.insertProductWidget();else{if(this.config.content!=n.contentTypes.creative)return this.element.innerHTML=e.mvc.render(this.templates.ad_error,this,{message:"Cannot render ad in content: "+this.config.content}),e.report(this.widgetName,"Cannot render ad in content: "+this.config.content),!1;this.insertCreativeWidget()}}return!0},i.render=function(){var t,i=document.createElement("div"),r=[],o=this.config.content==n.contentTypes.dynamic&&!e.util.empty(this.config.size);for(i.innerHTML=e.mvc.render(this.templates.ad_main,this,{config:this.config},{blockClasses:o?["okanjo-ad-fit"]:[]}),t=0;t0)this._waitingOnProductLoad=!1,e.Product.interactTile.call(n[0],t,!0);else if(!this._waitingOnProductLoad){this._waitingOnProductLoad=!0;var i=this,r=setInterval(function(){i._waitingOnProductLoad?i.interact(t):clearInterval(r)},250);console.warn("Waiting for Okanjo Product widget to load...")}},i.insertCreativeWidget=function(){this.insertProductWidget({hidden:!0});var e=this;this.element.addEventListener?this.element.addEventListener("click",function(t){e.interact(t); -}):this.element.attachEvent("onclick",function(t){e.interact(t)})},i.insertProductWidget=function(t){t=t||{};var n=document.createElement("div");n.className="okanjo-ad-dynamic-product",t.hidden&&(n.style.display="none"),this.element.appendChild(n),this.render();var i={id:this.config.id,key:this.key,mode:e.Product.contentTypes.single,disable_inline_buy:this.disable_inline_buy,disable_popup:this.config.disable_popup===!0,proxy_url:this.proxy_url,expandable:void 0===this.config.expandable||("boolean"==typeof this.config.expandable?this.config.expandable:"true"===(""+this.config.expandable).toLowerCase()),metrics_context:e.metrics.channel.ad_widget,metrics_channel_context:this.config.content,template_product_main:"product.single"};return this.config.template_product_main&&(i.template_product_main=this.config.template_product_main),this.config.template_product_error&&(i.template_product_error=this.config.template_product_error),this.productWidget=new e.Product(n,i),this.productWidget},i.setElementSize=function(e){this.element.style.display="block",this.element.style.overflow="hidden",this.element.style.width=e.width+"px",this.element.style.height=e.height+"px"},i.hasCreativeContent=function(){if(this.element.childElementCount&&this.element.childElementCount>0)return!0;for(var e=0;e"'\/]/g,function(e){return g[e]})}function s(t,i){function o(){if(k&&!x)for(;g.length;)delete m[g.pop()];else g=[];k=!1,x=!1}function s(e){if("string"==typeof e&&(e=e.split(v,2)),!p(e)||2!==e.length)throw new Error("Invalid tags: "+e);u=new RegExp(n(e[0])+"\\s*"),d=new RegExp("\\s*"+n(e[1])),h=new RegExp("\\s*"+n("}"+e[1]))}if(!t)return[];var u,d,h,f=[],m=[],g=[],k=!1,x=!1;s(i||e.tags);for(var j,E,C,O,T,S,A=new l(t);!A.eos();){if(j=A.pos,C=A.scanUntil(u))for(var P=0,N=C.length;N>P;++P)O=C.charAt(P),r(O)?g.push(m.length):x=!0,m.push(["text",O,j,j+1]),j+=1,"\n"===O&&o();if(!A.scan(u))break;if(k=!0,E=A.scan(b)||"name",A.scan(y),"="===E?(C=A.scanUntil(_),A.scan(_),A.scanUntil(d)):"{"===E?(C=A.scanUntil(h),A.scan(w),A.scanUntil(d),E="&"):C=A.scanUntil(d),!A.scan(d))throw new Error("Unclosed tag at "+A.pos);if(T=[E,C,j,A.pos],m.push(T),"#"===E||"^"===E)f.push(T);else if("/"===E){if(S=f.pop(),!S)throw new Error('Unopened section "'+C+'" at '+j);if(S[1]!==C)throw new Error('Unclosed section "'+S[1]+'" at '+j)}else"name"===E||"{"===E||"&"===E?x=!0:"="===E&&s(C)}if(S=f.pop())throw new Error('Unclosed section "'+S[1]+'" at '+A.pos);return c(a(m))}function a(e){for(var t,n,i=[],r=0,o=e.length;o>r;++r)t=e[r],t&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(i.push(t),n=t));return i}function c(e){for(var t,n,i=[],r=i,o=[],s=0,a=e.length;a>s;++s)switch(t=e[s],t[0]){case"#":case"^":r.push(t),o.push(t),r=t[4]=[];break;case"/":n=o.pop(),n[5]=t[2],r=o.length>0?o[o.length-1][4]:i;break;default:r.push(t)}return i}function l(e){this.string=e,this.tail=e,this.pos=0}function u(e,t){this.view=null==e?{}:e,this.cache={".":this.view},this.parent=t}function d(){this.cache={}}var h=Object.prototype.toString,p=Array.isArray||function(e){return"[object Array]"===h.call(e)},f=RegExp.prototype.test,m=/\S/,g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},y=/\s*/,v=/\s+/,_=/\s*=/,w=/\s*\}/,b=/#|\^|\/|>|\{|&|=|!/;l.prototype.eos=function(){return""===this.tail},l.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},l.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},u.prototype.push=function(e){return new u(e,this)},u.prototype.lookup=function(e){var n,i=this.cache;if(e in i)n=i[e];else{for(var r,o,s=this;s;){if(e.indexOf(".")>0)for(n=s.view,r=e.split("."),o=0;null!=n&&oc;++c)s=void 0,r=e[c],o=r[0],"#"===o?s=this._renderSection(r,t,n,i):"^"===o?s=this._renderInverted(r,t,n,i):">"===o?s=this._renderPartial(r,t,n,i):"&"===o?s=this._unescapedValue(r,t):"name"===o?s=this._escapedValue(r,t):"text"===o&&(s=this._rawValue(r)),void 0!==s&&(a+=s);return a},d.prototype._renderSection=function(e,n,i,r){function o(e){return s.render(e,n,i)}var s=this,a="",c=n.lookup(e[1]);if(c){if(p(c))for(var l=0,u=c.length;u>l;++l)a+=this.renderTokens(e[4],n.push(c[l]),i,r);else if("object"==typeof c||"string"==typeof c)a+=this.renderTokens(e[4],n.push(c),i,r);else if(t(c)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");c=c.call(n.view,r.slice(e[3],e[5]),o),null!=c&&(a+=c)}else a+=this.renderTokens(e[4],n,i,r);return a}},d.prototype._renderInverted=function(e,t,n,i){var r=t.lookup(e[1]);return!r||p(r)&&0===r.length?this.renderTokens(e[4],t,n,i):void 0},d.prototype._renderPartial=function(e,n,i){if(i){var r=t(i)?i(e[1]):i[e[1]];return null!=r?this.renderTokens(this.parse(r),n,i,r):void 0}},d.prototype._unescapedValue=function(e,t){var n=t.lookup(e[1]);return null!=n?n:void 0},d.prototype._escapedValue=function(t,n){var i=n.lookup(t[1]);return null!=i?e.escape(i):void 0},d.prototype._rawValue=function(e){return e[1]},e.name="mustache.js",e.version="1.1.0",e.tags=["{{","}}"];var k=new d;e.clearCache=function(){return k.clearCache()},e.parse=function(e,t){return k.parse(e,t)},e.render=function(e,t,n){return k.render(e,t,n)},e.to_html=function(n,i,r,o){var s=e.render(n,i,r);return t(o)?void o(s):s},e.escape=o,e.Scanner=l,e.Context=u,e.Writer=d})}.apply(okanjo),function(e,t){function n(){this.default_channel=this.channel.external,this._queue=[],this.pageId=e.util.shortid();var t=e.util.getPageArguments(!0),n=t[this.msid_key],i=e.Cookie.get(this.msid_key),r=t[this.source_cx],o=t[this.source_ch];n&&i&&n!=i&&(this.trackEvent(this.object_type.metric_session,this.event_type.correlation,{id:n+"_"+i,ch:this.default_channel,_noProcess:!0}),e.Cookie.set(this.msid_key,n,this.msid_ttl)),this.sid=n||i||null,this.sourceCh=o||null,this.sourceCx=r||null,this._lastKey=void 0}n.prototype={msid_key:"ok_msid",source_cx:"ok_cx",source_ch:"ok_ch",msid_ttl:1460,strip_meta:["key","callback","metrics_channel_context","metrics_context","mode"],constructor:n,event_type:{view:"vw",impression:"imp",interaction:"int",correlation:"cor"},action:{click:"click",inline_click:"inline_click"},object_type:{thirdparty_ad:"ta",cart:"ct",page:"pg",widget:"wg",product:"pr",store:"st",cause:"ca",marketplace:"mp",order:"or",order_item:"oi",user:"ur",metric_session:"mt"},channel:{product_widget:"pw",ad_widget:"aw",store_widget:"sw",marketplace:"mp",external:"ex"},environment:{live:"live",testing:"testing"},trackEvent:function(t,n,i,r){i=i||{},i.object_type=t,i.event_type=n,this._lastKey=i.key||i.key||i.m&&i.m.key||e.key||this._lastKey||void 0,this.push(i,r)},trackPageView:function(e,n){e=e||{},e.id=e.id||t.location.href,e.ch=e.ch||this.default_channel,this.trackEvent(this.object_type.page,this.event_type.view,e,n)},track:function(t,n){if(!t||"object"!=typeof t)return void console.warn("[Okanjo.Metrics] event object data required");if(!t.object_type)return void console.warn("[Okanjo.Metrics] object_type required");if(!t.event_type)return void console.warn("[Okanjo.Metrics] event_type required");var i=t.object_type,r=t.event_type;delete t.object_type,delete t.event_type,this.normalizeEventData(t),e.exec(e.getRoute(e.routes.metrics,{object_type:i,event_type:r}),t,function(e,t){e&&console.warn("[Okanjo.Metrics] Reporting failed",e,t),n&&n(e,t)})},normalizeEventData:function(t){if(t.key=t.key||t.m&&t.m.key||e.key||this._lastKey||void 0,this.sid&&(t.sid=this.sid),t.m){var n={};for(var i in t.m)t.m.hasOwnProperty(i)&&this.strip_meta.indexOf(i)<0&&(n[i]=t.m[i]);t.m=n}else t.m={};(this.sourceCh||this.sourceCx)&&(this.sourceCh&&(t.m.ref_ch=this.sourceCh),this.sourceCx&&(t.m.ref_cx=this.sourceCx)),t.m.pgid=this.pageId,t.m.ok_ver=e.version,document.referrer&&(t.ref=document.referrer)},updateSid:function(t){!this.sid&&t&&(this.sid=t,e.Cookie.set(this.msid_key,t,this.msid_ttl))},push:function(e,t){this._queue.push({event:e,callback:t}),e._noProcess?delete e._noProcess:this._processQueue()},_processQueue:function(){if(!this._processTimeout&&this._queue.length>0){var e=this;this._processTimeout=setTimeout(function(){var t=e._queue.shift();void 0===t?e._processTimeout=null:e.track(t.event,function(n,i){i&&i.data&&i.data.sid&&e.updateSid(i.data.sid),e._processTimeout=null,e._processQueue(),t.callback&&t.callback(n,i)})},0)}},includeElementInfo:function(t,n){var i=e.util.getPageSize(),r=e.util.getElementPosition(t);return n=n||{},n.pw=i.w,n.ph=i.h,n.x1=r.x1,n.y1=r.y1,n.x2=r.x2,n.y2=r.y2,n},includeViewportInfo:function(t){var n=e.util.getViewportSize(),i=e.util.getScrollPosition();return t=t||{},t.vx1=i.x,t.vy1=i.y,t.vx2=t.vx1+n.vw,t.vy2=t.vy1+n.vh,t},includeEventInfo:function(t,n){var i=e.util.getEventPosition(t);return n.ex=i.ex,n.ey=i.ey,n},copy:function(t,n){return e.util.flatten(e.util.deepClone(t,n))},truncate:function(e){for(var t in e)e.hasOwnProperty(t)&&"string"==typeof e[t]&&(e[t]=e[t].substr(0,255));return e}},e.metrics=new n}(okanjo,this),function(e,t){e.metrics.trackPageView({_noProcess:!0}),setTimeout(function(){e.metrics._processQueue()},1e3)}(okanjo||this),function(e,t){var n=function(e,t){return e.indexOf(t)},i=function(){this.events={}};return i.prototype.on=function(e,t){"object"!=typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t)},i.prototype.removeListener=function(e,t){var i;"object"==typeof this.events[e]&&(i=n(this.events[e],t),i>-1&&this.events[e].splice(i,1))},i.prototype.emit=function(e){var t,n,i,r=[].slice.call(arguments,1);if("object"==typeof this.events[e])for(n=this.events[e].slice(),i=n.length,t=0;i>t;t++)n[t].apply(this,r)},i.prototype.once=function(e,t){this.on(e,function n(){this.removeListener(e,n),t.apply(this,arguments)})},e._EventEmitter=i,i}(okanjo,this),function(e,t){var n=e.Cache,i=e._Widget=function(t,n){if(e._EventEmitter.call(this),!t||"object"!=typeof t||void 0===t.nodeType)throw new Error("Invalid element - must be a valid DOM element");if("undefined"!=typeof n&&"object"!=typeof n)throw new Error("Invalid configuration, must be an object or nothing at all, got: "+typeof n);n=n||{},this.instanceId=e.util.shortid(),this.element=t,this.config=n||{},this.configMap={},this.templates={error:"okanjo.error"},this.css={}};e.util.inherits(i,e._EventEmitter);var r=i.prototype;return r.widgetName="BaseWidget",r.config=null,r.use_cache=!1,r.cache_key_prefix="ok_widget_",r.cache_ttl=6e4,r.cacheKeyAttributes="id".split(","),r.init=function(){this.parseConfiguration(),this.processTemplateOverrides(),this.ensureTemplates(),this.findWidgetKey()&&this.load()&&this.autoCleanCache()},r.findWidgetKey=function(){return e.util.empty(this.config.key)?e.util.empty(e.key)?e.util.empty(this.key)?(this.config.key=this.key,!0):(this.element.innerHTML=e.mvc.render(this.templates.error,this,{message:"Missing Okanjo key."}),e.report(this.widgetName,"Missing key. Define one using okanjo.configure or pass the key parameter as an option in the "+this.widgetName+" constructor"),!1):(this.key=e.key,this.config.key=this.key,!0):(this.key=this.config.key,this.config.key=this.key,!0)},r.processTemplateOverrides=function(){var e;for(var t in this.config)this.config.hasOwnProperty(t)&&(e=t.match(/^template_(.+)$/),null!==e&&this.templates.hasOwnProperty(e[1])?this.templates[e[1]]=this.config[t]:(e=t.match(/^css_(.+)$/),null!==e&&this.css.hasOwnProperty(e[1])&&(this.css[e[1]]=this.config[t])))},r.ensureTemplates=function(){var t,n=this.templates,i=this.css;for(t in n)if(n.hasOwnProperty(t)&&!e.mvc.isTemplateRegistered(n[t]))throw new Error("[Okanjo."+this.widgetName+"] Missing template: "+n[t]+". Did you forget to include the template?");for(t in i)if(i.hasOwnProperty(t)&&!e.mvc.isCssRegistered(i[t]))throw new Error("[Okanjo."+this.widgetName+"] Missing css block: "+i[t]+". Did you forget to include the css template?")},r.parseConfiguration=function(){var t=e.util.data(this.element);e.util.copyIfSetMap(this.config,t,this.configMap,{stripEmpty:!0})},r.load=function(){return!0},r.autoCleanCache=function(){if(this.use_cache){var e=this;setTimeout(function(){e.cleanCache()},2e3)}},r.getCurrentPageUrl=function(){var e=t.location.href,n=[e.indexOf("?"),e.indexOf("#")].filter(function(e){return e>=0}),i=n.length>0?Math.min.apply(null,n):-1;return i>0?e.substr(0,i):e},r.getCacheKey=function(){for(var n=[t.location.host+t.location.pathname],i=this.cacheKeyAttributes,r=0;r=0&&i.push(s)}for(o=0;oe;e++)setTimeout(w,1e3*e+10)}),g(t,"resize",function(){setTimeout(w,100)}),g(r,"click",k),g(o,"click",function(e){e.preventDefault(),e.stopPropagation()}),g(l,"click",function(e){e.preventDefault(),e.stopPropagation(),k()})},g=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},y=function(e,t){e.className+=" "+t},v=function(e,t){e.className=e.className.replace(new RegExp(" *?"+t),"")},_=function(){return t.innerHeight||document.documentElement.clientHeight},w=function(){h=e.util.getScrollPosition().y,o.style.height=_()-80+"px"},b=function(){h=document.body.scrollTop,v(r,"okanjo-modal-hidden"),y(r,"okanjo-modal-fade-out"),w(),y(n,"okanjo-modal-active"),p||y(n,"okanjo-modal-margin-fix"),setTimeout(function(){v(r,"okanjo-modal-fade-out")},10)},k=function(){y(r,"okanjo-modal-fade-out"),setTimeout(function(){v(r,"okanjo-modal-fade-out"),y(r,"okanjo-modal-hidden"),v(n,"okanjo-modal-active"),p||v(n,"okanjo-modal-margin-fix")},210)},x=function(e){c.innerHTML="","string"==typeof e?c.innerHTML=e:c.appendChild(e)};return e.modal={show:function(e){d||(d=!0,f(),m()),x(e),b()},hide:function(){k()}},e.modal}(okanjo,this),function(e,t){function n(t,i){e._Widget.call(this,t,i),this.items=[],this.config=i=i||{mode:n.contentTypes.browse,use_cache:!1,cache_ttl:6e4},this.config.nag=void 0===i.nag?!0:i.nag===!0,this.config.use_cache=void 0===i.use_cache?!1:i.use_cache===!0,this.config.cache_ttl=void 0===i.cache_ttl?6e4:i.cache_ttl,this.disable_popup=i.disable_popup===!0,this.use_cache=this.config.use_cache,this.cache_ttl=this.config.cache_ttl,this.proxy_url=null,this.config.metrics_context=void 0===i.metrics_context?"pw":i.metrics_context,this.config.metrics_channel_context=void 0===i.metrics_channel_context?null:i.metrics_channel_context,this.disable_inline_buy=void 0===this.config.disable_inline_buy?!1:i.disable_inline_buy===!0,this.cache_key_prefix="ok_product_block_",this.templates={product_error:"okanjo.error",product_main:"product.block"},this.css={product_main:"product.block",product_modal:"okanjo.modal"},this.configMap={key:"key",mode:"mode",disable_inline_buy:"disable-inline-buy",proxy_url:"proxy-url",url:"url",selectors:"selectors",url_category:"url-category",id:"id",q:"q",marketplace_status:["marketplace-status"],marketplace_id:["marketplace-id"],pools:"pools",external_id:"external-id",sku:"sku",sold_by:"sold-by",external_store_id:"external-store-id",min_price:"min-price",max_price:"max-price",condition:"condition",manufacturer:"manufacturer",upc:"upc",isbn:"isbn",tags:"tags",category:"category",min_donation_percent:"min-donation-percent",max_donation_percent:"max-donation-percent",donation_to:"donation-to",suboptimal:"suboptimal",backfill:"backfill",skip:["skip","page-start"],take:["take","page-size"],expandable:"expandable",template_product_main:"template-product-main",template_product_error:"template-product-error",size:"size",template_layout:"template-layout",template_theme:"template-theme",template_cta_style:"template-cta-style",template_cta_text:"template-cta-text",template_cta_color:"template-cta-color"},i.no_init||this.init()}function i(t,n,i,r){var o,s,a=[],c=n.indexOf("?")<0?"?":"&";for(o in r)r.hasOwnProperty(o)&&a.push(o+"="+encodeURIComponent(r[o]));return e.metrics.normalizeEventData(t),t.n=(new Date).getTime(),s=n+(a.length>0?c+a.join("&"):""),i?t.u=i+encodeURIComponent(s):t.u=s,e.JSONP.makeUrl({url:e.getRoute(e.routes.metrics,{object_type:e.metrics.object_type.product,event_type:e.metrics.event_type.interaction}),data:t})}e.util.inherits(n,e._Widget),n.contentTypes={browse:"browse",sense:"sense",single:"single"};var r=n.prototype;return r.widgetName="Product",r.cacheKeyAttributes="mode,url,selectors,text,id,q,marketplace_status,marketplace_id,external_id,sku,sold_by,min_price,max_price,condition,manufacturer,upc,isbn,tags,category,min_donation_percent,max_donation_percent,donation_to,suboptimal,skip,take".split(","),r.load=function(){if(this.config.id||this.config.mode==n.contentTypes.single?e.util.empty(this.config.id)?this.config.mode=n.contentTypes.browse:this.config.mode=n.contentTypes.single:this.config.url||this.config.text||this.config.mode==n.contentTypes.sense?(e.util.empty(this.config.url)&&e.util.empty(this.config.text)&&(this.config.url=this.getCurrentPageUrl(),this.config.nag&&console.info("[Okanjo."+this.widgetName+"] No canonical url given for ProductSense. We recommend using a canonical url to ensure page visibility by Okanjo. Using derived url:",this.config.url)),this.config.mode=n.contentTypes.sense,this.config.take=this.config.take||5):this.config.mode=e.util.empty(this.config.mode)?n.contentTypes.browse:this.config.mode,function(e){for(var t=0;tt,i.articleId&&(i.metricBase.m.aid=i.articleId),i.metricBase.m.pten=i.placementTest&&i.placementTest.enabled?"1":"0",i.placementTest&&(i.placementTest.id&&(i.metricBase.m.ptid=i.placementTest.id),i.placementTest.seed&&(i.metricBase.m.ptseed=i.placementTest.seed)),i.emit("data",o),i.showProducts(i.items),!i.shorted&&i.use_cache&&(!i.placementTest||i.placementTest&&!i.placementTest.enabled)){var s=i.getCacheKey();i.saveInCache(s,i.items)}i.emit("load",{fromCache:!1})}})},r.executeSearch=function(t){var i=e.util.deepClone(this.config);this.config.mode===n.contentTypes.sense?e.exec(e.getRoute(e.routes.products_sense),i,t):this.config.mode===n.contentTypes.single?e.exec(e.getRoute(e.routes.products_id,{product_id:this.config.id}),i,function(e,n){!e&&n&&n.data&&(n.data=[n.data]),t&&t(e,n)}):e.exec(e.getRoute(e.routes.products),i,t)},r.handleInlineBuyOption=function(){if(this.disable_inline_buy)for(var e=0;e=0&&(j=x);if(j){w.className+=" okanjo-ad-in-unit",w.setAttribute("height","100%"),w.setAttribute("width","100%"),j.appendChild(w),f=!0;var E=e.util.getElementSize(j);p.expandable=0,p.frame_height=E.height,p.frame_width=E.width,p.ad_size=j.getAttribute("data-size")||"undefined"}}a.ea=e.metrics.action.inline_click,a.m.expandable=1===p.expandable?"true":"false",o=i(a,_,h,p),w.src=o,f||e.modal.show(w)}else r?(a.ea=e.metrics.action.click,this.href=i(a,v,h,{}),this.click()):(a.ea=e.metrics.action.click,this.href=i(a,v,h,{}))},r.bindEvents=function(){var t=this;e.qwery("a",this.element).every(function(i){var r=i.getAttribute("data-id");if(r&&(i.addEventListener?i.addEventListener("click",n.interactTile):i.attachEvent("onclick",function(e){n.interactTile.call(i,e)}),t.config.metrics_context==e.metrics.channel.product_widget)){var o=i.getAttribute("data-backfill"),s=e.util.deepClone(t.metricBase,{});s.id=i.getAttribute("data-id"),s.m.bf="true"===o?1:0,s.m=e.metrics.truncate(e.metrics.copy(t.config,e.metrics.includeElementInfo(i.parentNode,s.m))),e.metrics.trackEvent(e.metrics.object_type.product,e.metrics.event_type.impression,s)}return!0}),e.qwery(".okanjo-product-title",this.element).every(function(t){return e.util.ellipsify(t),!0})},r.guessAdSize=function(){for(var t,n,i,r,o=[],s=0,a="728x90|300x250|250x250|200x200|120x240|468x60|180x150|320x50|125x125|234x60".split("|");s';i.className="okanjo-adx-container",i.appendChild(r),this.element.innerHTML="",this.element.appendChild(i),r.contentWindow.document.open(),r.contentWindow.document.write(c),r.contentWindow.document.close();for(var l in o)o.hasOwnProperty(l)&&r.setAttribute(l,o[l]);r.className="okanjo-ad-backfill",r.setAttribute("width",n.width+"px"),r.setAttribute("height",n.height+"px");var u=e.util.deepClone(this.metricBase,{});u.m.ta_w=n.width,u.m.ta_h=n.height,u.m.ta_pubid=s,u.m.ta_slotid=a,u.m=e.metrics.truncate(e.metrics.copy(this.config,e.metrics.includeElementInfo(this.element,u.m))),e.metrics.trackEvent(e.metrics.object_type.thirdparty_ad,e.metrics.event_type.impression,u)},e.Product=n,n}(okanjo,this),function(e,t){function n(t,n){e._Widget.call(this,t,n),this.config=n=n||{},this.templates={ad_error:"okanjo.error",ad_main:"ad.block"},this.css={ad_main:"ad.block"},this.disable_inline_buy=void 0===this.config.disable_inline_buy?!1:n.disable_inline_buy===!0,this.proxy_url=null,this.configMap={key:"key",proxy_url:"proxy-url",content:"content",size:"size",expandable:"expandable",type:"type",id:"id",template_ad_main:"template-ad-main",template_ad_error:"template-ad-error",disable_inline_buy:"disable-inline-buy",template_product_main:"template-product-main",template_product_error:"template-product-error"},n.no_init||this.init()}e.util.inherits(n,e._Widget),n.contentTypes={creative:"creative",dynamic:"dynamic"},n.types={product:"product"},n.sizes={billboard:{width:970,height:250},button_2:{width:120,height:60},half_page:{width:300,height:600},leaderboard:{width:728,height:90},medium_rectangle:{width:300,height:250},micro_bar:{width:88,height:31},portrait:{width:300,height:1050},rectangle:{width:180,height:150},super_leaderboard:{width:970,height:90},wide_skyscraper:{width:160,height:600},large_mobile_banner:{width:320,height:100},mobile_leaderboard:{width:320,height:50},small_square:{width:200,height:200},button_1:{width:120,height:90},full_banner:{width:468,height:60},half_banner:{width:234,height:60},large_rectangle:{width:336,height:280},pop_under:{width:720,height:300},three_to_one_rectangle:{width:300,height:100},skyscraper:{width:120,height:600},square:{width:250,height:250},square_button:{width:125,height:125},vertical_banner:{width:120,height:240},vertical_rectangle:{width:240,height:400}};var i=n.prototype;return i.widgetName="Ad",i.load=function(){if(e.util.empty(this.config.content))this.hasCreativeContent()?this.config.content=n.contentTypes.creative:this.config.content=n.contentTypes.dynamic;else if(this.config.content!==n.contentTypes.creative||this.hasCreativeContent()){if(this.config.content===n.contentTypes.dynamic&&this.hasCreativeContent())console.warn("[Okanjo.Ad] Ad content is dynamic, but ad placement contains markup. Markup will be clobbered!");else if(!n.contentTypes.hasOwnProperty(this.config.content))return this.element.innerHTML=e.mvc.render(this.templates.ad_error,this,{message:"Invalid ad content: "+this.config.content}),e.report(this.widgetName,"Invalid ad content: "+this.config.content),!1}else console.warn("[Okanjo.Ad] Ad content is creative, but ad placement does not contain creative markup. Switching to dynamic!"),this.config.content=n.contentTypes.dynamic;if(e.util.empty(this.config.type)?this.config.type=n.types.product:n.types.hasOwnProperty(this.config.type)||(console.warn("[Okanjo."+this.widgetName+"] Unknown type",this.config.type,"given, using type `product` instead"),this.config.type=n.types.product),!e.util.empty(this.config.size)&&n.sizes.hasOwnProperty(this.config.size)&&this.setElementSize(n.sizes[this.config.size]),this.config.disable_inline_buy&&"string"==typeof this.config.disable_inline_buy&&(this.disable_inline_buy="true"===this.config.disable_inline_buy.toLowerCase()),this.config.proxy_url&&(this.proxy_url=this.config.proxy_url,delete this.config.proxy_url),e.metrics.trackEvent(e.metrics.object_type.widget,e.metrics.event_type.impression,{ch:e.metrics.channel.ad_widget,cx:this.config.content,m:e.metrics.copy(this.config,e.metrics.includeElementInfo(this.element,{wgid:this.instanceId}))}),this.config.type===n.types.product){if(e.util.empty(this.config.id))return this.element.innerHTML=e.mvc.render(this.templates.ad_error,this,{message:"Missing ad product id"}),e.report(this.widgetName,"Missing ad product id"),!1;if(this.config.content==n.contentTypes.dynamic)this.insertProductWidget();else{if(this.config.content!=n.contentTypes.creative)return this.element.innerHTML=e.mvc.render(this.templates.ad_error,this,{message:"Cannot render ad in content: "+this.config.content}),e.report(this.widgetName,"Cannot render ad in content: "+this.config.content),!1;this.insertCreativeWidget()}}return!0},i.render=function(){var t,i=document.createElement("div"),r=[],o=this.config.content==n.contentTypes.dynamic&&!e.util.empty(this.config.size);for(i.innerHTML=e.mvc.render(this.templates.ad_main,this,{config:this.config},{blockClasses:o?["okanjo-ad-fit"]:[]}),t=0;t0)this._waitingOnProductLoad=!1,e.Product.interactTile.call(n[0],t,!0);else if(!this._waitingOnProductLoad){this._waitingOnProductLoad=!0;var i=this,r=setInterval(function(){i._waitingOnProductLoad?i.interact(t):clearInterval(r)},250);console.warn("Waiting for Okanjo Product widget to load...")}},i.insertCreativeWidget=function(){this.insertProductWidget({hidden:!0}); +var e=this;this.element.addEventListener?this.element.addEventListener("click",function(t){e.interact(t)}):this.element.attachEvent("onclick",function(t){e.interact(t)})},i.insertProductWidget=function(t){t=t||{};var n=document.createElement("div");n.className="okanjo-ad-dynamic-product",t.hidden&&(n.style.display="none"),this.element.appendChild(n),this.render();var i={id:this.config.id,key:this.key,mode:e.Product.contentTypes.single,disable_inline_buy:this.disable_inline_buy,disable_popup:this.config.disable_popup===!0,proxy_url:this.proxy_url,expandable:void 0===this.config.expandable||("boolean"==typeof this.config.expandable?this.config.expandable:"true"===(""+this.config.expandable).toLowerCase()),metrics_context:e.metrics.channel.ad_widget,metrics_channel_context:this.config.content,template_product_main:"product.single"};return this.config.template_product_main&&(i.template_product_main=this.config.template_product_main),this.config.template_product_error&&(i.template_product_error=this.config.template_product_error),this.productWidget=new e.Product(n,i),this.productWidget},i.setElementSize=function(e){this.element.style.display="block",this.element.style.overflow="hidden",this.element.style.width=e.width+"px",this.element.style.height=e.height+"px"},i.hasCreativeContent=function(){if(this.element.childElementCount&&this.element.childElementCount>0)return!0;for(var e=0;e","contestant","~","+","p1","p2","compareDocumentPosition","hasQSA","querySelector","selectQSA","ss","ctx","selectNonNative","items","rewrite","onDomReady","ready","isReady","defer","callbacks","shift","completed","w3c","LOAD","READYSTATE","COMPLETE","detach","REMOVEEVENTLISTENER","DOMCONTENTLOADED","FALSE","DETACHEVENT","ONREADYSTATECHANGE","ONLOAD","wait","docElem","ATTACHEVENT","ADDEVENTLISTENER","frameElement","doScroll","doScrollCheck","global","mustache","isFunction","escapeRegExp","testRegExp","re","RegExp_test","isWhitespace","nonSpaceRe","escapeHtml","entityMap","parseTemplate","tags","stripSpace","hasTag","nonSpace","spaces","compileTags","spaceRe","openingTagRe","closingTagRe","closingCurlyRe","sections","start","chr","openSection","scanner","Scanner","eos","scanUntil","valueLength","charAt","scan","tagRe","whiteRe","equalsRe","curlyRe","nestTokens","squashTokens","lastToken","squashedTokens","numTokens","section","nestedTokens","tail","Context","parentContext",".","Writer","Object_toString","&","<","'","/","lookup","names","clearCache","partials","renderTokens","originalTemplate","symbol","buffer","_renderSection","_renderInverted","_renderPartial","_unescapedValue","_escapedValue","_rawValue","subRender","escape","defaultWriter","to_html","send","OkanjoMetrics","default_channel","channel","external","_queue","pageId","pageArgs","urlSid","msid_key","cookieSid","sourceContext","source_cx","sourceChannel","source_ch","object_type","metric_session","event_type","correlation","ch","_noProcess","msid_ttl","sid","sourceCh","sourceCx","_lastKey","strip_meta","impression","interaction","action","click","inline_click","thirdparty_ad","cart","page","widget","store","cause","order","order_item","user","product_widget","ad_widget","store_widget","environment","live","testing","href","track","normalizeEventData","ref_ch","ref_cx","pgid","ok_ver","referrer","ref","updateSid","_processQueue","_processTimeout","includeElementInfo","pw","ph","includeViewportInfo","vp","vx1","vy1","vx2","vy2","includeEventInfo","copy","base","truncate","haystack","needle","EventEmitter","events","on","removeListener","emit","listeners","args","once","_EventEmitter","WidgetBase","_Widget","instanceId","configMap","proto","widgetName","use_cache","cache_key_prefix","cache_ttl","cacheKeyAttributes","init","parseConfiguration","processTemplateOverrides","ensureTemplates","findWidgetKey","load","autoCleanCache","getCurrentPageUrl","candidatePos","stopPos","min","getCacheKey","parts","host","pathname","expireKeys","safeExpireKeys","expires","loadFromCache","cacheKey","saveInCache","$html","$body","$modalContainer","$modalWindow","$modalSkin","$modalOuter","$modalInner","$modalClose","$modalFrame","initialized","scrollY","createElements","bindEvents","addListener","handleReposition","closeModal","handler","addClass","removeClass","getWindowHeight","openModal","setContent","modal","show","hide","Product","mode","contentTypes","browse","nag","disable_popup","proxy_url","metrics_context","metrics_channel_context","disable_inline_buy","product_error","product_main","product_modal","url_category","marketplace_status","marketplace_id","pools","external_id","sku","sold_by","external_store_id","min_price","max_price","condition","manufacturer","upc","isbn","category","min_donation_percent","max_donation_percent","donation_to","suboptimal","backfill","skip","take","expandable","template_product_main","template_product_error","template_layout","template_theme","template_cta_style","template_cta_text","template_cta_color","no_init","makeClickThroughUrl","eventData","inline","proxy","pairs","joiner","u","sense","single","info","configNames","metricBase","wgid","loadProductsFromCache","fromCache","getProducts","showProducts","count","executeSearch","backfillADX","backfillAd","numFound","articleId","placementTest","shorted","aid","pten","enabled","ptid","seed","ptseed","product_id","handleInlineBuyOption","interactTile","trigger","disablePopup","buyUrl","proxyUrl","inlineParams","expanded","nativeBuy","doPopup","passThroughParams","modifiedBuyUrl","modifiedInlineBuyUrl","ea","popup","active_frame","open","frame","frameAttributes","class","frameborder","vspace","hspace","webkitallowfullscreen","mozallowfullscreen","allowfullscreen","scrolling","candidate","frame_height","frame_width","ad_size","bf","guessAdSize","sizeInstance","sizeInstanceWidth","sizeInstanceHeight","sizes","Ad","loadAd","adxframe","pubId","slotId","adxframeContent","contentWindow","write","close","ta_w","ta_h","ta_pubid","ta_slotid","ad_error","ad_main","template_ad_main","template_ad_error","creative","dynamic","types","billboard","button_2","half_page","leaderboard","medium_rectangle","micro_bar","portrait","rectangle","super_leaderboard","wide_skyscraper","large_mobile_banner","mobile_leaderboard","small_square","button_1","full_banner","half_banner","large_rectangle","pop_under","three_to_one_rectangle","skyscraper","square","square_button","vertical_banner","vertical_rectangle","hasCreativeContent","setElementSize","insertProductWidget","insertCreativeWidget","div","existingChildren","fit","childNodes","interact","links","productWidget","_waitingOnProductLoad","interval","setInterval","clearInterval","hidden","display","productWidgetConfig","overflow","childElementCount"],"mappings":";CACA,SAAAA,EAAAC,GACA,kBAAAC,SAAAA,OAAAC,IACAD,UAAAD,GACA,gBAAAG,SACAC,OAAAD,QAAAH,IAEAD,EAAAM,OAAAL,KAEAM,KAAA,WAOA,GAAAD,QAAA,SAAAE,GAwoBA,QAAA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B,OAAAD,IACA,GAAA,IAAAX,KAAAwE,QAAAq3B,WAAAl7B,GAAA6O,SACA,OAAA,GfwsJIzP,EAAO24B,GAAKA,EACLA,GAER34B,OAAQC,MACJD","file":"okanjo.min.js","sourcesContent":["\n //noinspection JSUnusedAssignment\n /**\n * index.js\n * @type {okanjo|*}\n */\n var okanjo = (function(ok) {\n\n\n //noinspection JSValidateTypes,JSUnusedGlobalSymbols\n var supportPageOffset = window.pageXOffset !== undefined,\n isCSS1Compatible = ((document.compatMode || \"\") === \"CSS1Compat\"),\n agent = window.navigator.userAgent,\n noop = function(){},\n okanjo = ok || {};\n\n // Override version with this version\n okanjo.version = \"%%OKANJO_VERSION\";\n\n // Override these later\n okanjo.qwery = noop;\n\n\n /**\n * Placeholder, just in case okanjo-js is built without metrics\n */\n okanjo.metrics = {\n trackEvent: noop,\n trackPageView: noop\n };\n\n /**\n * API route definitions\n */\n okanjo.routes = {\n products: '/products',\n products_id: '/products/:product_id',\n products_sense: '/products/sense',\n metrics: '/metrics/:object_type/:event_type'\n };\n\n\n /**\n * Compiles a route and parameters into a final URL\n * @param route – The route to use (e.g. okanjo.routes.products )\n * @param [params] - Optional route parameters\n * @returns {*}\n */\n okanjo.getRoute = function(route, params) {\n if (params) {\n for (var i in params) {\n if (params.hasOwnProperty(i)) {\n route = route.replace(\":\"+i, params[i] + \"\");\n }\n }\n }\n return okanjo.config.ads.apiUri + route;\n };\n\n\n /**\n * Execute a JSONP request\n * @param {string} url – Request URL\n * @param {*} data – Request data\n * @param {function(err:*, res:*)} callback – Closure to fire when completed\n */\n okanjo.exec = function(url, data, callback) {\n data = data || {};\n //noinspection JSUnresolvedFunction\n okanjo.JSONP({\n url: url,\n data: data,\n error: function(data) {\n var err = { statusCode: 500, error: \"Communication Error\", message: data.message || \"JSONP communication failure.\" };\n okanjo.report(\"core-jsonp\", data.error || new Error(err.message));\n callback(err, null);\n },\n success: function(data) {\n var err, res;\n if (data) {\n if (data.error) {\n err = data;\n } else {\n res = data;\n }\n } else {\n err = { statusCode: 500, error: \"Invalid Response\", message: \"Could not interpret the JSONP response.\"};\n okanjo.report('core-jsonp', new Error(err.message));\n }\n\n callback(err, res);\n }\n });\n };\n\n\n /**\n * Report a message or error back to Okanjo\n * @param {string} context – What module is responsible for emitting the error (e.g. Product)\n * @param {string|Error} mixed – The message or Error to report\n */\n okanjo.report = function(context, mixed) {\n // REPORT THIS BACK TO OKANJO!\n var error;\n if (typeof mixed === \"string\") {\n error = new Error('[Okanjo' + (context ? ' ' + context : '') + '] ' + mixed);\n } else if (typeof mixed === \"object\" && mixed instanceof Error) {\n error = mixed;\n }\n\n console.error(error);\n //TODO - integrate with Raven\n };\n\n /**\n * Utility functions\n */\n var util = okanjo.util = okanjo.util || {};\n\n\n /**\n * Trims leading and trailing whitespace on a string\n * @param val\n */\n util.trim = function(val) {\n return (val || \"\").replace(/^\\s+|\\s+$/g, '');\n };\n\n\n /**\n * Function to test whether the given var has a value\n * @param val - The var to check\n * @returns {boolean} - True when the var has value, false when it does not\n */\n util.empty = function (val) {\n return (val === null || val === undefined || (typeof val === \"string\" && util.trim(val) === \"\"));\n };\n\n /**\n * Helper to shallow clone an object so we don't ruin the top-level object reference\n * Note: If the shallow keys are objects, the references to the keyed objects will be maintained!\n *\n * @param {*} obj – Source object to copy\n * @returns {{}} – Shallow clone of the object\n */\n util.clone = function (obj) {\n var clone = {};\n obj = obj || {};\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n clone[k] = obj[k];\n }\n }\n return clone;\n };\n\n\n /**\n * Super simple hashing algorithm\n * @see http://jsperf.com/hashing-strings\n * @param str - String to hash\n * @returns {string}\n */\n util.hash = function(str) {\n var hash = 0;\n if (str.length === 0) return \"\"+hash;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash<<5)-hash)+char;\n }\n\n return hash.toString(16).replace(/^-/, 'n');\n\n };\n\n\n /**\n * Instead of using HTML5 dataset, just rip through attributes and return data attributes\n * @param element\n * @returns {{}}\n */\n util.data = function (element) {\n var data = {};\n if (element) {\n var attrs = element.attributes;\n for(var i = attrs.length - 1; i >= 0; i--) {\n if (attrs[i].name.indexOf('data-') === 0) {\n data[attrs[i].name.substr(5)] = attrs[i].value;\n }\n }\n }\n return data;\n };\n\n\n /**\n * Copies a value to the target if the source contains it\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {string} targetKey – The destination key name\n * @param {string} [sourceKey] – The source key name, if different\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSet = function(target, source, targetKey, sourceKey, options) {\n sourceKey = sourceKey || targetKey;\n options = options || { };\n\n function doCopy(sourceKey) {\n if (source && source[sourceKey] !== undefined && (!options.stripEmpty || !util.empty(source[sourceKey]))) {\n target[targetKey] = source[sourceKey];\n }\n }\n\n if (typeof sourceKey === \"object\" && Array.isArray(sourceKey)) {\n // Copy the first source key that is found\n for(var k = 0; k < sourceKey.length; k++) {\n doCopy(sourceKey[k]);\n }\n\n } else {\n doCopy(sourceKey);\n }\n };\n\n\n /**\n * Copies a mapping of target-source from source to target\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {*} map – The mapping of targetKey => sourceKey (null if same)\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSetMap = function(target, source, map, options) {\n var keys = Object.keys(map);\n for(var k = 0; k < keys.length; k++) {\n util.copyIfSet(target, source, keys[k], map[keys[k]], options);\n }\n };\n\n\n /*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n /**\n * Extends an object from another\n * @param ctor – Child class\n * @param superCtor – Parent class\n */\n util.inherits = function inherits(ctor, superCtor) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n\n\n /**\n * Gets the current page's scroll position\n * @returns {{x: Number, y: Number}}\n */\n util.getScrollPosition = function() {\n return {\n x: supportPageOffset ? window.pageXOffset : isCSS1Compatible ? document.documentElement.scrollLeft : document.body.scrollLeft,\n y: supportPageOffset ? window.pageYOffset : isCSS1Compatible ? document.documentElement.scrollTop : document.body.scrollTop\n };\n };\n\n\n /**\n * Gets the height and width of the given element\n * @param {HTMLElement|Node} el – The DOM element to get the size of\n * @param {boolean} [includeMargin] – Whether to include the margins of the element in the size\n * @returns {{height: number, width: number}}\n */\n util.getElementSize = function(el, includeMargin) {\n\n var size = {\n height: el.offsetHeight,\n width : el.offsetWidth\n }, style;\n\n if (includeMargin) {\n style = el.currentStyle || getComputedStyle(el);\n size.height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n size.width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n }\n\n return size;\n };\n\n\n /**\n * Gets the elements rectangle coordinates on the page\n * @param el - DOM Element\n * @return {{x1: *, y1: *, x2: *, y2: *}}\n */\n util.getElementPosition = function(el) {\n\n // Wrapped in try-catch because IE is super strict about the\n // element being on the DOM before you call this. Other browsers\n // let it slide, but oh well.\n var rect, pos, errMsg = '[Okanjo Core] Could not get position of element. Did you attach the element to the DOM before initializing?';\n try {\n rect = el.getBoundingClientRect();\n pos = util.getScrollPosition();\n\n if (!document.body.contains(el)) {\n console.warn(errMsg);\n }\n\n return {\n x1: rect.left + pos.x,\n y1: rect.top + pos.y,\n x2: rect.right + pos.x,\n y2: rect.bottom + pos.y\n };\n } catch (e) {\n console.warn(errMsg, e);\n return {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0\n };\n }\n\n };\n\n\n /**\n * Gets the current page size\n * @return {{w: number, h: number}}\n */\n util.getPageSize = function() {\n var body = okanjo.qwery('body')[0],\n html = document.documentElement;\n\n return {\n w: Math.max( body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth ),\n\n h: Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight )\n };\n };\n\n\n /**\n * Gets the current viewport size\n * @return {{vw: number, vh: number}}\n */\n util.getViewportSize = function() {\n var doc = document,\n win = window,\n el = (doc.compatMode && doc.compatMode === 'CSS1Compat') ? doc.documentElement : doc.body,\n width = el.clientWidth,\n height = el.clientHeight,\n inWidth = win.innerWidth || 0,\n inHeight = win.innerHeight || 0,\n mobileZoom = (inWidth && width > inWidth) || (inHeight && height > inHeight);\n\n return {\n vw: mobileZoom ? inWidth : width,\n vh: mobileZoom ? inHeight : height\n };\n };\n\n\n /**\n * Gets the x, y location of the event relative to the page\n * @param e – Event\n * @return {{ex: number, ey: number}}\n */\n util.getEventPosition = function(e) {\n var ex = e.pageX,\n ey = e.pageY,\n doc = document,\n body = doc.body,\n el = doc.documentElement,\n scrollLeft = 'scrollLeft',\n scrollTop = 'scrollTop';\n return {\n ex: ex === undefined ? e.clientX + body[scrollLeft] + el[scrollLeft] : ex,\n ey: ey === undefined ? e.clientY + body[scrollTop] + el[scrollTop] : ey\n };\n };\n\n\n /**\n * Splits the text in the element to fit within the visible height of its container, and separates with an ellipses\n * @param {HTMLElement|Node} element – The DOM element containing the text to fit\n * @param {HTMLElement} [container] – Optional container to compute fit on. Defaults to the element's parent\n */\n util.ellipsify = function(element, container) {\n\n // It's a sad day when you have to resort to JS because CSS kludges are too hacky to work down to IE8, programmatically\n //noinspection JSValidateTypes\n var parent = container || element.parentNode,\n targetHeight = util.getElementSize(parent).height,\n useTextContent = element.textContent !== undefined,\n text = useTextContent ? element.textContent : element.innerText,\n replacedText = \"\",\n safety = 5000, // Safety switch to bust out of the loop in the event something goes terribly wrong\n replacer = function(match) {\n replacedText = match.substr(0, match.length-3) + replacedText;\n return '...';\n };\n\n // Trim off characters until we can fit the text and ellipses\n // If the text already fits, this loop is ignored\n while (util.getElementSize(element).height > targetHeight && text.length > 0 && (safety-- > 0)) {\n text = useTextContent ? element.textContent : element.innerText;\n\n text = text.replace(/[\\s\\S](?:\\.\\.\\.)?$/, replacer);\n\n if (useTextContent) {\n element.textContent = text;\n } else {\n element.innerText = text;\n }\n }\n\n // If there is work to do, split the content into two span tags\n // Like so: [content]...[hidden content]\n if (replacedText.length > 0) {\n\n var content = document.createElement('span'),\n span = document.createElement('span');\n\n content.setAttribute('class','okanjo-ellipses');\n span.setAttribute('class','okanjo-visually-hidden');\n\n if (useTextContent) {\n content.textContent = text.substr(0, text.length-3);\n span.textContent = replacedText;\n } else {\n content.innerText = text.substr(0, text.length-3);\n span.innerText = replacedText;\n }\n\n element.innerHTML = '';\n element.appendChild(content);\n element.appendChild(span);\n }\n\n };\n\n\n /**\n * Return various browser detections\n * @returns {Array}\n */\n util.detectClasses = function() {\n var classDetects = [];\n if (navigator.appVersion.indexOf(\"MSIE 9.\") != -1) {\n classDetects.push('lt-ie10');\n } else if (navigator.appVersion.indexOf(\"MSIE 8.\") != -1) {\n classDetects.push('lt-ie9');\n } else if (navigator.appVersion.indexOf(\"MSIE 7.\") != -1) {\n classDetects.push('lt-ie8');\n } else if (navigator.appVersion.indexOf(\"MSIE 6.\") != -1) {\n classDetects.push('lt-ie7');\n }\n return classDetects;\n };\n\n\n /**\n * Checks if we're executing this code inside a frame or not\n * @returns {boolean}\n */\n util.isFramed = function() {\n return window.top !== window.self;\n };\n\n /**\n * Checks if the current user agent identifies as an iOS device\n * @returns {boolean}\n */\n util.isiOS = function() {\n return /(iPhone|iPad|iPod)/i.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as Android device\n * @returns {boolean}\n */\n util.isAndroid = function() {\n return /Android/.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as a mobile device\n * @returns {boolean}\n */\n util.isMobile = function() {\n return util.isiOS() || util.isAndroid();\n };\n\n\n /**\n * Returns an object hashmap of query and hash parameters\n * @param {boolean} includeHashArguments - Whether to include the hash arguments, if any\n * @return {*}\n */\n util.getPageArguments = function(includeHashArguments) {\n\n var queryArgs = splitArguments(window.location.search.substring(window.location.search.indexOf('?') + 1));\n\n if (includeHashArguments) {\n var hashArgs = splitArguments(window.location.hash.substring(Math.max(window.location.hash.indexOf('#') + 1, window.location.hash.indexOf('#!') + 2)));\n for (var k in hashArgs) {\n if (hashArgs.hasOwnProperty(k)) {\n queryArgs[k] = hashArgs[k];\n }\n }\n }\n\n return queryArgs;\n };\n\n\n /**\n * Deep clones a thing\n * @param mixed Something to clone\n * @param [out] Optional object/array receiver if clone-merge is desirable. Just make sure the type matches the source\n * @return {*}\n */\n util.deepClone = function(mixed, out) {\n var i = 0, k;\n if (Array.isArray(mixed)) {\n out = out || [];\n for ( ; i < mixed.length; i++) {\n out.push(util.deepClone(mixed[i]));\n }\n } else if (typeof mixed === \"object\") {\n out = out || {};\n for (k in mixed) {\n if (mixed.hasOwnProperty(k)) {\n out[k] = util.deepClone(mixed[k]);\n }\n }\n } else {\n out = mixed;\n }\n return out;\n };\n\n /**\n * Flattens a multi-dimensional object into a single object\n * @param obj\n * @return {{}}\n */\n util.flatten = function (obj) {\n var toReturn = {}, flatObject, x, i;\n\n for (i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n\n // Convert object ids to hex strings\n if (Array.isArray(obj[i])) {\n toReturn[i] = obj[i];\n } else if ((typeof obj[i]) == 'object') {\n flatObject = util.flatten(obj[i]);\n for (x in flatObject) {\n if (!flatObject.hasOwnProperty(x)) continue;\n toReturn[i + '_' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = obj[i];\n }\n }\n return toReturn;\n };\n\n /*! based on shortid https://github.com/dylang/shortid */\n util.shortid = (function(clusterWorkerId) {\n\n var shuffled = 'ylZM7VHLvOFcohp01x-fXNr8P_tqin6RkgWGm4SIDdK5s2TAJebzQEBUwuY9j3aC',\n\n crypto = typeof require !== 'undefined' ? require('crypto') : (window.crypto || window.msCrypto),\n\n randomByte = function() {\n if (crypto && crypto.randomBytes) {\n return crypto.randomBytes(1)[0] & 0x30;\n } else if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n },\n\n encode = function(number) {\n var loopCounter = 0,\n done,\n str = '';\n\n while (!done) {\n str = str + shuffled[ ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ];\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n },\n\n // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n // This number should be updated every year or so to keep the generated id short.\n // To regenerate `new Date() - 0` and bump the version. Always bump the version!\n\n REDUCE_TIME = 1458848907498,\n version = 6,\n counter,\n previousSeconds;\n clusterWorkerId = clusterWorkerId || 0;\n\n return function() {\n var str = '',\n seconds = Math.floor(((new Date()).getTime() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(version) + encode(clusterWorkerId);\n if (counter > 0) {\n str = str + encode(counter);\n }\n str = str + encode(seconds);\n\n return str;\n };\n })();\n\n\n function splitArguments(query) {\n var params = {},\n ampSplit = query.split('&'),\n i = 0,\n temp, key, value, eqIndex;\n for ( ; i < ampSplit.length; i++) {\n try {\n temp = ampSplit[i];\n eqIndex = temp.indexOf('=');\n if (eqIndex < 0) {\n key = decodeURIComponent(temp);\n value = null;\n } else {\n key = decodeURIComponent(temp.substring(0, eqIndex));\n value = decodeURIComponent(temp.substring(eqIndex + 1));\n }\n if (key) {\n params[key] = value;\n }\n } catch(e) {\n //noinspection JSUnusedAssignment\n console.error('[Okanjo] Failed to parse URL parameter:', temp, e);\n }\n }\n return params;\n }\n\n return okanjo;\n\n })(okanjo || window.okanjo);\n\n\n\n","\n var config = okanjo.config = okanjo.config || {};\n\n // okanjo-ads api key\n config.key = config.key || undefined;\n\n // Marketplace config\n config.marketplace = {\n uri: 'https://shop.okanjo.com',\n apiUri: 'https://api.okanjo.com',\n routerUri: 'https://shop.okanjo.com/widgets/router/',\n balancedMarketplacePath: '/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy',\n socketIOUri: 'https://mke-rt.okanjo.com:13443'\n };\n\n // Ads config\n config.ads = {\n apiUri: 'https://ads-api.okanjo.com'\n };\n\n /**\n * Override the default production configuration\n * @param options\n */\n okanjo.configure = function(options) {\n\n // Merge keys\n Object.keys(options).every(function(root) {\n if (config[root] && typeof config[root] === \"object\" && typeof options[root] === \"object\") {\n Object.keys(options[root]).every(function(key) {\n config[root][key] = options[root][options[key]];\n return true;\n });\n } else {\n config[root] = options[root];\n }\n return true;\n });\n\n\n };","/*! okanjo-js v0.8.3 | (c) 2013 Okanjo Partners Inc | https://okanjo.com/ */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.okanjo = factory();\n }\n}(this, function() {\n\n //noinspection JSUnusedAssignment\n /**\n * index.js\n * @type {okanjo|*}\n */\n var okanjo = (function(ok) {\n\n\n //noinspection JSValidateTypes,JSUnusedGlobalSymbols\n var supportPageOffset = window.pageXOffset !== undefined,\n isCSS1Compatible = ((document.compatMode || \"\") === \"CSS1Compat\"),\n agent = window.navigator.userAgent,\n noop = function(){},\n okanjo = ok || {};\n\n // Override version with this version\n okanjo.version = \"0.8.3\";\n\n // Override these later\n okanjo.qwery = noop;\n\n\n /**\n * Placeholder, just in case okanjo-js is built without metrics\n */\n okanjo.metrics = {\n trackEvent: noop,\n trackPageView: noop\n };\n\n /**\n * API route definitions\n */\n okanjo.routes = {\n products: '/products',\n products_id: '/products/:product_id',\n products_sense: '/products/sense',\n metrics: '/metrics/:object_type/:event_type'\n };\n\n\n /**\n * Compiles a route and parameters into a final URL\n * @param route – The route to use (e.g. okanjo.routes.products )\n * @param [params] - Optional route parameters\n * @returns {*}\n */\n okanjo.getRoute = function(route, params) {\n if (params) {\n for (var i in params) {\n if (params.hasOwnProperty(i)) {\n route = route.replace(\":\"+i, params[i] + \"\");\n }\n }\n }\n return okanjo.config.ads.apiUri + route;\n };\n\n\n /**\n * Execute a JSONP request\n * @param {string} url – Request URL\n * @param {*} data – Request data\n * @param {function(err:*, res:*)} callback – Closure to fire when completed\n */\n okanjo.exec = function(url, data, callback) {\n data = data || {};\n //noinspection JSUnresolvedFunction\n okanjo.JSONP({\n url: url,\n data: data,\n error: function(data) {\n var err = { statusCode: 500, error: \"Communication Error\", message: data.message || \"JSONP communication failure.\" };\n okanjo.report(\"core-jsonp\", data.error || new Error(err.message));\n callback(err, null);\n },\n success: function(data) {\n var err, res;\n if (data) {\n if (data.error) {\n err = data;\n } else {\n res = data;\n }\n } else {\n err = { statusCode: 500, error: \"Invalid Response\", message: \"Could not interpret the JSONP response.\"};\n okanjo.report('core-jsonp', new Error(err.message));\n }\n\n callback(err, res);\n }\n });\n };\n\n\n /**\n * Report a message or error back to Okanjo\n * @param {string} context – What module is responsible for emitting the error (e.g. Product)\n * @param {string|Error} mixed – The message or Error to report\n */\n okanjo.report = function(context, mixed) {\n // REPORT THIS BACK TO OKANJO!\n var error;\n if (typeof mixed === \"string\") {\n error = new Error('[Okanjo' + (context ? ' ' + context : '') + '] ' + mixed);\n } else if (typeof mixed === \"object\" && mixed instanceof Error) {\n error = mixed;\n }\n\n console.error(error);\n //TODO - integrate with Raven\n };\n\n /**\n * Utility functions\n */\n var util = okanjo.util = okanjo.util || {};\n\n\n /**\n * Trims leading and trailing whitespace on a string\n * @param val\n */\n util.trim = function(val) {\n return (val || \"\").replace(/^\\s+|\\s+$/g, '');\n };\n\n\n /**\n * Function to test whether the given var has a value\n * @param val - The var to check\n * @returns {boolean} - True when the var has value, false when it does not\n */\n util.empty = function (val) {\n return (val === null || val === undefined || (typeof val === \"string\" && util.trim(val) === \"\"));\n };\n\n /**\n * Helper to shallow clone an object so we don't ruin the top-level object reference\n * Note: If the shallow keys are objects, the references to the keyed objects will be maintained!\n *\n * @param {*} obj – Source object to copy\n * @returns {{}} – Shallow clone of the object\n */\n util.clone = function (obj) {\n var clone = {};\n obj = obj || {};\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n clone[k] = obj[k];\n }\n }\n return clone;\n };\n\n\n /**\n * Super simple hashing algorithm\n * @see http://jsperf.com/hashing-strings\n * @param str - String to hash\n * @returns {string}\n */\n util.hash = function(str) {\n var hash = 0;\n if (str.length === 0) return \"\"+hash;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash<<5)-hash)+char;\n }\n\n return hash.toString(16).replace(/^-/, 'n');\n\n };\n\n\n /**\n * Instead of using HTML5 dataset, just rip through attributes and return data attributes\n * @param element\n * @returns {{}}\n */\n util.data = function (element) {\n var data = {};\n if (element) {\n var attrs = element.attributes;\n for(var i = attrs.length - 1; i >= 0; i--) {\n if (attrs[i].name.indexOf('data-') === 0) {\n data[attrs[i].name.substr(5)] = attrs[i].value;\n }\n }\n }\n return data;\n };\n\n\n /**\n * Copies a value to the target if the source contains it\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {string} targetKey – The destination key name\n * @param {string} [sourceKey] – The source key name, if different\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSet = function(target, source, targetKey, sourceKey, options) {\n sourceKey = sourceKey || targetKey;\n options = options || { };\n\n function doCopy(sourceKey) {\n if (source && source[sourceKey] !== undefined && (!options.stripEmpty || !util.empty(source[sourceKey]))) {\n target[targetKey] = source[sourceKey];\n }\n }\n\n if (typeof sourceKey === \"object\" && Array.isArray(sourceKey)) {\n // Copy the first source key that is found\n for(var k = 0; k < sourceKey.length; k++) {\n doCopy(sourceKey[k]);\n }\n\n } else {\n doCopy(sourceKey);\n }\n };\n\n\n /**\n * Copies a mapping of target-source from source to target\n * @param {*} target – The destination object\n * @param {*} source – The source object\n * @param {*} map – The mapping of targetKey => sourceKey (null if same)\n * @param {{stripEmpty:boolean}} [options] – Copy options, e.g. strip empty values\n */\n util.copyIfSetMap = function(target, source, map, options) {\n var keys = Object.keys(map);\n for(var k = 0; k < keys.length; k++) {\n util.copyIfSet(target, source, keys[k], map[keys[k]], options);\n }\n };\n\n\n /*! https://github.com/isaacs/inherits/blob/master/inherits_browser.js */\n /**\n * Extends an object from another\n * @param ctor – Child class\n * @param superCtor – Parent class\n */\n util.inherits = function inherits(ctor, superCtor) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n\n\n /**\n * Gets the current page's scroll position\n * @returns {{x: Number, y: Number}}\n */\n util.getScrollPosition = function() {\n return {\n x: supportPageOffset ? window.pageXOffset : isCSS1Compatible ? document.documentElement.scrollLeft : document.body.scrollLeft,\n y: supportPageOffset ? window.pageYOffset : isCSS1Compatible ? document.documentElement.scrollTop : document.body.scrollTop\n };\n };\n\n\n /**\n * Gets the height and width of the given element\n * @param {HTMLElement|Node} el – The DOM element to get the size of\n * @param {boolean} [includeMargin] – Whether to include the margins of the element in the size\n * @returns {{height: number, width: number}}\n */\n util.getElementSize = function(el, includeMargin) {\n\n var size = {\n height: el.offsetHeight,\n width : el.offsetWidth\n }, style;\n\n if (includeMargin) {\n style = el.currentStyle || getComputedStyle(el);\n size.height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n size.width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n }\n\n return size;\n };\n\n\n /**\n * Gets the elements rectangle coordinates on the page\n * @param el - DOM Element\n * @return {{x1: *, y1: *, x2: *, y2: *}}\n */\n util.getElementPosition = function(el) {\n\n // Wrapped in try-catch because IE is super strict about the\n // element being on the DOM before you call this. Other browsers\n // let it slide, but oh well.\n var rect, pos, errMsg = '[Okanjo Core] Could not get position of element. Did you attach the element to the DOM before initializing?';\n try {\n rect = el.getBoundingClientRect();\n pos = util.getScrollPosition();\n\n if (!document.body.contains(el)) {\n console.warn(errMsg);\n }\n\n return {\n x1: rect.left + pos.x,\n y1: rect.top + pos.y,\n x2: rect.right + pos.x,\n y2: rect.bottom + pos.y\n };\n } catch (e) {\n console.warn(errMsg, e);\n return {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0\n };\n }\n\n };\n\n\n /**\n * Gets the current page size\n * @return {{w: number, h: number}}\n */\n util.getPageSize = function() {\n var body = okanjo.qwery('body')[0],\n html = document.documentElement;\n\n return {\n w: Math.max( body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth ),\n\n h: Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight )\n };\n };\n\n\n /**\n * Gets the current viewport size\n * @return {{vw: number, vh: number}}\n */\n util.getViewportSize = function() {\n var doc = document,\n win = window,\n el = (doc.compatMode && doc.compatMode === 'CSS1Compat') ? doc.documentElement : doc.body,\n width = el.clientWidth,\n height = el.clientHeight,\n inWidth = win.innerWidth || 0,\n inHeight = win.innerHeight || 0,\n mobileZoom = (inWidth && width > inWidth) || (inHeight && height > inHeight);\n\n return {\n vw: mobileZoom ? inWidth : width,\n vh: mobileZoom ? inHeight : height\n };\n };\n\n\n /**\n * Gets the x, y location of the event relative to the page\n * @param e – Event\n * @return {{ex: number, ey: number}}\n */\n util.getEventPosition = function(e) {\n var ex = e.pageX,\n ey = e.pageY,\n doc = document,\n body = doc.body,\n el = doc.documentElement,\n scrollLeft = 'scrollLeft',\n scrollTop = 'scrollTop';\n return {\n ex: ex === undefined ? e.clientX + body[scrollLeft] + el[scrollLeft] : ex,\n ey: ey === undefined ? e.clientY + body[scrollTop] + el[scrollTop] : ey\n };\n };\n\n\n /**\n * Splits the text in the element to fit within the visible height of its container, and separates with an ellipses\n * @param {HTMLElement|Node} element – The DOM element containing the text to fit\n * @param {HTMLElement} [container] – Optional container to compute fit on. Defaults to the element's parent\n */\n util.ellipsify = function(element, container) {\n\n // It's a sad day when you have to resort to JS because CSS kludges are too hacky to work down to IE8, programmatically\n //noinspection JSValidateTypes\n var parent = container || element.parentNode,\n targetHeight = util.getElementSize(parent).height,\n useTextContent = element.textContent !== undefined,\n text = useTextContent ? element.textContent : element.innerText,\n replacedText = \"\",\n safety = 5000, // Safety switch to bust out of the loop in the event something goes terribly wrong\n replacer = function(match) {\n replacedText = match.substr(0, match.length-3) + replacedText;\n return '...';\n };\n\n // Trim off characters until we can fit the text and ellipses\n // If the text already fits, this loop is ignored\n while (util.getElementSize(element).height > targetHeight && text.length > 0 && (safety-- > 0)) {\n text = useTextContent ? element.textContent : element.innerText;\n\n text = text.replace(/[\\s\\S](?:\\.\\.\\.)?$/, replacer);\n\n if (useTextContent) {\n element.textContent = text;\n } else {\n element.innerText = text;\n }\n }\n\n // If there is work to do, split the content into two span tags\n // Like so: [content]...[hidden content]\n if (replacedText.length > 0) {\n\n var content = document.createElement('span'),\n span = document.createElement('span');\n\n content.setAttribute('class','okanjo-ellipses');\n span.setAttribute('class','okanjo-visually-hidden');\n\n if (useTextContent) {\n content.textContent = text.substr(0, text.length-3);\n span.textContent = replacedText;\n } else {\n content.innerText = text.substr(0, text.length-3);\n span.innerText = replacedText;\n }\n\n element.innerHTML = '';\n element.appendChild(content);\n element.appendChild(span);\n }\n\n };\n\n\n /**\n * Return various browser detections\n * @returns {Array}\n */\n util.detectClasses = function() {\n var classDetects = [];\n if (navigator.appVersion.indexOf(\"MSIE 9.\") != -1) {\n classDetects.push('lt-ie10');\n } else if (navigator.appVersion.indexOf(\"MSIE 8.\") != -1) {\n classDetects.push('lt-ie9');\n } else if (navigator.appVersion.indexOf(\"MSIE 7.\") != -1) {\n classDetects.push('lt-ie8');\n } else if (navigator.appVersion.indexOf(\"MSIE 6.\") != -1) {\n classDetects.push('lt-ie7');\n }\n return classDetects;\n };\n\n\n /**\n * Checks if we're executing this code inside a frame or not\n * @returns {boolean}\n */\n util.isFramed = function() {\n return window.top !== window.self;\n };\n\n /**\n * Checks if the current user agent identifies as an iOS device\n * @returns {boolean}\n */\n util.isiOS = function() {\n return /(iPhone|iPad|iPod)/i.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as Android device\n * @returns {boolean}\n */\n util.isAndroid = function() {\n return /Android/.test(agent);\n };\n\n\n /**\n * Checks if the current user agent identifies as a mobile device\n * @returns {boolean}\n */\n util.isMobile = function() {\n return util.isiOS() || util.isAndroid();\n };\n\n\n /**\n * Returns an object hashmap of query and hash parameters\n * @param {boolean} includeHashArguments - Whether to include the hash arguments, if any\n * @return {*}\n */\n util.getPageArguments = function(includeHashArguments) {\n\n var queryArgs = splitArguments(window.location.search.substring(window.location.search.indexOf('?') + 1));\n\n if (includeHashArguments) {\n var hashArgs = splitArguments(window.location.hash.substring(Math.max(window.location.hash.indexOf('#') + 1, window.location.hash.indexOf('#!') + 2)));\n for (var k in hashArgs) {\n if (hashArgs.hasOwnProperty(k)) {\n queryArgs[k] = hashArgs[k];\n }\n }\n }\n\n return queryArgs;\n };\n\n\n /**\n * Deep clones a thing\n * @param mixed Something to clone\n * @param [out] Optional object/array receiver if clone-merge is desirable. Just make sure the type matches the source\n * @return {*}\n */\n util.deepClone = function(mixed, out) {\n var i = 0, k;\n if (Array.isArray(mixed)) {\n out = out || [];\n for ( ; i < mixed.length; i++) {\n out.push(util.deepClone(mixed[i]));\n }\n } else if (typeof mixed === \"object\") {\n out = out || {};\n for (k in mixed) {\n if (mixed.hasOwnProperty(k)) {\n out[k] = util.deepClone(mixed[k]);\n }\n }\n } else {\n out = mixed;\n }\n return out;\n };\n\n /**\n * Flattens a multi-dimensional object into a single object\n * @param obj\n * @return {{}}\n */\n util.flatten = function (obj) {\n var toReturn = {}, flatObject, x, i;\n\n for (i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n\n // Convert object ids to hex strings\n if (Array.isArray(obj[i])) {\n toReturn[i] = obj[i];\n } else if ((typeof obj[i]) == 'object') {\n flatObject = util.flatten(obj[i]);\n for (x in flatObject) {\n if (!flatObject.hasOwnProperty(x)) continue;\n toReturn[i + '_' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = obj[i];\n }\n }\n return toReturn;\n };\n\n /*! based on shortid https://github.com/dylang/shortid */\n util.shortid = (function(clusterWorkerId) {\n\n var shuffled = 'ylZM7VHLvOFcohp01x-fXNr8P_tqin6RkgWGm4SIDdK5s2TAJebzQEBUwuY9j3aC',\n\n crypto = typeof require !== 'undefined' ? require('crypto') : (window.crypto || window.msCrypto),\n\n randomByte = function() {\n if (crypto && crypto.randomBytes) {\n return crypto.randomBytes(1)[0] & 0x30;\n } else if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n },\n\n encode = function(number) {\n var loopCounter = 0,\n done,\n str = '';\n\n while (!done) {\n str = str + shuffled[ ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ];\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n },\n\n // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n // This number should be updated every year or so to keep the generated id short.\n // To regenerate `new Date() - 0` and bump the version. Always bump the version!\n\n REDUCE_TIME = 1458848907498,\n version = 6,\n counter,\n previousSeconds;\n clusterWorkerId = clusterWorkerId || 0;\n\n return function() {\n var str = '',\n seconds = Math.floor(((new Date()).getTime() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(version) + encode(clusterWorkerId);\n if (counter > 0) {\n str = str + encode(counter);\n }\n str = str + encode(seconds);\n\n return str;\n };\n })();\n\n\n function splitArguments(query) {\n var params = {},\n ampSplit = query.split('&'),\n i = 0,\n temp, key, value, eqIndex;\n for ( ; i < ampSplit.length; i++) {\n try {\n temp = ampSplit[i];\n eqIndex = temp.indexOf('=');\n if (eqIndex < 0) {\n key = decodeURIComponent(temp);\n value = null;\n } else {\n key = decodeURIComponent(temp.substring(0, eqIndex));\n value = decodeURIComponent(temp.substring(eqIndex + 1));\n }\n if (key) {\n params[key] = value;\n }\n } catch(e) {\n //noinspection JSUnusedAssignment\n console.error('[Okanjo] Failed to parse URL parameter:', temp, e);\n }\n }\n return params;\n }\n\n return okanjo;\n\n })(okanjo || window.okanjo);\n\n\n\n\n\n var config = okanjo.config = okanjo.config || {};\n\n // okanjo-ads api key\n config.key = config.key || undefined;\n\n // Marketplace config\n config.marketplace = {\n uri: 'https://shop.okanjo.com',\n apiUri: 'https://api.okanjo.com',\n routerUri: 'https://shop.okanjo.com/widgets/router/',\n balancedMarketplacePath: '/v1/marketplaces/MP6vnNdXY7izEEVPs1gl7jSy',\n socketIOUri: 'https://mke-rt.okanjo.com:13443'\n };\n\n // Ads config\n config.ads = {\n apiUri: 'https://ads-api.okanjo.com'\n };\n\n /**\n * Override the default production configuration\n * @param options\n */\n okanjo.configure = function(options) {\n\n // Merge keys\n Object.keys(options).every(function(root) {\n if (config[root] && typeof config[root] === \"object\" && typeof options[root] === \"object\") {\n Object.keys(options[root]).every(function(key) {\n config[root][key] = options[root][options[key]];\n return true;\n });\n } else {\n config[root] = options[root];\n }\n return true;\n });\n\n\n };\n//noinspection JSUnusedLocalSymbols,ThisExpressionReferencesGlobalObjectJS\n(function(okanjo, window) {\n\n var TemplateEngine = okanjo.TemplateEngine = function TemplateEngine(options) {\n options = options || { templates: {}, css: {} };\n this._templates = options.templates || {};\n this._css = options.css || {};\n\n // Add special styles for ie 7, 8, 9\n this.classDetects = okanjo.util.detectClasses();\n this.classDetects = this.classDetects.join(' ');\n };\n\n TemplateEngine.prototype = {\n\n constructor: TemplateEngine,\n\n /**\n * Register a template\n * @param {string} name – Template name\n * @param {string|HTMLElement} template - Template markup string\n * @param {function(data:*):*} [viewClosure] – Optional data manipulation closure\n * @param {*} [options] – Optional hash of template options, e.g. css: [ 'name1', 'name2' ]\n */\n registerTemplate: function(name, template, viewClosure, options) {\n // Example template:\n // {{title}} spends {{calc}}\n\n if (typeof template === \"object\") {\n //noinspection JSValidateTypes\n if (template.nodeType === undefined) {\n throw new Error('Parameter template must be a string or a DOM element');\n } else {\n okanjo.Mustache.parse(template);\n }\n } else if (typeof template !== \"string\") {\n throw new Error('Parameter template must be a string or a DOM element');\n }\n\n // Shift options if only have 3 params\n if (arguments.length === 3 && typeof viewClosure === \"object\") {\n options = viewClosure;\n viewClosure = undefined;\n } else {\n options = options || {};\n }\n\n if (viewClosure !== undefined && typeof viewClosure !== \"function\") {\n throw new Error('Parameter viewClosure must be a function');\n }\n\n // Assign the template\n this._templates[name] = {\n markup: template,\n options: options,\n viewClosure: viewClosure || null\n };\n },\n\n\n /**\n * Registers a CSS block\n *\n * @param {string} name – CSS block name\n * @param {string|HTMLElement} css – The CSS markup or existing style element\n * @param {undefined|{id:string}|null} [options] – Optional hash of KVP settings\n */\n registerCss: function(name, css, options) {\n options = options || {};\n\n if (typeof css === \"object\") {\n //noinspection JSValidateTypes\n if (css.nodeType === undefined) {\n throw new Error('Parameter css must be a string or a DOM element');\n }\n } else if (typeof css !== \"string\") {\n throw new Error('Parameter css must be a string or a DOM element');\n }\n\n this._css[name] = {\n markup: css,\n options: options\n };\n },\n\n\n /**\n * Checks if a template was registered\n * @param {string} name – The template name to look for\n * @returns {boolean} – True if registered, False if not\n */\n isTemplateRegistered: function(name) {\n return this._templates[name] ? true : false;\n },\n\n\n /**\n * Checks if a CSS block was registered\n * @param {string} name – The CSS block name to look for\n * @returns {boolean} – True if registered, False if not\n */\n isCssRegistered: function(name) {\n return this._css[name] ? true : false;\n },\n\n\n /**\n * Ensures that the given CSS block name has been added to the page\n * @param {string|HTMLElement} name - The CSS name that was registered through registerCss\n */\n ensureCss: function(name) {\n\n if (this._css[name]) {\n //noinspection JSValidateTypes\n var css = this._css[name],\n id = css.markup.nodeType === undefined ? css.options.id || \"okanjo-css-\" + name : null; // If it's a DOM element, just forget it cuz it's already on the page\n\n // Check for css element on page, if we have an ID to look for\n if (id) {\n var elements = okanjo.qwery('#' + id);\n if (elements.length === 0) {\n var head = okanjo.qwery('head'),\n style = document.createElement('style');\n\n style.id = id;\n style.setAttribute('type', 'text/css');\n\n if (style.hasOwnProperty) { // old ie\n style.innerHTML = css.markup;\n } else {\n style.styleSheet.cssText = css.markup;\n }\n\n if (head.length > 0) {\n head[0].appendChild(style);\n } else {\n // NO HEAD, just prepend to body then\n var body = okanjo.qwery('body');\n if (body.length > 0) {\n body[0].appendChild(style);\n } // And if this doesn't work, just give up\n }\n }\n }\n } else {\n console.warn('[Okanjo.Template] Attempted to add CSS template \"'+name+'\" to the DOM, however it does not appear to be registered?');\n }\n\n },\n\n\n /**\n * Renders a template with the given data\n *\n * @param {string} templateName – The template name to render\n * @param {*} context – The context to execute the template under\n * @param {*} data – Data to pass into the controller\n * @param {*} [options] – Optional settings object to pass into the controller closure\n * @returns {*}\n */\n render: function(templateName, context, data, options) {\n\n options = options || {};\n var template = this._templates[templateName],\n view = data;\n\n // If there's a data controller closure set, and if so, run the data through there\n if (template.viewClosure) {\n view = template.viewClosure.call(context, data, options);\n }\n\n // Attach globals\n view.okanjoConfig = okanjo.config;\n view.okanjoMetricUrl = okanjo.config.ads.apiUri.replace(/^https?:\\/\\//,''); // Url w/o scheme to prevent mixed-content warnings\n view.now = function() { return (new Date()).getTime(); };\n view.classDetects = this.classDetects;\n\n //noinspection JSUnresolvedVariable\n if (options.blockClasses && Array.isArray(options.blockClasses)) {\n view.classDetects = view.classDetects += \" \" + options.blockClasses.join(' ');\n }\n\n // Add CSS unless we are told not to\n if (options.css !== false) {\n if (template.options.css && template.options.css.length > 0) {\n for(var i = 0; i < template.options.css.length; i++) {\n this.ensureCss(template.options.css[i]);\n }\n }\n }\n\n // Render the template and return the result\n return okanjo.Mustache.render(template.markup, view);\n },\n\n formats: {\n\n /**\n * Formats a number into a currency string (rounded, decimal points, thousands separators)\n * See: http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript\n *\n * @param value – the number to format\n * @param [decimals] - The number of decimals to show\n * @param [decimalSeparator] – The decimals separator, default: .\n * @param [thousandsSeparator] – The thousands separator, default: ,\n * @returns {string} – Formatted currency string\n */\n currency: function(value, decimals, decimalSeparator, thousandsSeparator){\n decimals = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;\n decimalSeparator = decimalSeparator === undefined ? \".\" : decimalSeparator;\n thousandsSeparator = thousandsSeparator === undefined ? \",\" : thousandsSeparator;\n var s = value < 0 ? \"-\" : \"\",\n i = parseInt(value = Math.abs(+value || 0).toFixed(decimals)) + \"\",\n j = i.length;\n j = (j) > 3 ? j % 3 : 0;\n return s + (j ? i.substr(0, j) + thousandsSeparator : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + thousandsSeparator) + (decimals ? decimalSeparator + Math.abs(value - i).toFixed(decimals).slice(2) : \"\");\n },\n\n\n /**\n * Formats a product or an array of product objects for the view\n * @param {*} mixed – Product or an array of product objects\n * @returns {*} – Formatted product array or object\n */\n product: function(mixed) {\n // If we got an array of products, handle each one\n if (typeof mixed === \"object\" && Array.isArray(mixed)) {\n var products = [];\n for(var i = 0; i < mixed.length; i++) {\n products.push(this.product(mixed[i]));\n }\n return products;\n } else if(typeof mixed === \"object\" ) { // Individual product\n // Set first image as the display image\n\n //noinspection JSUnresolvedVariable\n mixed.image_url = mixed.image_urls ? mixed.image_urls[0] : '' ;\n //noinspection JSUnresolvedVariable\n mixed.escaped_buy_url = encodeURIComponent(mixed.buy_url);\n mixed.escaped_inline_buy_url = okanjo.util.empty(mixed.inline_buy_url) ? '' : encodeURIComponent(mixed.inline_buy_url);\n mixed.price_formatted = this.currency(mixed.price);\n return mixed;\n } else { // Unknown value\n return null;\n }\n }\n\n }\n };\n\n // global template engine for all the widgets\n okanjo.mvc = new TemplateEngine();\n\n\n})(okanjo, this);\n\n/*\n\n Adaptation based on https://github.com/larryosborn/JSONP\n\n The MIT License (MIT)\n\n Copyright (c) 2014 Larry Osborn \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n */\n(function() {\n if(this.JSONP) { return; }\n var JSONP, computedUrl, encode, noop, objectToURI, makeUniqueCallback, head;\n\n encode = window.encodeURIComponent;\n\n noop = function() {\n return void 0;\n };\n\n computedUrl = function(params) {\n var url;\n url = params.url;\n url += params.url.indexOf('?') < 0 ? '?' : '&';\n url += objectToURI(params.data);\n return url;\n };\n\n makeUniqueCallback = function() {\n JSONP.requestCounter += 1;\n return (new Date()).getTime() + \"_\" + JSONP.requestCounter;\n };\n\n objectToURI = function(obj) {\n var data, key, value;\n data = [];\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (Array.isArray(value)) {\n var i = 0;\n for( ; i < value.length; i++ ) {\n data.push(encode(key) + '[]=' + encode(value[i]));\n }\n } else if (typeof value === \"object\") {\n // SINGLE DEPTH OBJECTS - no recursion\n for (var k in value) {\n if (value.hasOwnProperty(k)) {\n data.push(encode(key) + '['+encode(k)+']=' + encode(value[k]));\n }\n }\n } else {\n data.push(encode(key) + '=' + encode(value));\n }\n }\n }\n return data.join('&');\n };\n\n JSONP = function(options) {\n options = options ? options : {};\n var callback, done, params, script, timeoutHandle, removeCallback;\n params = {\n data: options.data || {},\n error: options.error || noop,\n success: options.success || noop,\n beforeSend: options.beforeSend || noop,\n complete: options.complete || noop,\n url: options.url || '',\n timeout: options.timeout || 30000\n };\n params.computedUrl = computedUrl(params);\n if (params.url.length === 0) {\n throw new Error('MissingUrl');\n }\n done = false;\n if (params.beforeSend({}, params) !== false) {\n //noinspection JSUnresolvedVariable\n callback = params.data[options.callbackName || 'callback'] = '_okanjo_jsonp_' + makeUniqueCallback();\n window[callback] = function(data) {\n\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n timeoutHandle = null;\n\n params.success(data, params);\n params.complete(data, params);\n removeCallback();\n };\n\n removeCallback = function() {\n try {\n return delete window[callback];\n } catch (_error) {\n window[callback] = void 0;\n return void 0;\n }\n };\n\n script = window.document.createElement('script');\n script.src = computedUrl(params);\n script.async = true;\n\n timeoutHandle = setTimeout(function() {\n timeoutHandle = null;\n var err = new Error(\"JSONP request did not respond in time!\");\n err.url = (script && script.src) || null;\n params.error(err);\n removeCallback();\n return params.complete(err, params);\n }, params.timeout);\n\n script.onerror = function(evt) {\n if (timeoutHandle) { clearTimeout(timeoutHandle); }\n params.error({\n url: script.src,\n event: evt\n });\n return params.complete({\n url: script.src,\n event: evt\n }, params);\n };\n\n script.onload = script.onreadystatechange = function() {\n if (!done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {\n done = true;\n script.onload = script.onreadystatechange = null;\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n //jshint -W093\n return script = null;\n //jshint +W093\n }\n };\n\n head = head || window.document.getElementsByTagName('head')[0] || window.document.documentElement;\n return head.insertBefore(script, head.firstChild);\n }\n };\n\n JSONP.requestCounter = 0;\n JSONP.makeUrl = computedUrl;\n JSONP.objectToURI = objectToURI;\n\n if ((typeof define !== \"undefined\" && define !== null) && define.amd) {\n define(function() {\n return JSONP;\n });\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = JSONP;\n } else {\n this.JSONP = JSONP;\n }\n\n}).call(okanjo);\n\n// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\nif (!Object.keys) {\n Object.keys = (function() {\n 'use strict';\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n return function(obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }());\n}\n\n//// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\n//if (typeof Object.create != 'function') {\n// Object.create = (function() {\n// var Temp = function() {};\n// return function (prototype) {\n// if (arguments.length > 1) {\n// throw new Error('Second argument not supported');\n// }\n// if (typeof prototype != 'object') {\n// throw new TypeError('Argument must be an object');\n// }\n// Temp.prototype = prototype;\n// var result = new Temp();\n// Temp.prototype = null;\n// return result;\n// };\n// })();\n//}\n\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\nif (!Array.isArray) {\n Array.isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n };\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.14\n// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\n// Reference: http://es5.github.io/#x15.4.4.14\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function(searchElement, fromIndex) {\n\n var k;\n\n /* jshint ignore:start */\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) { //\n throw new TypeError('\"this\" is null or not defined');\n }\n /* jshint ignore:end */\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\nif (!Array.prototype.every) {\n Array.prototype.every = function(callbackfn, thisArg) {\n 'use strict';\n var T, k;\n\n // jshint -W041\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n // jshint +W041\n\n // 1. Let O be the result of calling ToObject passing the this\n // value as the argument.\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get internal method\n // of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.\n if (typeof callbackfn !== 'function') {\n throw new TypeError();\n }\n\n // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 1) {\n T = thisArg;\n }\n\n // 6. Let k be 0.\n k = 0;\n\n // 7. Repeat, while k < len\n while (k < len) {\n\n var kValue;\n\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the HasProperty internal\n // method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n if (k in O) {\n\n // i. Let kValue be the result of calling the Get internal method\n // of O with argument Pk.\n kValue = O[k];\n\n // ii. Let testResult be the result of calling the Call internal method\n // of callbackfn with T as the this value and argument list\n // containing kValue, k, and O.\n var testResult = callbackfn.call(T, kValue, k, O);\n\n // iii. If ToBoolean(testResult) is false, return false.\n if (!testResult) {\n return false;\n }\n }\n k++;\n }\n return true;\n };\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\nif (!Array.prototype.filter) {\n Array.prototype.filter = function(fun/*, thisArg*/) {\n 'use strict';\n\n if (this === void 0 || this === null) {\n throw new TypeError();\n }\n\n var t = Object(this),\n len = t.length >>> 0;\n\n if (typeof fun !== 'function') {\n throw new TypeError();\n }\n\n var res = [],\n thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t) {\n var val = t[i];\n\n // NOTE: Technically this should Object.defineProperty at\n // the next index, as push can be affected by\n // properties on Object.prototype and Array.prototype.\n // But that method's new, and collisions should be\n // rare, so use the more-compatible alternative.\n if (fun.call(thisArg, val, i, t)) {\n res.push(val);\n }\n }\n }\n\n return res;\n };\n}\n\n// Doesn't work in IE7 so it's only here for reference\n//https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n(function() {\n if (!Event.prototype.preventDefault) {\n Event.prototype.preventDefault=function() {\n //noinspection JSUnusedGlobalSymbols\n this.returnValue=false;\n };\n }\n if (!Event.prototype.stopPropagation) {\n Event.prototype.stopPropagation=function() {\n //noinspection JSUnusedGlobalSymbols\n this.cancelBubble=true;\n };\n }\n if (!Element.prototype.addEventListener) {\n var eventListeners=[];\n\n var addEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var self=this;\n var wrapper=function(e) {\n e.target=e.srcElement;\n e.currentTarget=self;\n if (listener.handleEvent) {\n listener.handleEvent(e);\n } else {\n listener.call(self,e);\n }\n };\n if (type==\"DOMContentLoaded\") {\n var wrapper2=function(e) {\n if (document.readyState==\"complete\") {\n wrapper(e);\n }\n };\n document.attachEvent(\"onreadystatechange\",wrapper2);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper2});\n\n if (document.readyState==\"complete\") {\n //noinspection JSClosureCompilerSyntax\n var e=new Event();\n e.srcElement=window;\n wrapper2(e);\n }\n } else {\n this.attachEvent(\"on\"+type,wrapper);\n eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper});\n }\n };\n var removeEventListener=function(type,listener /*, useCapture (will be ignored) */) {\n var counter=0;\n while (counter~+]/\n , normalizr = /^\\s+|\\s*([,\\s\\+\\~>]|$)\\s*/g\n , splitters = /[\\s\\>\\+\\~]/\n , splittersMore = /(?![\\s\\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^'\"]*\\]|[\\s\\w\\+\\-]*\\))/\n , specialChars = /([.*+?\\^=!:${}()|\\[\\]\\/\\\\])/g\n , simple = /^(\\*|[a-z0-9]+)?(?:([\\.\\#]+[\\w\\-\\.#]+)?)/\n , attr = /\\[([\\w\\-]+)(?:([\\|\\^\\$\\*\\~]?\\=)['\"]?([ \\w\\-\\/\\?\\&\\=\\:\\.\\(\\)\\!,@#%<>\\{\\}\\$\\*\\^]+)[\"']?)?\\]/\n , pseudo = /:([\\w\\-]+)(\\(['\"]?([^()]+)['\"]?\\))?/\n , easy = new RegExp(idOnly.source + '|' + tagOnly.source + '|' + classOnly.source)\n , dividers = new RegExp('(' + splitters.source + ')' + splittersMore.source, 'g')\n , tokenizr = new RegExp(splitters.source + splittersMore.source)\n , chunker = new RegExp(simple.source + '(' + attr.source + ')?' + '(' + pseudo.source + ')?')\n\n var walker = {\n ' ': function (node) {\n return node && node !== html && node.parentNode\n }\n , '>': function (node, contestant) {\n return node && node.parentNode == contestant.parentNode && node.parentNode\n }\n , '~': function (node) {\n return node && node.previousSibling\n }\n , '+': function (node, contestant, p1, p2) {\n if (!node) return false\n return (p1 = previous(node)) && (p2 = previous(contestant)) && p1 == p2 && p1\n }\n }\n\n function cache() {\n this.c = {}\n }\n cache.prototype = {\n g: function (k) {\n return this.c[k] || undefined\n }\n , s: function (k, v, r) {\n v = r ? new RegExp(v) : v\n return (this.c[k] = v)\n }\n }\n\n var classCache = new cache()\n , cleanCache = new cache()\n , attrCache = new cache()\n , tokenCache = new cache()\n\n function classRegex(c) {\n return classCache.g(c) || classCache.s(c, '(^|\\\\s+)' + c + '(\\\\s+|$)', 1)\n }\n\n // not quite as fast as inline loops in older browsers so don't use liberally\n function each(a, fn) {\n var i = 0, l = a.length\n for (; i < l; i++) fn(a[i])\n }\n\n function flatten(ar) {\n for (var r = [], i = 0, l = ar.length; i < l; ++i) arrayLike(ar[i]) ? (r = r.concat(ar[i])) : (r[r.length] = ar[i])\n return r\n }\n\n function arrayify(ar) {\n var i = 0, l = ar.length, r = []\n for (; i < l; i++) r[i] = ar[i]\n return r\n }\n\n function previous(n) {\n while (n = n.previousSibling) if (n[nodeType] == 1) break;\n return n\n }\n\n function q(query) {\n return query.match(chunker)\n }\n\n // called using `this` as element and arguments from regex group results.\n // given => div.hello[title=\"world\"]:foo('bar')\n // div.hello[title=\"world\"]:foo('bar'), div, .hello, [title=\"world\"], title, =, world, :foo('bar'), foo, ('bar'), bar]\n function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {\n var i, m, k, o, classes\n if (this[nodeType] !== 1) return false\n if (tag && tag !== '*' && this[tagName] && this[tagName].toLowerCase() !== tag) return false\n if (idsAndClasses && (m = idsAndClasses.match(id)) && m[1] !== this.id) return false\n if (idsAndClasses && (classes = idsAndClasses.match(clas))) {\n for (i = classes.length; i--;) if (!classRegex(classes[i].slice(1)).test(this.className)) return false\n }\n if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) return false\n if (wholeAttribute && !value) { // select is just for existance of attrib\n o = this.attributes\n for (k in o) {\n if (Object.prototype.hasOwnProperty.call(o, k) && (o[k].name || k) == attribute) {\n return this\n }\n }\n }\n if (wholeAttribute && !checkAttr(qualifier, getAttr(this, attribute) || '', value)) {\n // select is for attrib equality\n return false\n }\n return this\n }\n\n function clean(s) {\n return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\\\$1'))\n }\n\n function checkAttr(qualify, actual, val) {\n switch (qualify) {\n case '=':\n return actual == val\n case '^=':\n return actual.match(attrCache.g('^=' + val) || attrCache.s('^=' + val, '^' + clean(val), 1))\n case '$=':\n return actual.match(attrCache.g('$=' + val) || attrCache.s('$=' + val, clean(val) + '$', 1))\n case '*=':\n return actual.match(attrCache.g(val) || attrCache.s(val, clean(val), 1))\n case '~=':\n return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, '(?:^|\\\\s+)' + clean(val) + '(?:\\\\s+|$)', 1))\n case '|=':\n return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, '^' + clean(val) + '(-|$)', 1))\n }\n return 0\n }\n\n // given a selector, first check for simple cases then collect all base candidate matches and filter\n function _qwery(selector, _root) {\n var r = [], ret = [], i, l, m, token, tag, els, intr, item, root = _root\n , tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n , dividedTokens = selector.match(dividers)\n\n if (!tokens.length) return r\n\n token = (tokens = tokens.slice(0)).pop() // copy cached tokens, take the last one\n if (tokens.length && (m = tokens[tokens.length - 1].match(idOnly))) root = byId(_root, m[1])\n if (!root) return r\n\n intr = q(token)\n // collect base candidates to filter\n els = root !== _root && root[nodeType] !== 9 && dividedTokens && /^[+~]$/.test(dividedTokens[dividedTokens.length - 1]) ?\n function (r) {\n while (root = root.nextSibling) {\n root[nodeType] == 1 && (intr[1] ? intr[1] == root[tagName].toLowerCase() : 1) && (r[r.length] = root)\n }\n return r\n }([]) :\n root[byTag](intr[1] || '*')\n // filter elements according to the right-most part of the selector\n for (i = 0, l = els.length; i < l; i++) {\n if (item = interpret.apply(els[i], intr)) r[r.length] = item\n }\n if (!tokens.length) return r\n\n // filter further according to the rest of the selector (the left side)\n each(r, function (e) { if (ancestorMatch(e, tokens, dividedTokens)) ret[ret.length] = e })\n return ret\n }\n\n // compare element to a selector\n function is(el, selector, root) {\n if (isNode(selector)) return el == selector\n if (arrayLike(selector)) return !!~flatten(selector).indexOf(el) // if selector is an array, is el a member?\n\n var selectors = selector.split(','), tokens, dividedTokens\n while (selector = selectors.pop()) {\n tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr))\n dividedTokens = selector.match(dividers)\n tokens = tokens.slice(0) // copy array\n if (interpret.apply(el, q(tokens.pop())) && (!tokens.length || ancestorMatch(el, tokens, dividedTokens, root))) {\n return true\n }\n }\n return false\n }\n\n // given elements matching the right-most part of a selector, filter out any that don't match the rest\n function ancestorMatch(el, tokens, dividedTokens, root) {\n var cand\n // recursively work backwards through the tokens and up the dom, covering all options\n function crawl(e, i, p) {\n while (p = walker[dividedTokens[i]](p, e)) {\n if (isNode(p) && (interpret.apply(p, q(tokens[i])))) {\n if (i) {\n if (cand = crawl(p, i - 1, p)) return cand\n } else return p\n }\n }\n }\n return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))\n }\n\n function isNode(el, t) {\n return el && typeof el === 'object' && (t = el[nodeType]) && (t == 1 || t == 9)\n }\n\n function uniq(ar) {\n var a = [], i, j;\n o:\n for (i = 0; i < ar.length; ++i) {\n for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o\n a[a.length] = ar[i]\n }\n return a\n }\n\n function arrayLike(o) {\n return (typeof o === 'object' && isFinite(o.length))\n }\n\n function normalizeRoot(root) {\n if (!root) return doc\n if (typeof root == 'string') return qwery(root)[0]\n if (!root[nodeType] && arrayLike(root)) return root[0]\n return root\n }\n\n function byId(root, id, el) {\n // if doc, query on it, else query the parent doc or if a detached fragment rewrite the query and run on the fragment\n return root[nodeType] === 9 ? root.getElementById(id) :\n root.ownerDocument &&\n (((el = root.ownerDocument.getElementById(id)) && isAncestor(el, root) && el) ||\n (!isAncestor(root, root.ownerDocument) && select('[id=\"' + id + '\"]', root)[0]))\n }\n\n function qwery(selector, _root) {\n var m, el, root = normalizeRoot(_root)\n\n // easy, fast cases that we can dispatch with simple DOM calls\n if (!root || !selector) return []\n if (selector === window || isNode(selector)) {\n return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : []\n }\n if (selector && arrayLike(selector)) return flatten(selector)\n if (m = selector.match(easy)) {\n if (m[1]) return (el = byId(root, m[1])) ? [el] : []\n if (m[2]) return arrayify(root[byTag](m[2]))\n if (hasByClass && m[3]) return arrayify(root[byClass](m[3]))\n }\n\n return select(selector, root)\n }\n\n // where the root is not document and a relationship selector is first we have to\n // do some awkward adjustments to get it to work, even with qSA\n function collectSelector(root, collector) {\n return function (s) {\n var oid, nid\n if (splittable.test(s)) {\n if (root[nodeType] !== 9) {\n // make sure the el has an id, rewrite the query, set root to doc and run it\n if (!(nid = oid = root.getAttribute('id'))) root.setAttribute('id', nid = '__qwerymeupscotty')\n s = '[id=\"' + nid + '\"]' + s // avoid byId and allow us to match context element\n collector(root.parentNode || root, s, true)\n oid || root.removeAttribute('id')\n }\n return;\n }\n s.length && collector(root, s, false)\n }\n }\n\n var isAncestor = 'compareDocumentPosition' in html ?\n function (element, container) {\n return (container.compareDocumentPosition(element) & 16) == 16\n } : 'contains' in html ?\n function (element, container) {\n container = container[nodeType] === 9 || container == window ? html : container\n return container !== element && container.contains(element)\n } :\n function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , getAttr = function () {\n // detect buggy IE src/href getAttribute() call\n var e = doc.createElement('p')\n return ((e.innerHTML = 'x') && e.firstChild.getAttribute('href') != '#x') ?\n function (e, a) {\n return a === 'class' ? e.className : (a === 'href' || a === 'src') ?\n e.getAttribute(a, 2) : e.getAttribute(a)\n } :\n function (e, a) { return e.getAttribute(a) }\n }()\n , hasByClass = !!doc[byClass]\n // has native qSA support\n , hasQSA = doc.querySelector && doc[qSA]\n // use native qSA\n , selectQSA = function (selector, root) {\n var result = [], ss, e\n try {\n if (root[nodeType] === 9 || !splittable.test(selector)) {\n // most work is done right here, defer to qSA\n return arrayify(root[qSA](selector))\n }\n // special case where we need the services of `collectSelector()`\n each(ss = selector.split(','), collectSelector(root, function (ctx, s) {\n e = ctx[qSA](s)\n if (e.length == 1) result[result.length] = e.item(0)\n else if (e.length) result = result.concat(arrayify(e))\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n } catch (ex) { }\n return selectNonNative(selector, root)\n }\n // no native selector support\n , selectNonNative = function (selector, root) {\n var result = [], items, m, i, l, r, ss\n selector = selector.replace(normalizr, '$1')\n if (m = selector.match(tagAndOrClass)) {\n r = classRegex(m[2])\n items = root[byTag](m[1] || '*')\n for (i = 0, l = items.length; i < l; i++) {\n if (r.test(items[i].className)) result[result.length] = items[i]\n }\n return result\n }\n // more complex selector, get `_qwery()` to do the work for us\n each(ss = selector.split(','), collectSelector(root, function (ctx, s, rewrite) {\n r = _qwery(s, ctx)\n for (i = 0, l = r.length; i < l; i++) {\n if (ctx[nodeType] === 9 || rewrite || isAncestor(r[i], root)) result[result.length] = r[i]\n }\n }))\n return ss.length > 1 && result.length > 1 ? uniq(result) : result\n }\n , configure = function (options) {\n // configNativeQSA: use fully-internal selector or native qSA where present\n if (typeof options[useNativeQSA] !== 'undefined')\n select = !options[useNativeQSA] ? selectNonNative : hasQSA ? selectQSA : selectNonNative\n }\n\n configure({ useNativeQSA: true })\n\n qwery.configure = configure\n qwery.uniq = uniq\n qwery.is = is\n qwery.pseudos = {}\n\n return qwery\n});\n\n/*! onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license | Wrapped in UMD by Okanjo */\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.onDomReady = factory();\n }\n}(this, function() {\n\n 'use strict';\n\n var win = window,\n doc = win.document,\n docElem = doc.documentElement,\n\n LOAD = \"load\",\n FALSE = false,\n ONLOAD = \"on\"+LOAD,\n COMPLETE = \"complete\",\n READYSTATE = \"readyState\",\n ATTACHEVENT = \"attachEvent\",\n DETACHEVENT = \"detachEvent\",\n ADDEVENTLISTENER = \"addEventListener\",\n DOMCONTENTLOADED = \"DOMContentLoaded\",\n ONREADYSTATECHANGE = \"onreadystatechange\",\n REMOVEEVENTLISTENER = \"removeEventListener\",\n\n // W3C Event model\n w3c = ADDEVENTLISTENER in doc,\n top = FALSE,\n\n // isReady: Is the DOM ready to be used? Set to true once it occurs.\n isReady = FALSE,\n\n // Callbacks pending execution until DOM is ready\n callbacks = [];\n\n // Handle when the DOM is ready\n function ready( fn ) {\n if ( !isReady ) {\n\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return defer( ready );\n }\n\n // Remember that the DOM is ready\n isReady = true;\n\n // Execute all callbacks\n while ( fn = callbacks.shift() ) {\n defer( fn );\n }\n }\n }\n\n // The ready event handler\n function completed( event ) {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n detach();\n ready();\n }\n }\n\n // Clean-up method for dom ready events\n function detach() {\n if ( w3c ) {\n doc[REMOVEEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n win[REMOVEEVENTLISTENER]( LOAD, completed, FALSE );\n } else {\n doc[DETACHEVENT]( ONREADYSTATECHANGE, completed );\n win[DETACHEVENT]( ONLOAD, completed );\n }\n }\n\n // Defers a function, scheduling it to run after the current call stack has cleared.\n function defer( fn, wait ) {\n // Allow 0 to be passed\n setTimeout( fn, +wait >= 0 ? wait : 1 );\n }\n\n // Attach the listeners:\n\n // Catch cases where onDomReady is called after the browser event has already occurred.\n // we once tried to use readyState \"interactive\" here, but it caused issues like the one\n // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n if ( doc[READYSTATE] === COMPLETE ) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n defer( ready );\n\n // Standards-based browsers support DOMContentLoaded\n } else if ( w3c ) {\n // Use the handy event callback\n doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE );\n\n // A fallback to window.onload, that will always work\n win[ADDEVENTLISTENER]( LOAD, completed, FALSE );\n\n // If IE event model is used\n } else {\n // Ensure firing before onload, maybe late but safe also for iframes\n doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed );\n\n // A fallback to window.onload, that will always work\n win[ATTACHEVENT]( ONLOAD, completed );\n\n // If IE and not a frame\n // continually check to see if the document is ready\n try {\n top = win.frameElement == null && docElem;\n } catch(e) {}\n\n if ( top && top.doScroll ) {\n (function doScrollCheck() {\n if ( !isReady ) {\n try {\n // Use the trick by Diego Perini\n // http://javascript.nwbox.com/IEContentLoaded/\n top.doScroll(\"left\");\n } catch(e) {\n return defer( doScrollCheck, 50 );\n }\n\n // detach all dom ready events\n detach();\n\n // and execute any waiting functions\n ready();\n }\n })();\n }\n }\n\n function onDomReady( fn ) {\n // If DOM is ready, execute the function (async), otherwise wait\n isReady ? defer( fn ) : callbacks.push( fn );\n }\n\n // Add version\n onDomReady.version = \"1.4.0\";\n // Add method to check if DOM is ready\n onDomReady.isReady = function(){\n return isReady;\n };\n\n return onDomReady;\n}));\n\n\n/*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n/*global define: false*/\n\n(function (global, factory) {\n if (typeof exports === \"object\" && exports) {\n factory(exports); // CommonJS\n } else if (typeof define === \"function\" && define.amd) {\n define(['exports'], factory); // AMD\n } else {\n factory(global.Mustache = {}); //