It might also be a good idea to put in some kind of protection against double initialization, to prevent the CSS and scroll event from being added multiple times.