changed events to use goog.events for better cross-browser support