optimized nav bar animation using css transitions instead of jquery animate