I don't know that script and it may be able to do more than you've shown, but that snippet inserts it into your php code and uses the onClick function as a trigger. This would mean that the messagestack wouldn't disappear unless the visitor clicks on it. This type of insertion and the use of onClick as a trigger is very "last year" in javascript terms.

Personally I'd opt for one of the easing function in the jQuery UI library or the jQuery Easing Plugin and in either case use a jQuery selector to attach the behaviour to the messageStack div as the page loads with a delay before the fadeout starts to give the visitor time to see the message.