CSS3 loading bar with JS for animation