added shown and hidden event

Sometimes people may want to do things when the menu is shown or hidden, so I added two events to at.js.