code: func (fic *fileItemContainer) refreshNav() {
  	fic.prev, fic.next = nil, nil
  	fic.current = fic.items[fic.currentIdx]
  	if fic.currentIdx > 0 {
  		fic.prev = fic.items[fic.currentIdx-1]
  	}
  	if fic.currentIdx < len(fic.items)-1 {
  		fic.next = fic.items[fic.currentIdx+1]
  	}
  	fit := fic.current
  
  	// TODO(mpl): make sure the href='javascript:;' trick is ok. Also see if we can't
  	// have a working href as a backup for users with no javascript?
  	navDiv := fmt.Sprintf(`<div id='nav-%s' class='camlifile'></div>`, fit.pn)
  	jQuery(ficDiv).Append(navDiv)
  	if fic.prev != nil {
  		prevNav := `[<a id='prev' href='javascript:;'>prev</a>]`
  		jQuery(fmt.Sprintf("div#nav-%s", fit.pn)).Append(prevNav)
  		jQuery("a#prev").Call(jquery.CLICK, func(e jquery.Event) {
  			theFic.doPrev()
  			go func() {
  				theFic.render()
  			}()
  		})
  	}
  	if fic.next != nil {
  		nextNav := `[<a id='next' href='javascript:;'>next</a>]`
  		jQuery(fmt.Sprintf("div#nav-%s", fit.pn)).Append(nextNav)
  		jQuery("a#next").Call(jquery.CLICK, func(e jquery.Event) {
  			theFic.doNext()
  			go func() {
  				theFic.render()
  			}()
  		})
  	}
  }
docs: // No need for locking because only caller is render.