Fixed javascript navigation animation