// Webkit detection script
Modernizr.addTest('webkit', function(){
return RegExp("AppleWebKit/").test(navigator.userAgent);
});

// KEYBOARD SHORTCUTS/NAVIGATION
$(document).ready(function () {
	$(document).keydown(function(e) {
        var url = false;
        if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
        	if (e.which == 37) {  // Left arrow key code
            	url = $('#nav-entry .newer').attr('href');
        	}
        	else if (e.which == 39) {  // Right arrow key code
            	url = $('#nav-entry .older').attr('href');
        	}
        	if (url) {
            	window.location = url;
        	}
        }
    });
});

(function(document){
// Hide URL Bar for iOS
// http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/
/mobile/i.test(navigator.userAgent) && !location.hash && setTimeout(function () {
  window.scrollTo(0, 1);
}, 1000);
})(document);



