$(document).ready(function() {
    linkPrev = $("#link-prev").attr("href");
    linkNext = $("#link-next").attr("href");

/*    
    $(document).bind('keydown', 'ctrl+left', function(){
        if (linkPrev) {
            location.href = linkPrev;
        }
    });

    $(document).bind('keydown', 'ctrl+right', function(){
        if (linkNext) {
            location.href = linkNext;
        }
    });
*/
    $(document).bind('keydown', 'ctrl+down', function(){
      if (linkPrev) {
            location.href = linkPrev;
        }
    });

    $(document).bind('keydown', 'ctrl+up', function(){
        if (linkNext) {
            location.href = linkNext;
        }
    });

    $(document).bind('keydown', 'alt+n', function(){
        console.log('pum');
        if ($('#add-news-button')) {
            location.href = '/post/new/';
        }
    });


});
