-Rather than run script on document ready, run it as soon as the DOM is done loading. This might fix the problem with inconsistent context menus.