I only bind the left and right arrows because users often use the up and down arrows for navigation but you could uncomment those lines if you want to use up and down:
<script type="text/javascript">
$(document).ready(function($) {
$('ul.gallery_unstyled').addClass('gallery');
$('ul.gallery').galleria({
history: false,
clickNext: true,
insert: '#main_image',
onImage: function(image, caption, thumb) {
// add a title for the clickable image
image.attr('title', 'Next image >>');
}
});
$(document).keydown(function(e) {
switch (e.keyCode) {
case 37: // left arrow
//case 38: // up arrow
$.galleria.prev();
break;
case 39: // right arrow
//case 40: // down arrow
$.galleria.next();
break;
}
});
});