Javascript support for CSS changes when head is done