Replace jquery trigger() and bind() method with HTML5 addEventListener() and dispatchEvent() (+ fireEvent for IE < 9)