Added notifications.js

Creates overlay notifications from events and key strokes. improved
fading.
These close braces should be aligned with `if`.  It looks like it happens a few times in this function.