main: Combine $(window) calls