added java script to ease the nav transitions