 
   # allows user to click on a subject in the lightbox to load that subject into the subject-viewer.
   # This method ultimately sets the state.subject_index in mark/index. See subject-set-viewer#specificSelection() and mark/index#handleViewSubject().
+  # YaleDHLab: This method also updates the pageIndex stored in state, which sets the active class on the currently
+  # active page
   shineSelected: (index)->
     @props.onSubject(index)
+    @setState({pageIndex: index})
 
   # determines the back button css
   backButtonDisable:(indexOfFirst) ->


  getInitialState:->
    first: @props.subject_set.subjects[0]
    folded: false

  handleFoldClick: (e)->

      text = "Show Lightbox"
    else
      text = "Hide Lightbox"


  render: ->
    # window.subjects = @props.subject_set.subjects # pb ?
