   $(document).foundation()
   ko.applyBindings new ViewModel()
   return
+
+class BoardGame
+  constructor: (data) ->
+    for key,value of data
+      @[key] = value
+    @thumbnail ?= ""
+    @goodComments ?= (comment for comment in @comments.comment when comment.value.length > 119 and parseInt(comment.rating) > 0 and comment.value.length < 600)
+    @featuredComment = ko.observable()
+    @pickFeaturedComment()
+
+  pickFeaturedComment: ->
+      @featuredComment(@goodComments[Math.floor(Math.random() * @goodComments.length)])
+      return
 
 class ViewModel
   constructor: ->

      i++
    return

  goToSearch: ->
    str = encodeURIComponent($("#search").val())
    location.hash = "search/" + str

  # Updates sort direction icons
  # @param type [String] (name,brating)
  # @param event [jQueryEvent]
  updateTableHeaders: (type,event) =>
    $("#results-table thead tr th").removeClass "headerSortUp"
    $("#results-table thead tr th").removeClass "headerSortDown"
    if sortDirection is -1
