fix double-navigation on touch for some android systems
listen for touch + click on all devices except android
Print-friendly slides with speaker notes.

* Slide is now 2/3 the width of a US letter (landscape orientation).
* Note are printed down the final third of the page.
* Titles, and base text is reduced in size to account for the
  narrower slide width.
- updated/fixed the highlight plugin

- updated grunt tasks to copy material from the submodules into the distribution (so gh-pages, etc. use of RevealJS without you having the submodules initialized as well)
fix series:

- prevent crashes when loading an empty presentation (zero slides): currentSlide *can* be NULL!

- Reveal events *may* be registered before Reveal has properly initialized itself and the DOM; these registrations are now queued and executed once Reveal starts firing events (such as the 'ready' event)

- several tweaks & tugs to make the RequireJS load environment work for us without a hitch.

- unify the 'can I use CSS3 zooming?' approach: now we use the `useZoomFallback` detection flag everywhere.

- define all important RevealJS selector specifications as all-capitals constants near the top of the file; since we have made a few changes the old approach where you can add extra DOM query selector string chunks to a constant is now obsolete and will cause bugs. Example: any selector which uses/used the `SLIDES_SELECTOR` constant.

- JSHint/JSLint happiness (single-quoted strings)

- Because we target RevealJS at 'complex presentations' we *might* not want to have invisible slides still 'active' in the regular view: those slides become display:none only when you have set `viewDistance` to zero, which is now the default. We are aware of the side-effect during slide transition as the comment in the code says:

  > Number of slides away from the current that are visible (the minimum is 1 IFF we want the slide animations to show both the old and the new slide during transitions)

- as the DOM, a plugin or any other mandatory component *may* not be ready yet by the time load/start is invoked, we have to reckon with the fact that start() *may* fail; before, we left this to the user code, but since 'fixing' this is a recurring and required pattern, it is now included in RevealJS itself to provide a reliable interface once again: start() is invoked repeatedly through a timer (as we cannot precisely predict when all the mandatory start conditions are met) until it succeeds. This change ensures that RevealJS will fire the 'ready' event when it has successfully completed its initializzation phase. It also means that you will receive the 'ready' event after the page itself is DomReady, as the RevealJS events themselves require a 'ready' DOM.

- tweak: RevealJS listed plugins/dependencies (in its options object) now can have their `.condition` attribute set to a truthy value (which will be interpreted as simply meaning 'yes, go on!') or a function (which will be executed and is expected to return a truthy value if RevealJS is supposed to continue initializing the plugin)

- updateBackground() now always considers all the slides' backgrounds. The previous approach was causing trouble in that backgrounds did not get updated in time under spurious conditions.

- upgraded the code for getStyle() so it will produce the currently active CSS style requested.

- getComputedSlideSize() and getViewportAndSlideDimensionsInfo() were almost identical; now everything has been integrated into getViewportAndSlideDimensionsInfo() which will deliver info about both the viewport and the slide (as configured).  Note that, as before, getAbsoluteHeight(), now named getAbsoluteSize(), is the function to call when you need to know the raw, actual slide dimensions rather than the slide width/height as specified in the options/configuration.

- getAbsoluteHeight() has been renamed and augmented to become getAbsoluteSize() which calculates the actual raw slide width and height; info which is required to properly scale each slide before it is displayed. This fixes a major scaling bug that still existed in the previous revision. (The bug may be due because this clone deviates considerably from the original @hakimel work in some aspects)

- Tweaked the hash for the background settings, separating the individual components so you cannot ever get an identical hash for two different background setup sets.

- fix setup of background image/video.

