improved the header animation
further js improvements