Fixed toastr notifications

- Fixed up some JSLint problems
- Added a onHide callback for the popup plugin