Visualization bugfix

Changed mouse position detection. Should work on Firefox, Opera and Chrome, no support for Internet Explorer at the moment.