added .failed styling and .justVisited animation

@dhowe please note I am using the .justVisited class and not the
.visited class to make sure the animation is triggered only in the very
moment of the visit and not as soon as the page loads.