/*
Nexter v2.0 (using jQuery)
By Richard Bolt (http://www.rboltphotography.com)
Nexter looks for next/previous rel attributes on your
link attributes and binds them to the next/previous
arrows for easier navigation and pagination usage.

Requirements: jQuery.
*/

$(document).ready(function(){
    // Next/Previous Link attributes tied to left/right arrow keypresses.
    var url_next = $("link[rel=next]").attr('href');
    var url_prev = $("link[rel^=prev]").attr('href');
    function previous(){
        if (url_prev) {
            return window.location.href = url_prev;
        } else {
            return false;
        };
    };
    function next(){
        if (url_next) {
            return window.location.href = url_next;
        } else {
            return false;
        };
    };
    $(document).keyup(function(event){
        switch (event.keyCode){
            case 37: case 80: previous(); break;    
            case 39: case 78: next();
        }
    });
});
