/* Compressed from ../common.zlib.js */
zlib = new Object(); var $c = $c || function (el) { return $$("." + el);}
zlib.addOverNightShippingPopTo = function (e_class, uri) { var uri = (uri == null) ? "http://zappos.com/overnightpop.html" : uri; $c(e_class).each( function (el) { el.onclick = function () { return zlib.overNightShipping(uri);}
});}
zlib.overNightShipping = function (uri) { var uri = (uri == null) ? "http://zappos.com/overnightpop.html" : uri; zlib.popup(uri, 400, 640, 'overnight_ship'); return false;}
zlib.popup = function (uri, width, height, name) { var name = (name == null) ? "zappos_window" : name; var newWindow = window.open(uri, name, "height=" + height + ",width=" + width + ",status=no,toolbar=no,menubar=no,location=no")
newWindow.focus(); return newWindow;}
zlib.readCookies = function (name) { var cname = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(cname) == 0) return c.substring(cname.length, c.length);}
}
zlib.getItemsInCart = function () { var items = zlib.readCookies('scitems'); if (items) return items; return 0;}
zlib.addCartCounts = function (options) { var options = (options == null) ? {} : options; options['className'] = options['className'] || 'cart-with-count'; options['element'] = options['element'] || 'span'; options['beforeCount'] = options['beforeCount'] || ' ('; options['afterCount'] = options['afterCount'] || ')'; options['withItems'] = options['withItems'] || false; var carts = $c(options['className']); var items = zlib.getItemsInCart(); var text = ""; if (options['withItems']) { var ti = (items == 1) ? ' item' : ' items'; text = options['beforeCount'] + items + ti + options['afterCount'];} else { text = options['beforeCount'] + items + options['afterCount'];}
for (var i = 0; i < carts.length; i++) { var cartSpan = document.createElement(options['element']); cartSpan.appendChild(document.createTextNode(text)); carts[i].appendChild(cartSpan);}
}

