use document.activeElement instead of jqueyr *:active selector
scope tab to modal when open
move document.activeElement into variable