AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(f,e){var d=new AJS.fx.Base();d.elm=AJS.$(f);d.options.duration=600;d.setOptions(e);AJS.update(d,{increase:function(){if(this.now==7){f.style.backgroundColor="#fff"}else{f.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)]}}});return d.custom(6,0)},fadeIn:function(f,e){e=e||{};if(!e.from){e.from=0;AJS.setOpacity(f,0)}if(!e.to){e.to=1}var d=new AJS.fx.Style(f,"opacity",e);return d.custom(e.from,e.to)},fadeOut:function(f,e){e=e||{};if(!e.from){e.from=1}if(!e.to){e.to=0}e.duration=300;var d=new AJS.fx.Style(f,"opacity",e);return d.custom(e.from,e.to)},setWidth:function(f,e){var d=new AJS.fx.Style(f,"width",e);return d.custom(e.from,e.to)},setHeight:function(f,e){var d=new AJS.fx.Style(f,"height",e);return d.custom(e.from,e.to)}};AJS.fx.Base=new AJS.Class({init:function(b){this.options={onStart:function(){},onComplete:function(){},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};AJS.update(this.options,b);AJS.bindMethods(this)},setOptions:function(b){AJS.update(this.options,b)},step:function(){var b=new Date().getTime();if(b<this.time+this.options.duration){this.cTime=b-this.time;this.setNow()}else{setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);this.clearTimer();this.now=this.to}this.increase()},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(f,d){var e=d-f;return this.options.transition(this.cTime,f,e,this.options.duration)},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this},_start:function(c,d){if(!this.options.wait){this.clearTimer()}if(this.timer){return}setTimeout(AJS.$p(this.options.onStart,this.elm),10);this.from=c;this.to=d;this.time=new Date().getTime();this.timer=setInterval(this.step,Math.round(1000/this.options.fps));return this},custom:function(c,d){return this._start(c,d)},set:function(b){this.now=b;this.increase();return this},setStyle:function(f,e,d){if(this.property=="opacity"){AJS.setOpacity(f,d)}else{AJS.setStyle(f,e,d)}}});AJS.fx.Style=AJS.fx.Base.extend({init:function(f,d,e){this.parent();this.elm=f;this.setOptions(e);this.property=d},increase:function(){this.setStyle(this.elm,this.property,this.now)}});AJS.fx.Styles=AJS.fx.Base.extend({init:function(c,d){this.parent();this.elm=AJS.$(c);this.setOptions(d);this.now={}},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p])}},custom:function(e){if(this.timer&&this.options.wait){return}var f={};var d={};for(p in e){f[p]=e[p][0];d[p]=e[p][1]}return this._start(f,d)},increase:function(){for(var b in this.now){this.setStyle(this.elm,b,this.now[b])}}});AJS.fx.Transitions={linear:function(h,b,c,d){return c*h/d+b},sineInOut:function(h,b,c,d){return -c/2*(Math.cos(Math.PI*h/d)-1)+b}};script_loaded=true;script_loaded=true;
