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}});(function(){var h={slideFx:false,slideCurrent:false,timer:false,singupOpen:false};window.addEvent('domready',function(){$('lnksignup').addEvent('click',function(a){signupSlide(this,a,'open')});$('lnksignupclose').addEvent('click',function(a){signupSlide(this,a,'close')});$('container').addEvent('click',function(a){if(h.singupOpen==true){signupSlide(this,false,'close')}});$('frmsignup').addEvent('submit',function(e){validate(this,e)});if($('folio')){h.slideFx=new Fx.Scroll('folio',{wait:false,duration:1000,transition:Fx.Transitions.Quad.easeInOut});h.slideCurrent=$('folioinner').getFirst();h.timer=setInterval(spinIt,10000);$('folio').setStyle('width',window.getSize().x-140);spinIt()}});window.addEvent('resize',function(){if($('folio')){$('folio').setStyle('width',window.getSize().x-140)}});function spinIt(){var a=h.slideCurrent.getNext();var b=h.slideCurrent.getPrevious();if(a){h.slideFx.toElement(a);h.slideCurrent=a}else{var c=$('folioinner').getFirst().getSize().x;var d=$('folioinner').getFirst().getSize().y;h.slideFx.set(c+70,d);h.slideFx.toElement($('item2'));h.slideCurrent=$('item2')}}function signupSlide(a,b,c){if(b){var e=new Event(b).stop()}$('signup').set('tween',{transition:Fx.Transitions.Quad.easeOut,duration:300});if(c=='open'){$('signup').tween('top',[-320,-3]);h.singupOpen=true;$('txtemail').focus()}else{$('signup').tween('top',[-3,-320]);h.singupOpen=false}}function validate(a,b){var e=new Event(b).stop();var c=true;var d=$('txtemail');var f=$('txtfirstname');var g=$('txtlastname');d.removeClass('error');f.removeClass('error');g.removeClass('error');if(d.get('value')==''){d.addClass('error');c=false}if(f.get('value')==''){f.addClass('error');c=false}if(g.get('value')==''){g.addClass('error');c=false}if(c){$('frmsignup').submit()}}})();
