Fixing issue with .attr when passing in window as selector. Fixing so .show works better