Updated the hide method to detect whether or not the event is defined
Updating the event to prevent default when the modal is closed. Fixes #2
Merge pull request #4 from webbushka/master

This is a fix for issue #1 and #3