     e.stopPropagation()
     button = $(e.target).closest('button')
     item = @idToItem[button.data('item-id')]
-    affordable = item.affordable
+    gemsOwned = me.gems()
+    cost = item.get('gems') ? 0
+    affordable = cost <= gemsOwned
     if not affordable
       @playSound 'menu-button-click'
       @askToBuyGems button unless features.freeOnly

    if Level.levels['defense-of-plainswood'] not in earnedLevels
      @$el.find('#misc-tab').hide()
      @$el.find('#hero-type-select #warrior').click()  # Start on warrior tab, if low level.

  onHidden: ->
    super()


      #- ...then rerender key bits
      @renderSelectors(".item[data-item-id='#{item.id}']", "#gems-count")
      console.log('render selectors', ".item[data-item-id='#{item.id}']", "#gems-count")
      @itemDetailsView.render()
      @showVisibleItemImages()

      Backbone.Mediator.publish 'store:item-purchased', item: item, itemSlug: item.get('slug')
    else
