moved to jquery $(window)