Fixed some issues when using this component inside tabs. And inside other divs with relative position.
Added some comments to the javascript.