Context menu dialog box problem: better, but still not working.

- removed fake attr settings (possible compatibility issue with newer jQuery)
- replaced with extra class
- fixed formatting
- still doesn't work: addClass works, but hasClass always returns false when function runs again