Replaces JS for navigation with jQuery function