App.ApplicationView = Ember.Component.extend
  layoutName: 'application'
  classNames: ['application-view']
  didRender: ->
    $('.toggle-side-menu,.side-menu').click ->
      menu = $('.side-menu')
      toggle = $('.toggle-side-menu')
      if menu.is(':visible')
        menu.animate left: -255, -> $(@).hide()
        toggle.animate left: 0, -> $(@).removeClass('open')
      else
        menu.show().animate left: 0
        toggle.animate left: 222 - 30, -> $(@).addClass('open')

    ion.sound
      sounds: [
        {name: "bell_ring", volume: 0.8}
        {name: "water_droplet"}
        {name: "water_droplet_3"}
      ]
      path: "/sounds/"
      preload: true
