       return
 
     _reLayoutItems: (delay=0) ->
-      clearTimeout @_layoutTimeout if @_layoutTimeout?
+      clearTimeout @_layoutTimeout
       @_layoutTimeout = setTimeout =>
         key = @attr 'original-position'
         @$items.css 

      return

    toggleItemFocus: ($item, focused, delay) ->
      $item.toggleClass @classNames.focused, focused
      clearTimeout @_dimTimeout if @_dimTimeout?
      @_dimTimeout = setTimeout =>
        return unless focused is $item.hasClass(@classNames.focused)
        @$el.toggleClass @classNames.dimmed, focused

    toggleItemExpansion: ($item, expanded) ->
      expanded ?= not $item.hasClass @classNames.expanded
      if expanded
        @toggleItemExpansion @$expandedItem, off if @$expandedItem? 
        i = $item.index()
        if @_isRightEdgeItem(i) then @_adjustItemToRightEdge $item
        if @_isBottomEdgeItem(i) then @_adjustItemToBottomEdge $item

      $item.addClass @classNames.transitioning
      clearTimeout @_expandTimeout if @_expandTimeout?
