(function(e,f){var g=(function(){var c=e.createElement('dummy').style,prefixes='Webkit Moz O ms Khtml'.split(' '),memory={};return function(a){if(typeof memory[a]==="undefined"){var b=a.charAt(0).toUpperCase()+a.substr(1),w=(a+' '+prefixes.join(b+' ')+b).split(' ');memory[a]=null;for(var i in w){if(c[w[i]]!==undefined){memory[a]=w[i];break}}}return memory[a]}})();var h=function(a){return[].slice.call(a)};var j=function(a,b){var c,pkey;for(c in b){if(b.hasOwnProperty(c)){pkey=g(c);if(pkey!=null){a.style[pkey]=b[c]}}}return a}var $=function(a,b){b=b||e;return b.querySelector(a)};var k=function(a,b){b=b||e;return h(b.querySelectorAll(a))};var l=function(t){return" translate3d("+t.x+"px,"+t.y+"px,"+t.z+"px) "};var m=function(r,a){var b=" rotateX("+r.x+"deg) ",rY=" rotateY("+r.y+"deg) ",rZ=" rotatez("+r.z+"deg) ";return a?rZ+rY+b:b+rY+rZ};var n=function(s){return" scaleX("+s.x+") scaleY("+s.y+") scaleZ("+s.z+") "}var o=navigator.userAgent.toLowerCase();var p=(g("perspective")!=null)&&(o.search(/(iphone)|(ipod)|(ipad)|(android)/)==-1);var q=e.getElementById("impress");if(!p){q.className="impress-not-supported";return}else{q.className=""}var u=e.createElement("div");u.className="canvas";h(q.childNodes).forEach(function(a){u.appendChild(a)});q.appendChild(u);var v=k(".step",q);e.documentElement.style.height="100%";j(e.body,{height:"100%",overflow:"hidden"});var w={position:"absolute",transformOrigin:"top left",transition:"all 1s ease-in-out",transformStyle:"preserve-3d"}j(q,w);j(q,{top:"50%",left:"50%",perspective:"1000px"});j(u,w);var x={translate:{x:0,y:0,z:0},rotate:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}};v.forEach(function(a,b){var c=a.dataset,step={translate:{x:c.x||0,y:c.y||0,z:c.z||0},rotate:{x:c.rotateX||0,y:c.rotateY||0,z:c.rotateZ||c.rotate||0},scale:{x:c.scaleX||c.scale||1,y:c.scaleY||c.scale||1,z:c.scaleZ||1}};a.stepData=step;if(!a.id){a.id="step-"+b}j(a,{position:"absolute",transform:"translate(-50%,-50%)"+l(step.translate)+m(step.rotate)+n(step.scale),transformStyle:"preserve-3d"})});var y=function(a){var b=a.stepData;if($(".step.active",q)){$(".step.active",q).classList.remove("active")}a.classList.add("active");q.className="step-"+a.id;var c={rotate:{x:-parseInt(b.rotate.x,10),y:-parseInt(b.rotate.y,10),z:-parseInt(b.rotate.z,10),},scale:{x:1/parseFloat(b.scale.x),y:1/parseFloat(b.scale.y),z:1/parseFloat(b.scale.z),},translate:{x:-b.translate.x,y:-b.translate.y,z:-b.translate.z}};var d=c.scale.x>=x.scale.x;j(q,{transform:n(c.scale),transitionDelay:(d?"500ms":"0ms")});j(u,{transform:m(c.rotate,true)+l(c.translate),transitionDelay:(d?"0ms":"500ms")});x=c}e.addEventListener("keydown",function(a){if(a.keyCode==9||a.keyCode==32||(a.keyCode>=37&&a.keyCode<=40)){var b=$(".step.active",q);var c=b;switch(a.keyCode){case 37:;case 38:c=v.indexOf(b)-1;c=c>=0?v[c]:v[v.length-1];break;case 9:;case 32:;case 39:;case 40:c=v.indexOf(b)+1;c=c<v.length?v[c]:v[0];break}y(c);a.preventDefault()}},false);f.addEventListener("scroll",function(a){f.scrollTo(0,0)},false);y(v[0])})(document,window);