amd updates
added events around buildNavigation()
replaced 'insertBefore' with 'insertAfter' method