/*global Reveal, hljs */
/* handles URL query, initialize Reveal and $.sample */
(function($, undefined){
  "use strict";

  // Find slide id
  var slideId = location.search.replace('?',''),
      $targetSlide,
      $targetSlideParent;

  if(slideId && $('section#'+slideId)){
    $targetSlide = $('section#'+slideId);
    $targetSlideParent = $targetSlide.parent();
    slideId = $.inArray($targetSlide.get(0), $targetSlideParent.children());

    // vertical slide
    if($targetSlideParent.is('section')){
      location.hash = '#/' + $.inArray($targetSlideParent.get(0),
                                       $targetSlideParent.parent().children()) + '/' + slideId;
    }else{ // normal horizontal slide
      location.hash = '#/' + slideId;
    }

    location.search = ''; // clear search
  }


  // initialize Reveal
  Reveal.initialize({
    // Display controls in the bottom right corner
    controls: true,

    // Display a presentation progress bar
    progress: true,

    // If true; each slide will be pushed to the browser history
    history: true,

    // Flags if mouse wheel navigation should be enabled
    mouseWheel: true,

    // Apply a 3D roll to links on hover
    rollingLinks: true,

    // UI style
    theme: 'default', // default/neon

    // Transition style
    transition: 'default', // default/cube/page/concave/linear(2d)

    update: function(indexh, indexv){
      // update sample code so that 'height' of iframe is correct
      $('section.present').not('.stack').find('script[type="text/x-sample"]').sample('update');
    }
  });

}(jQuery));
@@ -1304,33 +1304,32 @@
 ition: 'default'
-,
  // default/cube
@@ -1356,215 +1356,8 @@
 (2d)
-%0A%0A    update: function(indexh, indexv)%7B%0A      // update sample code so that 'height' of iframe is correct%0A      $('section.present').not('.stack').find('script%5Btype=%22text/x-sample%22%5D').sample('update');%0A    %7D
 %0A  %7D

remove sample.js dependency