- if you need to know the number of slides, always use the function `getTotalSlides()`. This one counts both horizontal and vertical slides and correctly 'subtracts' the wrapper 'slides' around the vertical 'stacks'. (Note that we do include vertical slides in the progress bar, for example, so there's more places we need the *real* total-number-of-slides than the original would.

- getAbsoluteSize(), n\'ee getAbsoluteHeight() has an adjusted scheme to calculate the width/height of the area occupied by the specified DOM tree, where it attempts to account for both 'position:absolute' and other elements positioned (partly) *outside* the parent rect, while ignoring 'position:fixed' DOM elements in the tree as those do not contribute a sane offsetX/Y next to their width/height.

- major change: layout() requires the `currentSlide` to point at the correct DOM element (or be NULL where there is none) for we need to calculate the *raw, actual* dimensions of this slide before displaying it: this *raw actual surface size* determines, next to the *configured slide dimensions*, the scale/zoom factor at which the slide will be shown on screen. It is a 'major change' as this requirement implies that we had to move the layout() call and its dependents around in the code; some RevealJS events (the 'state' event series) will now be fired *before* the new 'currentSlide' slide will have been rendered/scaled on screen; though the 'slidechanged' event still is fired *after* the slide has been scaled/rendered on screen.

- make sure DOM nodeNames always are what they're supposed to be in the checks, hence case-insensitive, entire-name-only tag name matching.

- moved the flexbox-vs-javascript-centering code chunk into the slot where it should've been all along: only execute this code in the overview mode, as that is the only mode which needs this, at least in the way it's done in this code chunk.

- introducing the internal function prepSlideHierarchy() which helps us to ensure that we have properly initialized slides (and slide *stacks*) after start() or sync(), i.e. it helps us to ensure the slides and stacks are correctly marked, even when we dynamically update the slide set and re-`sync()` RevealJS.

- updateBackground() now always corrects the slides' background classes so that those elements are always up-to-date regarding who currently is the 'active' slide. Previously the code did not this which would cause glitches and mispresentations of the background(s) available in the deck. `getSlideBackground()` has been adjusted accordingly.

- tweaked the progress indicator to correctly account for possible fragments in the presentation, also when that presentation spans only a ingle slide.

- tweak: the '?' key doesn't necessarily sit under a *shifted* key on every international keyboard.

- tweaked the NProgress code to correct (and significantly shorten!) the period of time during initial page load when the deck is obscured behind the NProgress loader progress overlay, giving a much 'faster' load experience.

- cleaned up the example code in index.html to prevent unwanted globals by using a closure.

- as it says on the tin in the CSS file:
  Hide a lot of content in each page in overview mode to clean it up: make the view more readable / less cluttered. This assumes the slide headings are encoded in \<H1>, etc.

- CSS fix: removing z-index ensures that the search plugin always shows up on top of the slide content like it should.

- FEATURE: when a slide has the `data-scrollable` attribute, it will be considered a 'very long slide' which *may probably* require a scrollbar: such slides are not scaled to fit the viewport both vertically and horizontally. Note that this deviates from the usual 'deck/slide' concept which never has scrollable content, but enables one to provide a more web-oriented approach towards mixing classical decks and 'largish chunks of content' in a single presentation. In essence, here is where we step across the borders set by classical deck presentation tools (Powerpoint et al).
- prepSlideHierarchy() now includes the code to properly initialize all the slide fragments.

- getIndices() API now accepts an arbitrary HTMLElement (DOM node): it may be a slide or a child node of a slide, in which case the slide is discovered.

- getIndices() API now also returns the fragment index when a (slide/child) DOM node has been specified as an argument; this allows one to immediately jump to the *fragment* later on:

- the 'search' plugin has been patched (and its Hilitor library) to search for word *fragments* by default, i.e. 'search' input will now match larger words too, e.g. 'example' will now match the 'examples' word anywhere in the deck.

- the 'search' plugin has been adjusted to jump to the fragment where the match was found; when matches are found in multiple fragments in the same slide, repeated searches will visit each fragment one after another.

- the 'search' plugin has been tweaked to stay on the current slide if a match for the searched word(s) was found in the slide. The search jumps will then start from the current slide instead of starting at slide 0 (= first slide in the deck).
search plugin: by default, start at the current slide if there's a match at or beyond...
bugfix (due to overlooking the minimal difference between a local var name and a closure (outer scope) var name >:-((  -- also tweaked the code make the transfer from local to closure/outer scope more obvious. (The effect of the bug was that you wouldn't stay in the same slide when the new search matches a fragment which is already visible (because the current 'position' is at a *later* fragment in the same slide).
- layout is botched in that scaling is not correct; previous revision scaling was sometimes bad (to much zoom, i.e. very small slide) when ESC-aping out of overview mode. Previous revisions also exhibited jumping/oddities in the slide animations as the scale would change per slide at dom.slides level, which is a no-go if you want smooth animations.

- synced up the jolicode index page.

- only allow scrollbars to show up when we actually have a 'scrollable' page in sight; hence not in overview mode or while looking at any other individual slide!
- fixed the overview crap-up; in the end it turned out to be a bloody z-index for the 'present' class  >:-(

- fix: reset wrapper scale for single sheet view *before* we calculate the actual slide dimensions
tweaking the init phase; updating the examples. KNOWN BROKEN math plugin.
- fixed per-slide background transitions: as all past+future backgrounds were effectively hidden (display: none), we added logic to tag the previous and next slide with a special class: `past-1` or `future-1`, next to their regular `past` or `future` class, so that the CSS can display:block them at least for the duration of the transition animation.

- cleaned out the font loads from the main example index page: placed the fonts in the CSS files that need them.

- fixed the overview mode crappy rendering (last slide very large, etc.etc.): we do NOT use 'depth' anymore but simply always scale the content down to fit the desired number of slides in the overview; we also augmented the CSS to prevent nasty scrollbars around tiny content to disappear in the overview mode (e.g. code chunks, scrollable slides, ...)

- nuked the transitions timing as we needed to debug them, so all transitions are very slow (2-6 seconds) now.

- separated out the init/page start driver code as every presentation will need this tiny piece of logic, so better to load as a script file in the body; load-optimized presentations can always go and merge nprogress.js and this code, as that combination must be loaded before we show anything

- the page is completely blank unless JavaScript runs: then the init/load code will turn on 'display:block' for the body, AFTER NProgress has placed its own loader overlay. Never a flash of unformatted content ;-)

- search plugin: trimmed the search plugin's search icon (not used yet)

- search plugin: corrected the CSS positioning of the search icon for its current size (24x24px); this must be corrected again when we go and use the smaller icon (or use a custom icon font instead)
updated nprogress submodule
- restrict all transitions to 3 seconds or less (we're debugging them still, so this is just hacking)

- fix background transitions: we should only keep the background for the present slide, the old one should fade away. That's what future-1 and past-1 were planned for anyway.

- redone the layout logic; now it bluntly always lays out the entire slide set and then hides the ones we don't want to see yet.  This should help us improve the layout/render process in view of transitions: now we have cleaned up the mess we made of layout() and can go and separate out the phases: CSS tweaks before measurements done (which will therefor happen instantaneous) and CSS adjustments that should benefit from transitions, i.e. which should be queued until all layout DOM measurements are done (as getComputedStyle() measurements will instant-render the DOM)

- removed the contenteditables from the demo deck; they're obnoxious and we know by now that they can work

- simplified overview mode: true/false: the different modes had become all the same and were in there for testing various setups only anyway: now we have a proper working overview layout.

- moved the updateSlidesVisibility() call into layout as it belongs there; it is now a one-stop shop for all layout bits, so that cleans up a bit of the rest of the RevealJS code too

- viewDisance is back to what is was meant for: the overview mode. The regular mode has its own hardcoded distance check, which is all we'll ver need; the optimizations is rather going to happen in the delayed hiding of prev/next sibling slides and/or the better anticipation where a slide will be moving *to*: we're not only interested in the 'previousSlide' but for good transitions we're also interested to know who is the 'futureSlide'.

- options::transitionMaxDuration is a new option which should be set to the maximum number of milleseconds any slide transition is bound to take: we cannot determine this number easily at run-time through the code as the transition CSS rules can be pretty complex/nasty to grab, so we leave it to the user code. The fewer DOM chunks the browser has to render, the better. Even if we have to wait for a few seconds for the reduction to happen.

- made the kickstarter an external API so that user code can properly kickstart the initialize() API like it should; this is also mirrorred in the sample code.

- getStyle() has been extended to support the regular CSS3 standard style and if that one does deliver and the invoker knows the browser-specific version might be around, then that one is grabbed as a fallback; we only do this when he invoker code calls for it as it visits the DOM/CSS twice!

- getAbsoluteSize() is now better named and in line with vanilla RevealJS: getComputedSlideSize()

- merged in and adapted the new touch conditional code: the augment is that we only install the touch handlers when the configuration calls for them.

- all tranformations are now assumes to happen at origin 50%/50%: all of them already did so for a while, but now we have gone and simplified the code again.

- the slide zoom has now it's own refactored scaleElement() helper.

- layout() should at some in the future also facilitate the PDF printing process: after all that one is mostly styling and just printing the variable-sized slides one after another, so it's kind of a second 'overview mode', really....

- activateOverview/deactivateOverview now only excute when there's actually something to do (switch modes or re-render the overview mode because the user somehow changed the overview viewDistance parameter?)

- another cleanup/refactor result: resetSlideStacks(), which was also needed by restart()
fixed the prev/next sibling delayed hiding code: it now works and is again simpler, thanks to the last changes to the CSS for past-1/future-1 in the previous commit
no need for those previous-index-h/v values any more: they were only used in an older attempt to cut down the number of visible backgrounds during transitions. PRevious edit fixes that finally.
work on overview; ...
correcting centering of scaled slides - now done correctly: the 50/50% origin is the original scale=1 slide so scaling will inherently shift the origin as we also adjust the width/height and those two are top/left based, all the time, so we need to translate the scaled (and now also *bigger-as-in-original-pixels*) slide to center it properly.
fixed the overview and transform application code again.
fixed path calculation for CSS files in /css/