Refactored javascript, added animated tabs for nav