 
 
   prev: () ->
+    @$elements.hide()
+    previous = @curPos - 2
+    previous = @maxPos if previous == -1
+    previous = @maxPos - 1  if previous == -2
+
+    $(@$elements[previous]).show().css('display', 'table-cell')
+
     @curPos -= 1
     if @curPos < 0
       @curPos = @maxPos
-
-    @$elements.hide()
-    $(@$elements[@curPos]).show().css('display', 'table-cell')
 
   stopLoop: () ->
     clearInterval(@handle)

      @$nextWidgetNameTemplate = $("<widget-name-template>Next widget: $nextName in </widget-name-template>")
    @$nextWidgetNameContainer = $("<span id='dc-wid-switcher-next-name'></span>")
    @$countdown = $("<span id='dc-wid-switcher-countdown'></span>")
    @$manualSwitcher = $("<span id='dc-wid-switcher-next' class='fa fa-forward'></span>").
      html(@arrowContent).
      click () =>
        @resetCountdown()

  isRunning: () =>
    @$switcherStopper.hasClass('fa-pause')

  resetCountdown: (next=true) ->
    # Get time from form
    newTime = @interval
    if newTime > 0
      @currentTime = newTime

    if next
      @widgetSwitcher.next()
    else
      @widgetSwitcher.prev();
    # Stop and reset timer
    @$timer.stop().play(true)

