Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
I'm guessing it's the name of the function you're calling that's the root of the problem. mmenu.js also has a function called popup(), which is probably overriding your cookie-related function when you load mmenu.js. Can you rename your own popup() to something else?
So... is the headache because you smacked yourself in the head when you read the cause? Just goes to show that it can happen even to the best of us. Glad to help.
That's the main reason for the headache, although there's something wrong in my office that made it even worse so I'm now working from home (not to mention CSS is about to give me another one!). Already made the change and you were right.