Uh... the site sort of already does that. If you have a new message, there should be a bold "1" next to the word "Notifications" up on the top right corner of the screen. It does this for private messages and visitor messages, as well as friend requests and any other notifications. Then you click the little pull-down arrow and it gives you links to whatever it's notifying you about.
But yeah. This is already a thing. ...And if it's not showing up for you, then that's another issue entirely.