hooking up the menu functionality and adding the event handlers to the $rootScope