 
   next: (e) ->
     e?.preventDefault()
+    if @active is @$images.length - @increment
+      @active -= @$images.length
 
     @active += @increment
     @moveToActive()


  prev: (e) ->
    e?.preventDefault()

    @active -= @increment
    @moveToActive()

    analytics.track.click 'Previous page in /artists carousel'

module.exports.ArtistsView = class ArtistsView extends Backbone.View
  initialize: (options) ->

  initialize: (options) ->
    @resize = _.debounce @updateValues, 100
    $(window).on 'resize', @resize
    $(document).on 'keyup', (e) => @keyUp(e)

    # Wait for the first image to load before enabling anything
    @$el.imagesLoaded?().progress _.once(@updateValues)
