

/**
 * Window popUp
 * 
 * Idea by:  Nic Wolfe
 * This script and many more are available free online at
 * The JavaScript Source!! http://javascript.internet.com
 * 
 * @param string URL
 */
function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=473,height=645,left = 723.5,top = 285');");
}

/* AddThis Config (send to friends) */
var addthis_config =
{
   ui_delay: 500
}

/**
 * ECWID alter page based on url hash
 * NOTE: this seems unnecessary if appropriate markup/css existed from ecwid in the first place, grrr
 */
var last_hash = '';

function poll_hash() {
    if(last_hash !== document.location.hash) {
        last_hash = document.location.hash;
        hide_store_footer(last_hash);    
    }
}


function hide_store_footer(hash) {
    var element = document.getElementById('store_footer');
    if (element) {
        if ( 
            (hash.indexOf('mode=product') >= 0) || 
            (hash.indexOf('mode=category') >= 0)
            ) 
        {
            element.style.display = '';
        } else {
            element.style.display = 'none';
        }
    }
}

setInterval(poll_hash, 100);

