String.prototype.parseColor=function(){
var _1="#";
if(this.slice(0,4)=="rgb("){
var _2=this.slice(4,this.length-1).split(",");
var i=0;
do{
_1+=parseInt(_2[i]).toColorPart();
}while(++i<3);
}else{
if(this.slice(0,1)=="#"){
if(this.length==4){
for(var i=1;i<4;i++){
_1+=(this.charAt(i)+this.charAt(i)).toLowerCase();
}
}
if(this.length==7){
_1=this.toLowerCase();
}
}
}
return (_1.length==7?_1:(arguments[0]||this));
};
Element.collectTextNodes=function(_4){
return $A($(_4).childNodes).collect(function(_5){
return (_5.nodeType==3?_5.nodeValue:(_5.hasChildNodes()?Element.collectTextNodes(_5):""));
}).flatten().join("");
};
Element.collectTextNodesIgnoreClass=function(_6,_7){
return $A($(_6).childNodes).collect(function(_8){
return (_8.nodeType==3?_8.nodeValue:((_8.hasChildNodes()&&!Element.hasClassName(_8,_7))?Element.collectTextNodesIgnoreClass(_8,_7):""));
}).flatten().join("");
};
Element.setContentZoom=function(_9,_a){
_9=$(_9);
Element.setStyle(_9,{fontSize:(_a/100)+"em"});
if(navigator.appVersion.indexOf("AppleWebKit")>0){
window.scrollBy(0,0);
}
};
Element.getOpacity=function(_b){
var _c;
if(_c=Element.getStyle(_b,"opacity")){
return parseFloat(_c);
}
if(_c=(Element.getStyle(_b,"filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_c[1]){
return parseFloat(_c[1])/100;
}
}
return 1;
};
Element.setOpacity=function(_d,_e){
_d=$(_d);
if(_e==1){
Element.setStyle(_d,{opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});
if(/MSIE/.test(navigator.userAgent)){
Element.setStyle(_d,{filter:Element.getStyle(_d,"filter").replace(/alpha\([^\)]*\)/gi,"")});
}
}else{
if(_e<0.00001){
_e=0;
}
Element.setStyle(_d,{opacity:_e});
if(/MSIE/.test(navigator.userAgent)){
Element.setStyle(_d,{filter:Element.getStyle(_d,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_e*100+")"});
}
}
};
Element.getInlineOpacity=function(_f){
return $(_f).style.opacity||"";
};
Element.childrenWithClassName=function(_10,_11,_12){
var _13=new RegExp("(^|\\s)"+_11+"(\\s|$)");
var _14=$A($(_10).getElementsByTagName("*"))[_12?"detect":"select"](function(c){
return (c.className&&c.className.match(_13));
});
if(!_14){
_14=[];
}
return _14;
};
Element.forceRerendering=function(_16){
try{
_16=$(_16);
var n=document.createTextNode(" ");
_16.appendChild(n);
_16.removeChild(n);
}
catch(e){
}
};
Array.prototype.call=function(){
var _18=arguments;
this.each(function(f){
f.apply(this,_18);
});
};
var Effect={tagifyText:function(_1a){
var _1b="position:relative";
if(/MSIE/.test(navigator.userAgent)){
_1b+=";zoom:1";
}
_1a=$(_1a);
$A(_1a.childNodes).each(function(_1c){
if(_1c.nodeType==3){
_1c.nodeValue.toArray().each(function(_1d){
_1a.insertBefore(Builder.node("span",{style:_1b},_1d==" "?String.fromCharCode(160):_1d),_1c);
});
Element.remove(_1c);
}
});
},multiple:function(_1e,_1f){
var _20;
if(((typeof _1e=="object")||(typeof _1e=="function"))&&(_1e.length)){
_20=_1e;
}else{
_20=$(_1e).childNodes;
}
var _21=Object.extend({speed:0.1,delay:0},arguments[2]||{});
var _22=_21.delay;
$A(_20).each(function(_23,_24){
new _1f(_23,Object.extend(_21,{delay:_24*_21.speed+_22}));
});
},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(_25,_26){
_25=$(_25);
_26=(_26||"appear").toLowerCase();
var _27=Object.extend({queue:{position:"end",scope:(_25.id||"global"),limit:1}},arguments[2]||{});
Effect[_25.visible()?Effect.PAIRS[_26][1]:Effect.PAIRS[_26][0]](_25,_27);
}};
var Effect2=Effect;
Effect.Transitions={};
Effect.Transitions.linear=function(pos){
return pos;
};
Effect.Transitions.sinoidal=function(pos){
return (-Math.cos(pos*Math.PI)/2)+0.5;
};
Effect.Transitions.reverse=function(pos){
return 1-pos;
};
Effect.Transitions.flicker=function(pos){
return ((-Math.cos(pos*Math.PI)/4)+0.75)+Math.random()/4;
};
Effect.Transitions.wobble=function(pos){
return (-Math.cos(pos*Math.PI*(9*pos))/2)+0.5;
};
Effect.Transitions.pulse=function(pos){
return (Math.floor(pos*10)%2==0?(pos*10-Math.floor(pos*10)):1-(pos*10-Math.floor(pos*10)));
};
Effect.Transitions.none=function(pos){
return 0;
};
Effect.Transitions.full=function(pos){
return 1;
};
Effect.ScopedQueue=Class.create();
Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){
this.effects=[];
this.interval=null;
},_each:function(_30){
this.effects._each(_30);
},add:function(_31){
var _32=new Date().getTime();
var _33=(typeof _31.options.queue=="string")?_31.options.queue:_31.options.queue.position;
switch(_33){
case "front":
this.effects.findAll(function(e){
return e.state=="idle";
}).each(function(e){
e.startOn+=_31.finishOn;
e.finishOn+=_31.finishOn;
});
break;
case "end":
_32=this.effects.pluck("finishOn").max()||_32;
break;
}
_31.startOn+=_32;
_31.finishOn+=_32;
if(!_31.options.queue.limit||(this.effects.length<_31.options.queue.limit)){
this.effects.push(_31);
}
if(!this.interval){
this.interval=setInterval(this.loop.bind(this),40);
}
},remove:function(_36){
this.effects=this.effects.reject(function(e){
return e==_36;
});
if(this.effects.length==0){
clearInterval(this.interval);
this.interval=null;
}
},loop:function(){
var _38=new Date().getTime();
this.effects.invoke("loop",_38);
}});
Effect.Queues={instances:$H(),get:function(_39){
if(typeof _39!="string"){
return _39;
}
if(!this.instances[_39]){
this.instances[_39]=new Effect.ScopedQueue();
}
return this.instances[_39];
}};
Effect.Queue=Effect.Queues.get("global");
Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};
Effect.Base=function(){
};
Effect.Base.prototype={position:null,start:function(_3a){
this.options=Object.extend(Object.extend({},Effect.DefaultOptions),_3a||{});
this.currentFrame=0;
this.state="idle";
this.startOn=this.options.delay*1000;
this.finishOn=this.startOn+(this.options.duration*1000);
this.event("beforeStart");
if(!this.options.sync){
Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this);
}
},loop:function(_3b){
if(_3b>=this.startOn){
if(_3b>=this.finishOn){
this.render(1);
this.cancel();
this.event("beforeFinish");
if(this.finish){
this.finish();
}
this.event("afterFinish");
return;
}
var pos=(_3b-this.startOn)/(this.finishOn-this.startOn);
var _3d=Math.round(pos*this.options.fps*this.options.duration);
if(_3d>this.currentFrame){
this.render(pos);
this.currentFrame=_3d;
}
}
},render:function(pos){
if(this.state=="idle"){
this.state="running";
this.event("beforeSetup");
if(this.setup){
this.setup();
}
this.event("afterSetup");
}
if(this.state=="running"){
if(this.options.transition){
pos=this.options.transition(pos);
}
pos*=(this.options.to-this.options.from);
pos+=this.options.from;
this.position=pos;
this.event("beforeUpdate");
if(this.update){
this.update(pos);
}
this.event("afterUpdate");
}
},cancel:function(){
if(!this.options.sync){
Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this);
}
this.state="finished";
},event:function(_3f){
if(this.options[_3f+"Internal"]){
this.options[_3f+"Internal"](this);
}
if(this.options[_3f]){
this.options[_3f](this);
}
},inspect:function(){
return "#<Effect:"+$H(this).inspect()+",options:"+$H(this.options).inspect()+">";
}};
Effect.Parallel=Class.create();
Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(_40){
this.effects=_40||[];
this.start(arguments[1]);
},update:function(_41){
this.effects.invoke("render",_41);
},finish:function(_42){
this.effects.each(function(_43){
_43.render(1);
_43.cancel();
_43.event("beforeFinish");
if(_43.finish){
_43.finish(_42);
}
_43.event("afterFinish");
});
}});
Effect.Opacity=Class.create();
Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(_44){
this.element=$(_44);
if(/MSIE/.test(navigator.userAgent)&&(!this.element.hasLayout)){
this.element.setStyle({zoom:1});
}
var _45=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});
this.start(_45);
},update:function(_46){
this.element.setOpacity(_46);
}});
Effect.Move=Class.create();
Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(_47){
this.element=$(_47);
var _48=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});
this.start(_48);
},setup:function(){
this.element.makePositioned();
this.originalLeft=parseFloat(this.element.getStyle("left")||"0");
this.originalTop=parseFloat(this.element.getStyle("top")||"0");
if(this.options.mode=="absolute"){
this.options.x=this.options.x-this.originalLeft;
this.options.y=this.options.y-this.originalTop;
}
},update:function(_49){
this.element.setStyle({left:this.options.x*_49+this.originalLeft+"px",top:this.options.y*_49+this.originalTop+"px"});
}});
Effect.MoveBy=function(_4a,_4b,_4c){
return new Effect.Move(_4a,Object.extend({x:_4c,y:_4b},arguments[3]||{}));
};
Effect.Scale=Class.create();
Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(_4d,_4e){
this.element=$(_4d);
var _4f=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_4e},arguments[2]||{});
this.start(_4f);
},setup:function(){
this.restoreAfterFinish=this.options.restoreAfterFinish||false;
this.elementPositioning=this.element.getStyle("position");
this.originalStyle={};
["top","left","width","height","fontSize"].each(function(k){
this.originalStyle[k]=this.element.style[k];
}.bind(this));
this.originalTop=this.element.offsetTop;
this.originalLeft=this.element.offsetLeft;
var _51=this.element.getStyle("font-size")||"100%";
["em","px","%"].each(function(_52){
if(_51.indexOf(_52)>0){
this.fontSize=parseFloat(_51);
this.fontSizeType=_52;
}
}.bind(this));
this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;
this.dims=null;
if(this.options.scaleMode=="box"){
this.dims=[this.element.offsetHeight,this.element.offsetWidth];
}
if(/^content/.test(this.options.scaleMode)){
this.dims=[this.element.scrollHeight,this.element.scrollWidth];
}
if(!this.dims){
this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth];
}
},update:function(_53){
var _54=(this.options.scaleFrom/100)+(this.factor*_53);
if(this.options.scaleContent&&this.fontSize){
this.element.setStyle({fontSize:this.fontSize*_54+this.fontSizeType});
}
this.setDimensions(this.dims[0]*_54,this.dims[1]*_54);
},finish:function(_55){
if(this.restoreAfterFinish){
this.element.setStyle(this.originalStyle);
}
},setDimensions:function(_56,_57){
var d={};
if(this.options.scaleX){
d.width=_57+"px";
}
if(this.options.scaleY){
d.height=_56+"px";
}
if(this.options.scaleFromCenter){
var _59=(_56-this.dims[0])/2;
var _5a=(_57-this.dims[1])/2;
if(this.elementPositioning=="absolute"){
if(this.options.scaleY){
d.top=this.originalTop-_59+"px";
}
if(this.options.scaleX){
d.left=this.originalLeft-_5a+"px";
}
}else{
if(this.options.scaleY){
d.top=-_59+"px";
}
if(this.options.scaleX){
d.left=-_5a+"px";
}
}
}
this.element.setStyle(d);
}});
Effect.Highlight=Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(_5b){
this.element=$(_5b);
var _5c=Object.extend({startcolor:"#ffff99"},arguments[1]||{});
this.start(_5c);
},setup:function(){
if(this.element.getStyle("display")=="none"){
this.cancel();
return;
}
this.oldStyle={backgroundImage:this.element.getStyle("background-image")};
this.element.setStyle({backgroundImage:"none"});
if(!this.options.endcolor){
this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff");
}
if(!this.options.restorecolor){
this.options.restorecolor=this.element.getStyle("background-color");
}
this._base=$R(0,2).map(function(i){
return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);
}.bind(this));
this._delta=$R(0,2).map(function(i){
return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];
}.bind(this));
},update:function(_5f){
this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*_5f)).toColorPart());
}.bind(this))});
},finish:function(){
this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}));
}});
Effect.ScrollTo=Class.create();
Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(_63){
this.element=$(_63);
this.start(arguments[1]||{});
},setup:function(){
Position.prepare();
var _64=Position.cumulativeOffset(this.element);
if(this.options.offset){
_64[1]+=this.options.offset;
}
var max=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);
this.scrollStart=Position.deltaY;
this.delta=(_64[1]>max?max:_64[1])-this.scrollStart;
},update:function(_66){
Position.prepare();
window.scrollTo(Position.deltaX,this.scrollStart+(_66*this.delta));
}});
Effect.Fade=function(_67){
_67=$(_67);
var _68=_67.getInlineOpacity();
var _69=Object.extend({from:_67.getOpacity()||1,to:0,afterFinishInternal:function(_6a){
if(_6a.options.to!=0){
return;
}
_6a.element.hide();
_6a.element.setStyle({opacity:_68});
}},arguments[1]||{});
return new Effect.Opacity(_67,_69);
};
Effect.Appear=function(_6b){
_6b=$(_6b);
var _6c=Object.extend({from:(_6b.getStyle("display")=="none"?0:_6b.getOpacity()||0),to:1,afterFinishInternal:function(_6d){
_6d.element.forceRerendering();
},beforeSetup:function(_6e){
_6e.element.setOpacity(_6e.options.from);
_6e.element.show();
}},arguments[1]||{});
return new Effect.Opacity(_6b,_6c);
};
Effect.Puff=function(_6f){
_6f=$(_6f);
var _70={opacity:_6f.getInlineOpacity(),position:_6f.getStyle("position")};
return new Effect.Parallel([new Effect.Scale(_6f,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(_6f,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(_71){
_71.effects[0].element.setStyle({position:"absolute"});
},afterFinishInternal:function(_72){
_72.effects[0].element.hide();
_72.effects[0].element.setStyle(_70);
}},arguments[1]||{}));
};
Effect.BlindUp=function(_73){
_73=$(_73);
_73.makeClipping();
return new Effect.Scale(_73,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_74){
_74.element.hide();
_74.element.undoClipping();
}},arguments[1]||{}));
};
Effect.BlindDown=function(_75){
_75=$(_75);
var _76=_75.getDimensions();
return new Effect.Scale(_75,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_76.height,originalWidth:_76.width},restoreAfterFinish:true,afterSetup:function(_77){
_77.element.makeClipping();
_77.element.setStyle({height:"0px"});
_77.element.show();
},afterFinishInternal:function(_78){
_78.element.undoClipping();
}},arguments[1]||{}));
};
Effect.SwitchOff=function(_79){
_79=$(_79);
var _7a=_79.getInlineOpacity();
return new Effect.Appear(_79,{duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(_7b){
new Effect.Scale(_7b.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(_7c){
_7c.element.makePositioned();
_7c.element.makeClipping();
},afterFinishInternal:function(_7d){
_7d.element.hide();
_7d.element.undoClipping();
_7d.element.undoPositioned();
_7d.element.setStyle({opacity:_7a});
}});
}});
};
Effect.DropOut=function(_7e){
_7e=$(_7e);
var _7f={top:_7e.getStyle("top"),left:_7e.getStyle("left"),opacity:_7e.getInlineOpacity()};
return new Effect.Parallel([new Effect.Move(_7e,{x:0,y:100,sync:true}),new Effect.Opacity(_7e,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(_80){
_80.effects[0].element.makePositioned();
},afterFinishInternal:function(_81){
_81.effects[0].element.hide();
_81.effects[0].element.undoPositioned();
_81.effects[0].element.setStyle(_7f);
}},arguments[1]||{}));
};
Effect.Shake=function(_82){
_82=$(_82);
var _83={top:_82.getStyle("top"),left:_82.getStyle("left")};
return new Effect.Move(_82,{x:20,y:0,duration:0.05,afterFinishInternal:function(_84){
new Effect.Move(_84.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_85){
new Effect.Move(_85.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_86){
new Effect.Move(_86.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_87){
new Effect.Move(_87.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_88){
new Effect.Move(_88.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(_89){
_89.element.undoPositioned();
_89.element.setStyle(_83);
}});
}});
}});
}});
}});
}});
};
Effect.SlideDown=function(_8a){
_8a=$(_8a);
_8a.cleanWhitespace();
var _8b=$(_8a.firstChild).getStyle("bottom");
var _8c=_8a.getDimensions();
return new Effect.Scale(_8a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_8c.height,originalWidth:_8c.width},restoreAfterFinish:true,afterSetup:function(_8d){
_8d.element.makePositioned();
_8d.element.firstChild.makePositioned();
if(window.opera){
_8d.element.setStyle({top:""});
}
_8d.element.makeClipping();
_8d.element.setStyle({height:"0px"});
_8d.element.show();
},afterUpdateInternal:function(_8e){
_8e.element.firstChild.setStyle({bottom:(_8e.dims[0]-_8e.element.clientHeight)+"px"});
},afterFinishInternal:function(_8f){
_8f.element.undoClipping();
if(/MSIE/.test(navigator.userAgent)){
_8f.element.undoPositioned();
_8f.element.firstChild.undoPositioned();
}else{
_8f.element.firstChild.undoPositioned();
_8f.element.undoPositioned();
}
_8f.element.firstChild.setStyle({bottom:_8b});
}},arguments[1]||{}));
};
Effect.SlideUp=function(_90){
_90=$(_90);
_90.cleanWhitespace();
var _91=$(_90.firstChild).getStyle("bottom");
return new Effect.Scale(_90,0,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_92){
_92.element.makePositioned();
_92.element.firstChild.makePositioned();
if(window.opera){
_92.element.setStyle({top:""});
}
_92.element.makeClipping();
_92.element.show();
},afterUpdateInternal:function(_93){
_93.element.firstChild.setStyle({bottom:(_93.dims[0]-_93.element.clientHeight)+"px"});
},afterFinishInternal:function(_94){
_94.element.hide();
_94.element.undoClipping();
_94.element.firstChild.undoPositioned();
_94.element.undoPositioned();
_94.element.setStyle({bottom:_91});
}},arguments[1]||{}));
};
Effect.Squish=function(_95){
return new Effect.Scale(_95,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(_96){
_96.element.makeClipping(_96.element);
},afterFinishInternal:function(_97){
_97.element.hide(_97.element);
_97.element.undoClipping(_97.element);
}});
};
Effect.Grow=function(_98){
_98=$(_98);
var _99=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});
var _9a={top:_98.style.top,left:_98.style.left,height:_98.style.height,width:_98.style.width,opacity:_98.getInlineOpacity()};
var _9b=_98.getDimensions();
var _9c,_9d;
var _9e,_9f;
switch(_99.direction){
case "top-left":
_9c=_9d=_9e=_9f=0;
break;
case "top-right":
_9c=_9b.width;
_9d=_9f=0;
_9e=-_9b.width;
break;
case "bottom-left":
_9c=_9e=0;
_9d=_9b.height;
_9f=-_9b.height;
break;
case "bottom-right":
_9c=_9b.width;
_9d=_9b.height;
_9e=-_9b.width;
_9f=-_9b.height;
break;
case "center":
_9c=_9b.width/2;
_9d=_9b.height/2;
_9e=-_9b.width/2;
_9f=-_9b.height/2;
break;
}
return new Effect.Move(_98,{x:_9c,y:_9d,duration:0.01,beforeSetup:function(_a0){
_a0.element.hide();
_a0.element.makeClipping();
_a0.element.makePositioned();
},afterFinishInternal:function(_a1){
new Effect.Parallel([new Effect.Opacity(_a1.element,{sync:true,to:1,from:0,transition:_99.opacityTransition}),new Effect.Move(_a1.element,{x:_9e,y:_9f,sync:true,transition:_99.moveTransition}),new Effect.Scale(_a1.element,100,{scaleMode:{originalHeight:_9b.height,originalWidth:_9b.width},sync:true,scaleFrom:window.opera?1:0,transition:_99.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(_a2){
_a2.effects[0].element.setStyle({height:"0px"});
_a2.effects[0].element.show();
},afterFinishInternal:function(_a3){
_a3.effects[0].element.undoClipping();
_a3.effects[0].element.undoPositioned();
_a3.effects[0].element.setStyle(_9a);
}},_99));
}});
};
Effect.Shrink=function(_a4){
_a4=$(_a4);
var _a5=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var _a6={top:_a4.style.top,left:_a4.style.left,height:_a4.style.height,width:_a4.style.width,opacity:_a4.getInlineOpacity()};
var _a7=_a4.getDimensions();
var _a8,_a9;
switch(_a5.direction){
case "top-left":
_a8=_a9=0;
break;
case "top-right":
_a8=_a7.width;
_a9=0;
break;
case "bottom-left":
_a8=0;
_a9=_a7.height;
break;
case "bottom-right":
_a8=_a7.width;
_a9=_a7.height;
break;
case "center":
_a8=_a7.width/2;
_a9=_a7.height/2;
break;
}
return new Effect.Parallel([new Effect.Opacity(_a4,{sync:true,to:0,from:1,transition:_a5.opacityTransition}),new Effect.Scale(_a4,window.opera?1:0,{sync:true,transition:_a5.scaleTransition,restoreAfterFinish:true}),new Effect.Move(_a4,{x:_a8,y:_a9,sync:true,transition:_a5.moveTransition})],Object.extend({beforeStartInternal:function(_aa){
_aa.effects[0].element.makePositioned();
_aa.effects[0].element.makeClipping();
},afterFinishInternal:function(_ab){
_ab.effects[0].element.hide();
_ab.effects[0].element.undoClipping();
_ab.effects[0].element.undoPositioned();
_ab.effects[0].element.setStyle(_a6);
}},_a5));
};
Effect.Pulsate=function(_ac){
_ac=$(_ac);
var _ad=arguments[1]||{};
var _ae=_ac.getInlineOpacity();
var _af=_ad.transition||Effect.Transitions.sinoidal;
var _b0=function(pos){
return _af(1-Effect.Transitions.pulse(pos));
};
_b0.bind(_af);
return new Effect.Opacity(_ac,Object.extend(Object.extend({duration:3,from:0,afterFinishInternal:function(_b2){
_b2.element.setStyle({opacity:_ae});
}},_ad),{transition:_b0}));
};
Effect.Fold=function(_b3){
_b3=$(_b3);
var _b4={top:_b3.style.top,left:_b3.style.left,width:_b3.style.width,height:_b3.style.height};
Element.makeClipping(_b3);
return new Effect.Scale(_b3,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(_b5){
new Effect.Scale(_b3,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(_b6){
_b6.element.hide();
_b6.element.undoClipping();
_b6.element.setStyle(_b4);
}});
}},arguments[1]||{}));
};
["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","childrenWithClassName"].each(function(f){
Element.Methods[f]=Element[f];
});
Element.Methods.visualEffect=function(_b8,_b9,_ba){
s=_b9.gsub(/_/,"-").camelize();
effect_class=s.charAt(0).toUpperCase()+s.substring(1);
new Effect[effect_class](_b8,_ba);
return $(_b8);
};
Element.addMethods();

