// back-to-top: unobtrusive global 'back to top' link using mootools 1.2.x copyright (c) 2007-2009 by gonchuki - http://blog.gonchuki.com and Nicolas Sanguinetti - http://nicolassanguinetti.info version: 1.2 released: November 11, 2007 last modified: February 27, 2009 This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License. http://creativecommons.org/licenses/by-sa/3.0/

if(!Browser.Engine.trident4){window.addEvent((Browser.Engine.trident?"load":"domready"),function(){var a=0.64;new Element("span",{id:"back-to-top",styles:{opacity:a,display:"none",position:"fixed",bottom:0,right:0,cursor:"pointer"},text:"back to top",tween:{duration:200,onComplete:function(b){if(b.get("opacity")==0){b.setStyle("display","none")}}},events:{click:function(){if(window.location.hash){window.location.hash="#top"}else{window.scrollTo(0,0)}}}}).inject(document.body);window.addEvent("scroll",function(){var b=window.getScroll().y>(window.getSize().y*0.8);if(b==arguments.callee.prototype.last_state){return}if(Fx&&Fx.Tween){if(b){$("back-to-top").fade("hide").setStyle("display","inline").fade(a)}else{$("back-to-top").fade("out")}}else{$("back-to-top").setStyle("display",(b?"inline":"none"))}arguments.callee.prototype.last_state=b})})};