   listenForInvert()
   listenForBounce()
   confirmation.check()
-  setupAnalytics()
   disableRightClick()
 
 ensureFreshUser = (data) ->

          url: '/users/sign_out'
          complete: ->
            window.location.reload()

setupAnalytics = ->
  window.analytics?.ready ->
    analytics(mixpanel: (mixpanel ? null), ga: ga)
    analytics.registerCurrentUser()
  # Log a visit once per session
  unless Cookies.get('active_session')?
    Cookies.set 'active_session', true
    mediator.trigger 'session:start'
    analytics.track.funnel if sd.CURRENT_USER
      'Visited logged in'
    else
      'Visited logged out'

setupReferrerTracking = ->
  # Live, document.referrer always exists, but let's check

imagesLoaded = require 'imagesloaded'
sd = require('sharify').data
mediator = require './mediator.coffee'
templateModules = require './template_modules.coffee'
setupAuctionReminder = require '../components/auction_reminders/index.coffee'
setupSplitTests = require '../components/split_test/setup.coffee'
