$(document).ready(function () {

    // listens for any navigation keypress activity
    $(document).keypress(function (e) {
        
        if (document.activeElement.toString() == "[object HTMLBodyElement]") {

            switch (e.which) {
                // user presses the "q" key    
                case 113: showViaKeypress("/Default.aspx");
                    break;
                // user presses the "c" key    
                case 99: showViaKeypress("/Cockpit.aspx");
                    break;
            }
        }
    });
});

// shows a given element and hides all others
function showViaKeypress(url)
{
    window.location = url;
}

// shows proper DIV depending on link 'href'
function showViaShadowbox(url)
{
    Shadowbox.open({
        player: 'img',
        content: 'http://www.dialicious.nl/'+ url
    });
}

// shows proper DIV depending on link 'href'
function closeShadowbox() {
    Shadowbox.close();
}
