// setup the namespace
if (typeof onepica == "undefined" || !onepica) {
    var onepica = {};
}

var screenManager;
function initScreenManager() {
	/*
	 * Unregisters a Varien listener, which monitors when Ajax requests are sent out.
	 * See Crumbs ticket #129.
	 */
	Ajax.Responders.unregister(Varien.GlobalHandlers);

	screenManager = new onepica.ScreenManager();
	/**
	 * Our custom event alerting that the screenManager is available.
	 * You can monitor for this event with: element.observe('onepica:load', callback);
	 */
	document.fire('onepica:load');
}

Event.observe(window, 'load', initScreenManager);

Cufon.replace('#nav li ul li.level1 a, #TopLayeredNav dl dt, #TopLayeredNav dl li a, #TopLayeredNav dl li span', { fontFamily: 'Segoe Script' }); 
Cufon.replace('#content h3, #my-account h2, #my-account h3, #checkout .checkout-links li.text-link a, .col-additional h4, .std h4, .product-view h2, .cufon-fattip, .category-product-list .item a h5, .category-product-list .item .price-box .price', { fontFamily: 'FATTIP' });
