// for the global drop-down-on-hover menu items...

function showSubmenu() {
    $(this).children(".submenu").slideDown();
}

function hideSubmenu() {
    $(this).children(".submenu").slideUp();
}

$(document).ready(function() {
    $(".hover-menu").hoverIntent({
        sensitivity: 1,
        interval: 250,
        over: showSubmenu,
        timeout: 300,
        out: hideSubmenu
    });
});

function openNewWindow(url, name, width, height, scrollbars, resizable, status) {
    var newWin = window.open(url, name,'width=' + width + ',height=' + height + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',status=' + status + '');
    newWin.focus();
    return newWin;
}

function openNewWindowDefault(url, name, width, height) {
    return openNewWindow(url, name, width, height, 'yes', 'yes', 'yes');
}

// for the shopping cart buttons...

function submitPayPalForm(form) {
    openNewWindowDefault('about:blank', 'paypal', 875, 450);
    form.submit();
}

