fully refactored - now the solution relies on custom EventHub mediator that allows support for older browsers and makes the code clean and easy-readable