turned modal open/dismiss calls from function calls to event trigger: cleaned up jshint errors, added logic to prevent pop ups from triggering multiple times