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