<% if Rails.env.production? %>
window.fbAsyncInit = ->
  FB.init
    appId: '653729178057509'
    xfbml: true
    version: 'v2.1'

((d, s, id) ->
  js = undefined
  fjs = d.getElementsByTagName(s)[0]
  return if d.getElementById(id)
  js = d.createElement(s)
  js.id = id
  js.src = '//connect.facebook.net/en_US/sdk.js'
  fjs.parentNode.insertBefore js, fjs
) document, 'script', 'facebook-jssdk'
<% end %>
