Moved custom Qt objects exposed to JavaScript to window.nimbus object.
Added JavaScript events for online and offline mode.