 _ = require 'underscore'
 Backbone = require 'backbone'
 imagesLoaded = require 'imagesloaded'
+{ CURRENT_USER } = require('sharify').data
+mediator = require '../../../lib/mediator.coffee'
 
 module.exports = class HeroUnitView extends Backbone.View
+  pauseLength: 8000
+
   events:
     'click #home-hero-units-left-arrow': 'onLeftArrow'
     'click #home-hero-units-right-arrow': 'onRightArrow'
-    'click #home-hero-unit-dots li': 'onDot'
+    'click .hhu-dot': 'onDot'
+    'click .home-hero-unit-welcome .avant-garde-button': 'signUp'
 
   initialize: ->
     @$window = $(window)

        .height($(this).height())
        .attr 'src', $(this).attr('data-retina')

  setInterval: ->
    clearInterval @interval
    @interval = setInterval @nextHeroUnit, 8000

  setBodyClass: =>
    if @$window.scrollTop() + @$mainHeader.height() <= @$heroUnitsContainer.height()

    @$heroUnits = @$('.home-hero-unit')

    @setBodyClass()
    @initInterval()

    @$window.on 'scroll', _.throttle @setBodyClass, 100
    @$window.on 'keyup', (e) => @onKeyUp(e)
