I'm fairly new to using classes in JS so I got a bit of a problem...
I'm trying to make a class to create and control a menu box...
The menu consists of 2 parts...
the trigger (div) and the box (div) that is the actuall menu...
each menu has a sticky option that forces the box not to close when active.

when the user clicks someplace other than the trigger or the box there is a check if the box is sticky and if not closes the box....

http://sandbox.noodles.gr/javascript+css/v5_popups/
this is the working NON class box but is a mess... :) just to see what needs to happen! :P

my first problem is that I can't find a way to add an Event handler to the document from *inside* the class that will check each menu...

one other thing is after this is fixed how to insert in the check function what element was clicked... in the normal version this was pretty easy...
but I got NO idea how to do this in a class...