title: colorbox-rails doesn't work work until I refresh the page
body: <p>I installed colorbox-rails gem for a Rails 4 project. Everything seems to work but only after I refresh the page.</p>
  
  <p><strong>Installation</strong></p>
  
  <ul>
  <li>included gem in Gemfile</li>
  <li>*= require colorbox-rails (css)</li>
  <li>//= require colorbox-rails (.js)</li>
  </ul>
  
  <p><strong>Code</strong></p>
  
  <p>&lt;%= link_to image_tag(photo.image.url, class: 'img-thumbnail'), photo.image.remote_url, rel: 'gallery', :data => { :colorbox_static => true, colorbox_photo: true}, target: '_blank' %></li></p>