/*! * reveal.js 2.2 r39 * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se */ var Reveal=(function(){var m=".reveal .slides>section",b=".reveal .slides>section.present>section",U={controls:true,progress:true,history:false,keyboard:true,overview:true,center:false,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},ab=U.autoSlide,n=0,e=0,z,I,ao=[],f={},W="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,o="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,A=0,l=0,E=0,ag={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80}; function j(ap){if((!o&&!W)){document.body.setAttribute("class","no-transforms");return;}u(U,ap);d();Y();}function R(){f.theme=document.querySelector("#theme"); f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&U.progress){var at=document.createElement("div");at.classList.add("progress"); at.innerHTML="";f.wrapper.appendChild(at);}if(!f.wrapper.querySelector(".controls")&&U.controls){var ar=document.createElement("aside");ar.classList.add("controls"); ar.innerHTML='';f.wrapper.appendChild(ar); }if(!f.wrapper.querySelector(".state-background")){var aq=document.createElement("div");aq.classList.add("state-background");f.wrapper.appendChild(aq); }if(!f.wrapper.querySelector(".pause-overlay")){var ap=document.createElement("div");ap.classList.add("pause-overlay");f.wrapper.appendChild(ap);}f.progress=document.querySelector(".reveal .progress"); f.progressbar=document.querySelector(".reveal .progress span");if(U.controls){f.controls=document.querySelector(".reveal .controls");f.controlsLeft=H(document.querySelectorAll(".navigate-left")); f.controlsRight=H(document.querySelectorAll(".navigate-right"));f.controlsUp=H(document.querySelectorAll(".navigate-up"));f.controlsDown=H(document.querySelectorAll(".navigate-down")); f.controlsPrev=H(document.querySelectorAll(".navigate-prev"));f.controlsNext=H(document.querySelectorAll(".navigate-next"));}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll"; document.body.style.height="120%";window.addEventListener("load",ah,false);window.addEventListener("orientationchange",ah,false);}}function Y(){var aq=[],av=[]; for(var ar=0,ap=U.dependencies.length;ar'+at.innerHTML+"";}}}}function S(){if(U.center){var at=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section")); var au=-f.wrapper.offsetHeight/2;for(var ar=0,aq=at.length;ar3?"none":"block"; }aq[av].classList.remove("past");aq[av].classList.remove("present");aq[av].classList.remove("future");if(avay){aq[av].classList.add("future"); }}if(aw.querySelector("section")){aq[av].classList.add("stack");}}aq[ay].classList.add("present");var ar=aq[ay].getAttribute("data-state");if(ar){ao=ao.concat(ar.split(" ")); }var au=aq[ay].getAttribute("data-autoslide");if(au){ab=parseInt(au);}else{ab=U.autoSlide;}}else{ay=0;}return ay;}function t(){if(U.controls&&f.controls){var ap=h(); f.controlsLeft.concat(f.controlsRight).concat(f.controlsUp).concat(f.controlsDown).concat(f.controlsPrev).concat(f.controlsNext).forEach(function(aq){aq.classList.remove("enabled"); });if(ap.left){f.controlsLeft.forEach(function(aq){aq.classList.add("enabled");});}if(ap.right){f.controlsRight.forEach(function(aq){aq.classList.add("enabled"); });}if(ap.up){f.controlsUp.forEach(function(aq){aq.classList.add("enabled");});}if(ap.down){f.controlsDown.forEach(function(aq){aq.classList.add("enabled"); });}if(ap.left||ap.up){f.controlsPrev.forEach(function(aq){aq.classList.add("enabled");});}if(ap.right||ap.down){f.controlsNext.forEach(function(aq){aq.classList.add("enabled"); });}}}function h(){var ap=document.querySelectorAll(m),aq=document.querySelectorAll(b);return{left:n>0,right:n0,down:e0||e>0){ap+=n;}if(e>0){ap+="/"+e;}}window.location.hash=ap;}}function O(ap){var au=n,ar=e;if(ap){var av=!!ap.parentNode.nodeName.match(/section/gi); var at=av?ap.parentNode:ap;var aq=Array.prototype.slice.call(document.querySelectorAll(m));au=Math.max(aq.indexOf(at),0);if(av){ar=Math.max(Array.prototype.slice.call(ap.parentNode.children).indexOf(ap),0); }}return{h:au,v:ar};}function w(){if(document.querySelector(b+".present")){var aq=document.querySelectorAll(b+".present .fragment:not(.visible)");if(aq.length){aq[0].classList.add("visible"); s("fragmentshown",{fragment:aq[0]});return true;}}else{var ap=document.querySelectorAll(m+".present .fragment:not(.visible)");if(ap.length){ap[0].classList.add("visible"); s("fragmentshown",{fragment:ap[0]});return true;}}return false;}function T(){if(document.querySelector(b+".present")){var aq=document.querySelectorAll(b+".present .fragment.visible"); if(aq.length){aq[aq.length-1].classList.remove("visible");s("fragmenthidden",{fragment:aq[aq.length-1]});return true;}}else{var ap=document.querySelectorAll(m+".present .fragment.visible"); if(ap.length){ap[ap.length-1].classList.remove("visible");s("fragmenthidden",{fragment:ap[ap.length-1]});return true;}}return false;}function Q(){clearTimeout(l); if(ab){l=setTimeout(y,ab);}}function C(){if(h().left&&(N()||T()===false)){a(n-1,0);}}function k(){if(h().right&&(N()||w()===false)){a(n+1,0);}}function v(){if(h().up&&(N()||T()===false)){a(n,e-1); }}function G(){if(h().down&&(N()||w()===false)){a(n,e+1);}}function ac(){if(T()===false){if(h().up){v();}else{var ap=document.querySelector(".reveal .slides>section.past:nth-child("+n+")"); if(ap){e=(ap.querySelectorAll("section").length+1)||0;n--;a();}}}}function y(){if(w()===false){h().down?G():k();}Q();}function al(ar){var aq=document.activeElement; var at=!!(document.activeElement&&(document.activeElement.type||document.activeElement.href||document.activeElement.contentEditable!=="inherit"));if(at||ar.shiftKey||ar.altKey||ar.ctrlKey||ar.metaKey){return; }var ap=true;switch(ar.keyCode){case 80:case 33:ac();break;case 78:case 34:y();break;case 72:case 37:C();break;case 76:case 39:k();break;case 75:case 38:v(); break;case 74:case 40:G();break;case 36:a(0);break;case 35:a(Number.MAX_VALUE);break;case 32:N()?ai():y();break;case 13:N()?ai():ap=false;break;case 66:case 190:ad(); break;case 70:af();break;default:ap=false;}if(ap){ar.preventDefault();}else{if(ar.keyCode===27&&W){aa();ar.preventDefault();}}Q();}function B(ap){ag.startX=ap.touches[0].clientX; ag.startY=ap.touches[0].clientY;ag.startCount=ap.touches.length;if(ap.touches.length===2&&U.overview){ag.startSpan=V({x:ap.touches[1].clientX,y:ap.touches[1].clientY},{x:ag.startX,y:ag.startY}); }}function aj(av){if(!ag.handled){var at=av.touches[0].clientX;var ar=av.touches[0].clientY;if(av.touches.length===2&&ag.startCount===2&&U.overview){var au=V({x:av.touches[1].clientX,y:av.touches[1].clientY},{x:ag.startX,y:ag.startY}); if(Math.abs(ag.startSpan-au)>ag.threshold){ag.handled=true;if(auag.threshold&&Math.abs(aq)>Math.abs(ap)){ag.handled=true;C();}else{if(aq<-ag.threshold&&Math.abs(aq)>Math.abs(ap)){ag.handled=true;k();}else{if(ap>ag.threshold){ag.handled=true; v();}else{if(ap<-ag.threshold){ag.handled=true;G();}}}}av.preventDefault();}}}else{if(navigator.userAgent.match(/android/gi)){av.preventDefault();}}}function Z(ap){ag.handled=false; }function p(ap){clearTimeout(A);A=setTimeout(function(){var aq=ap.detail||-ap.wheelDelta;if(aq>0){y();}else{ac();}},100);}function am(aq){var ap=Array.prototype.slice.call(document.querySelectorAll(m)).length; var ar=Math.floor((aq.clientX/f.wrapper.offsetWidth)*ap);a(ar);}function x(ap){L();}function g(ap){S();}function D(ap){if(N()){ap.preventDefault();ai(); n=this.getAttribute("data-index-h");e=this.getAttribute("data-index-v");a();}}return{initialize:j,slide:a,left:C,right:k,up:v,down:G,prev:ac,next:y,prevFragment:T,nextFragment:w,navigateTo:a,navigateLeft:C,navigateRight:k,navigateUp:v,navigateDown:G,navigatePrev:ac,navigateNext:y,toggleOverview:aa,addEventListeners:F,removeEventListeners:X,getIndices:O,getPreviousSlide:function(){return z; },getCurrentSlide:function(){return I;},getQueryHash:function(){var ap={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(aq){ap[aq.split("=").shift()]=aq.split("=").pop(); });return ap;},addEventListener:function(aq,ar,ap){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(aq,ar,ap); }},removeEventListener:function(aq,ar,ap){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(aq,ar,ap); }}};})();