       self.toggleClass("active").next().stop(true, true).slideToggle "slow"
       e.preventDefault()
 
-$(document).ready ->
   $('.datepicker').datepicker()
 
-$(document).ready ->
   notifications = $('body').find($('.flash_notification'))
   if notifications.length > 0
     bar = $('<ul id="notifications-bar" class="container"></ul>')

      notification.html($(this).html())

      notification.click ->
        console.log $(this).height()
        console.log bar.height()
        bar.animate({
          'height': "#{bar.height() - $(this).height() - 7}px"
        }, 'fast', 'linear', ->

    e.preventDefault()
    window.open($(this).attr('href'))

$(document).ready ->
  initPage()
  externalLinks()
