.addClass "visited"

added .addClass("visited") everywhere where .addClass("active") is present. the visited class will not be removed, to give the chance to animate elements once per visit in stead of every time the page switches.