//MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License.
MooTools.More={version:"1.2.4.4",build:"6f6057dc645fdb7547689183b2311063bd653ddf"};Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(b,a){this.element=this.subject=document.id(b);
this.parent(a);var d=this.cancel.bind(this,false);if($type(this.element)!="element"){this.element=document.id(this.element.getDocument().body);}var c=this.element;
if(this.options.wheelStops){this.addEvent("start",function(){c.addEvent("mousewheel",d);},true);this.addEvent("complete",function(){c.removeEvent("mousewheel",d);
},true);}},set:function(){var a=Array.flatten(arguments);if(Browser.Engine.gecko){a=[Math.round(a[0]),Math.round(a[1])];}this.element.scrollTo(a[0],a[1]);
},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(c,g){if(!this.check(c,g)){return this;}var e=this.element.getScrollSize(),b=this.element.getScroll(),d={x:c,y:g};
for(var f in d){var a=e[f];if($chk(d[f])){d[f]=($type(d[f])=="number")?d[f]:a;}else{d[f]=b[f];}d[f]+=this.options.offset[f];}return this.parent([b.x,b.y],[d.x,d.y]);
},toTop:function(){return this.start(false,0);},toLeft:function(){return this.start(0,false);},toRight:function(){return this.start("right",false);},toBottom:function(){return this.start(false,"bottom");
},toElement:function(b){var a=document.id(b).getPosition(this.element);return this.start(a.x,a.y);},scrollIntoView:function(c,e,d){e=e?$splat(e):["x","y"];
var h={};c=document.id(c);var f=c.getPosition(this.element);var i=c.getSize();var g=this.element.getScroll();var a=this.element.getSize();var b={x:f.x+i.x,y:f.y+i.y};
["x","y"].each(function(j){if(e.contains(j)){if(b[j]>g[j]+a[j]){h[j]=b[j]-a[j];}if(f[j]<g[j]){h[j]=f[j];}}if(h[j]==null){h[j]=g[j];}if(d&&d[j]){h[j]=h[j]+d[j];
}},this);if(h.x!=g.x||h.y!=g.y){this.start(h.x,h.y);}return this;},scrollToCenter:function(c,e,d){e=e?$splat(e):["x","y"];c=$(c);var h={},f=c.getPosition(this.element),i=c.getSize(),g=this.element.getScroll(),a=this.element.getSize(),b={x:f.x+i.x,y:f.y+i.y};
["x","y"].each(function(j){if(e.contains(j)){h[j]=f[j]-(a[j]-i[j])/2;}if(h[j]==null){h[j]=g[j];}if(d&&d[j]){h[j]=h[j]+d[j];}},this);if(h.x!=g.x||h.y!=g.y){this.start(h.x,h.y);
}return this;}});

// QTabs for Mootools 1.2 V 1.0.0 Copyright (C) 2008 Massimo Giagnoni. All rights reserved. < http://www.latenight-coding.com >
var QTabs=new Class({options:{flexHeight:false,def_tab:0,autoplay:0,scrolling:0,delay:3000,duration:500,transition:'Quad',easing:'easeInOut',onActive:function(container,idx){var content=this.tcontents[idx];var s=container.getSize();var cw=s.x;if(this.options.flexHeight){s=content.getSize();container.setStyle('height',s.y+'px');}
var d=(this.curTab>=0?this.options.duration:1);var sdir=this.options.scrolling;if(sdir=='a'){if(idx>this.curTab){sdir='lr';}else{sdir='rl';}}
var lft=[0,0];switch(sdir){case'lr':lft=[-cw,0];break;case'rl':lft=[cw,0];break;}
this.fxOn=true;if(this.options.transition=='linear'){var t=Fx.Transitions[this.options.transition];}else{var t=Fx.Transitions[this.options.transition][this.options.easing];}
content.set('morph',{duration:d,transition:t});content.morph({top:[0,0],left:lft,opacity:[1,1]});this.fxEnd.delay(d,this);this.tabs[idx].addClass('open').removeClass('closed');},onBackground:function(tab,content){content.setStyle('display','none');tab.addClass('closed').removeClass('open');}},initialize:function(m_id,options){this.setOptions(options);this.tabs=$('qtabs-'+m_id).getElements('li')
this.container=$('current-'+m_id);this.tcontents=this.container.getElements('div.qtcontent');for(var i=0,l=this.tabs.length;i<l;i++){var tab=this.tabs[i];tab.addEvent('click',this.display.bind(this,i));tab.addEvent('mouseenter',this.mouseEnter.bind(this,i));tab.addEvent('mouseleave',this.mouseLeave.bind(this,i));}
this.curTab=-1;this.display(this.options.def_tab);},display:function(i){if(i<0||i>=this.tabs.length){i=0;}
if(this.curTab==i||this.fxOn){return;}
$clear(this.timer);for(var c=0,l=this.tabs.length;c<l;c++){if(c!=i){this.tabs[c].addClass('closed').removeClass('open');}
this.tcontents[c].setStyle('opacity', 0);}
this.fireEvent('onActive',[this.container,i]);this.curTab=i;},mouseEnter:function(i){this.tabs[i].addClass('hover');},mouseLeave:function(i){this.tabs[i].removeClass('hover');},fxEnd:function(){this.fxOn=false;if(this.options.autoplay){var i=this.curTab+1;if(i>=this.tcontents.length){i=0;}
this.timer=this.display.delay(this.options.delay,this,i);}}});QTabs.implement(new Events);QTabs.implement(new Options);
