           parent.toggleClass 'active', true
         else
           parent.toggleClass 'active', false
-      window.scrollTo 0, 0 unless noscroll
+
+    scrollToTop = ->
+      window.scrollTo 0, 0
 
     $(window).on 'hashchange', changeSection
+    $(window).on 'hashchange', scrollToTop
 
     showDownloadWarning = ->
       $('#download-warning').modal()

      if window.location.hash.length <= 1
        window.location.hash = firstSectionHash
      else
        changeSection null, !!e

    $(document).ajaxComplete initialize
    initialize()

if window.location.pathname.match(/\/apply$/)
  $ ->

    changeSection = ->
      hash = window.location.hash
      sectionId = hash.substring 1
      $('.section').each ()->
