Changed from event.x to event.pageX to work with jQuery as well