add basic keyboard navigation support
define custom events before and after page switch animations