(function(){var tm={};var temp={};/*@cc_on tm.ie=true;@*/tm.$=function(id){return document.getElementById(id)};var $=tm.$;tm.addListener=function(element,event,func){var handler=function(e){var target=e.target||e.srcElement;var e=e||window.event;e.stop=function(){e.cancelBubble=true;e.returnValue=false;e.stopPropagation&&e.stopPropagation();e.preventDefault&&e.preventDefault()};func.call(tm.ie?target:this,e)};tm.ie?element.attachEvent('on'+event,handler):element.addEventListener(event,handler,false)};tm.time=Date.now||function(){return+new Date};tm.fx=function(f,options){this.options={fps:50,duration:500};this.set=f;if(options){for(var o in options){this.options[o]=options[o]}}};tm.fx.compute=function(from,to,delta){return(to-from)*delta+from};tm.fx.prototype={getTransition:function(){return function(p){return-(Math.cos(Math.PI*p)-1)/2}},step:function(){var time=tm.time();if(time=0;i--){items[i]=pieces[i].href.replace(/^(.+)?#/,'')};var checksizes=function(){for(var i=0,l=items.length;i0)&&(scroller.offsets[items[i]]=scroller.offsets[items[i-1]]+$('tm-'+items[i-1]).offsetHeight)}};var scroller={init:function(items){this.offsets={};this.offsets[items[0]]=0;for(var i=0,l=items.length;i0)&&(this.offsets[items[i]]=this.offsets[items[i-1]]+$('tm-'+items[i-1]).offsetHeight)};var _this=this;this.mover=$('mover');this.content=$('content');var _mover=this.mover;this.fx=new tm.fx(function(value){_mover.style.top=value+'px'},{'onComplete':function(){var partHeight=$('tm-'+_this.lastId).offsetHeight-960;_this.content.style.height=(partHeight>_this.windowHeight?partHeight:_this.windowHeight)+'px'}});var windowHeight=window.innerHeight||document.documentElement.clientHeight;(windowHeight==0)&&(windowHeight=document.body.clientHeight);this.windowHeight=windowHeight;this.content.style.height=windowHeight+'px';return this},moveTo:function(id,force){!force&&checksizes();window.location.href=window.location.href.replace(/#(.+)?$/,'')+'#'+id;if(!force&&(this.lastId==id)){return false}this.lastId=id;var initial=parseInt(this.mover.style.top,10);isNaN(initial)&&(initial=0);!force?this.fx.start(initial,-this.offsets[id]):(this.mover.style.top=-this.offsets[id]+'px')}};var menu={init:function(){this.menu=$('menu');var items=this.menu.getElementsByTagName('a');var pieces=[];this.dots={};for(var i=items.length-1;i>=0;i--){var a=items[i];var id=a.href.replace(/^(.+)?#/,'');a=a.parentNode;var p=a.parentNode.parentNode;(p.tagName.toLowerCase()!='li')&&(p=null);pieces[i]=id;this.dots[id]={a:a,p:p}}items=null;this.active='about';this.changeTo(current);scroller.init(pieces).moveTo(current)},changeTo:function(target){var highlight=this.dots[target];if(!highlight||(target==this.active)){return false}if(this.active){var active=this.dots[this.active];active.a.className='';active.p&&(active.p.className='')}highlight.a.className='active';highlight.p&&(highlight.p.className='parent');this.active=target}};menu.init();var anchorClick=function(e){e.stop();var target=this.href.replace(/^(.+)?#/,'');scroller.moveTo(target);menu.changeTo(target)};for(var i=document.links.length-1;i>=0;i--){var a=document.links[i];(a.href.indexOf('#')!=-1)&&tm.addListener(a,'click',anchorClick)}tm.addListener(window,'resize',function(){checksizes();scroller.moveTo(menu.active,true)});window.scroller=scroller})();