presentazione-papero/js/reveal.min.js

8 lines
13 KiB
JavaScript
Raw Normal View History

2012-08-07 07:27:22 +02:00
/*!
* reveal.js 2.1 r35
2012-08-07 07:27:22 +02:00
* http://lab.hakim.se/reveal-js
* MIT licensed
*
2012-08-07 07:27:22 +02:00
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/var Reveal=function(){function m(e){if(!c&&!l){document.body.setAttribute("class","no-transforms");return}T(n,e);y();b()}function g(){f.theme=document.querySelector("#theme");f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&n.progress){var e=document.createElement("div");e.classList.add("progress");e.innerHTML="<span></span>";f.wrapper.appendChild(e)}if(!f.wrapper.querySelector(".controls")&&n.controls){var t=document.createElement("aside");t.classList.add("controls");t.innerHTML='<div class="left"></div><div class="right"></div><div class="up"></div><div class="down"></div>';f.wrapper.appendChild(t)}if(!f.wrapper.querySelector(".state-background")){var r=document.createElement("div");r.classList.add("state-background");f.wrapper.appendChild(r)}if(!f.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay");f.wrapper.appendChild(i)}f.progress=document.querySelector(".reveal .progress");f.progressbar=document.querySelector(".reveal .progress span");if(n.controls){f.controls=document.querySelector(".reveal .controls");f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight=document.querySelector(".reveal .controls .right");f.controlsUp=document.querySelector(".reveal .controls .up");f.controlsDown=document.querySelector(".reveal .controls .down")}}function y(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";document.body.style.height="120%";window.addEventListener("load",k,!1);window.addEventListener("orientationchange",k,!1)}}function b(){function o(){head.js.apply(null,t);w()}var e=[],t=[];for(var r=0,i=n.dependencies.length;r<i;r++){var s=n.dependencies[r];if(!s.condition||s.condition()){s.async?t.push(s.src):e.push(s.src);typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],s.callback)}}if(e.length){head.ready(o);head.js.apply(null,e)}else o()}function w(){g();S();E();z();J();L("ready",{indexh:i,indexv:s,currentSlide:u})}function E(){l===!1&&(n.transition="linear");n.controls&&f.controls&&(f.controls.style.display="block");n.progress&&f.progress&&(f.progress.style.display="block");n.transition!=="default"&&f.wrapper.classList.add(n.transition);if(n.mouseWheel){document.addEventListener("DOMMouseScroll",st,!1);document.addEventListener("mousewheel",st,!1)}n.rollingLinks&&A();if(n.theme&&f.theme){var e=f.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,r=e.match(t)[0];if(n.theme!==r){e=e.replace(t,n.theme);f.theme.setAttribute("href",e)}}}function S(){document.addEventListener("touchstart",nt,!1);document.addEventListener("touchmove",rt,!1);document.addEventListener("touchend",it,!1);window.addEventListener("hashchange",ut,!1);n.keyboard&&document.addEventListener("keydown",tt,!1);n.progress&&f.progress&&f.progress.addEventListener("click",C(ot),!1);if(n.controls&&f.controls){f.controlsLeft.addEventListener("click",C(K),!1);f.controlsRight.addEventListener("click",C(Q),!1);f.controlsUp.addEventListener("click",C(G),!1);f.controlsDown.addEventListener("click",C(Y),!1)}}function x(){document.removeEventListener("keydown",tt,!1);document.removeEventListener("touchstart",nt,!1);document.removeEventListener("touchmove",rt,!1);document.removeEventListener("touchend",it,!1);window.removeEventListener("hashchange",ut,!1);n.progress&&f.progress&&f.progress.removeEventListener("click",C(ot),!1);if(n.controls&&f.controls){f.controlsLeft.removeEventListener("click",C(K),!1);f.controlsRight.removeEventListener("click",C(Q),!1);f.controlsUp.removeEventListener("click",C(G),!1);f.controlsDown.removeEventListener("click",C(Y),!1)}}function T(e,t){for(var n in t)e[n]=t[n]}function N(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function C(e){return function(t){t.preventDefault();e.call(null,t)}}function k(){setTimeout(function(){window.scrollTo(0,1)},0)}function L(e,t){var n=document.createEvent("HTMLEvents",1,2);n.initEvent(e,!0,!0);T(n,t);f.wrapper.dispatchEvent(n)}function A(){if(l&&!("msPerspective"in document.body.style)