# Add JavaScript required for your deck.
# Add deck extensions from deck.js/extensions.
#= require highlightjs
#= require deck.js/core/deck.core

$(document).bind 'deck.init', ->
  # Show social buttons after deck is loaded.
  <% if site.config['social'] %>
  $('aside.social-buttons').hide().css('visibility', 'visible').fadeIn()
  $('div.g-plus-container iframe').each ->
    @style.setProperty 'visibility', 'visible', 'important'
  <% end %>

# Load MathJax if enabled.
<% if site.config['mathjax'] then require_asset 'mathjax' end %>

# Initialize the deck.
$.deck '.slide'

# Invoke highlight.js on page load.
$ -> hljs.initHighlighting()

# Add JavaScript required for your deck.
# Add deck extensions from deck.js/extensions.
#= require highlightjs
#= require deck.js/core/deck.core

$(document).bind 'deck.init', ->
  # Show social buttons after deck is loaded.
  <% if site.config['social'] %>
  $('aside.social-buttons').hide().css('visibility', 'visible').fadeIn()
  showGooglePlus = -> $('div.g-plus-container iframe').each ->
    @style.setProperty 'visibility', 'visible', 'important'
  showGooglePlus
  # If the Google +1 button loads after the fist time showGooglePlus runs,
  # run it again some time later to make sure it appears.
  $ -> setTimeout showGooglePlus, 7000
  <% end %>

# Load MathJax if enabled.
<% if site.config['mathjax'] then require_asset 'mathjax' end %>

# Initialize the deck.
$.deck '.slide'

# Invoke highlight.js on page load.
$ -> hljs.initHighlighting()

Fix bug where Google +1 button may fail to appear.
Fix bug where Google +1 button may fail to appear.
