Code refactoring for slide navigation. Remove javascript error when site has no mobilenavigation.