jQuery: How to detect window width on the fly? (Script from StackOverflow)