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(_5){
return $A($(_5).childNodes).collect(function(_6){
return (_6.nodeType==3?_6.nodeValue:(_6.hasChildNodes()?Element.collectTextNodes(_6):""));
}).flatten().join("");
};
Element.collectTextNodesIgnoreClass=function(_7,_8){
return $A($(_7).childNodes).collect(function(_9){
return (_9.nodeType==3?_9.nodeValue:((_9.hasChildNodes()&&!Element.hasClassName(_9,_8))?Element.collectTextNodesIgnoreClass(_9,_8):""));
}).flatten().join("");
};
Element.setContentZoom=function(_a,_b){
_a=$(_a);
Element.setStyle(_a,{fontSize:(_b/100)+"em"});
if(navigator.appVersion.indexOf("AppleWebKit")>0){
window.scrollBy(0,0);
}
};
Element.getOpacity=function(_c){
var _d;
if(_d=Element.getStyle(_c,"opacity")){
return parseFloat(_d);
}
if(_d=(Element.getStyle(_c,"filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_d[1]){
return parseFloat(_d[1])/100;
}
}
return 1;
};
Element.setOpacity=function(_e,_f){
_e=$(_e);
if(_f==1){
Element.setStyle(_e,{opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});
if(/MSIE/.test(navigator.userAgent)){
Element.setStyle(_e,{filter:Element.getStyle(_e,"filter").replace(/alpha\([^\)]*\)/gi,"")});
}
}else{
if(_f<0.00001){
_f=0;
}
Element.setStyle(_e,{opacity:_f});
if(/MSIE/.test(navigator.userAgent)){
Element.setStyle(_e,{filter:Element.getStyle(_e,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_f*100+")"});
}
}
};
Element.getInlineOpacity=function(_10){
return $(_10).style.opacity||"";
};
Element.childrenWithClassName=function(_11,_12,_13){
var _14=new RegExp("(^|\\s)"+_12+"(\\s|$)");
var _15=$A($(_11).getElementsByTagName("*"))[_13?"detect":"select"](function(c){
return (c.className&&c.className.match(_14));
});
if(!_15){
_15=[];
}
return _15;
};
Element.forceRerendering=function(_17){
try{
_17=$(_17);
var n=document.createTextNode(" ");
_17.appendChild(n);
_17.removeChild(n);
}
catch(e){
}
};
Array.prototype.call=function(){
var _19=arguments;
this.each(function(f){
f.apply(this,_19);
});
};
var Effect={tagifyText:function(_1b){
if(typeof Builder=="undefined"){
throw ("Effect.tagifyText requires including script.aculo.us' builder.js library");
}
var _1c="position:relative";
if(/MSIE/.test(navigator.userAgent)){
_1c+=";zoom:1";
}
_1b=$(_1b);
$A(_1b.childNodes).each(function(_1d){
if(_1d.nodeType==3){
_1d.nodeValue.toArray().each(function(_1e){
_1b.insertBefore(Builder.node("span",{style:_1c},_1e==" "?String.fromCharCode(160):_1e),_1d);
});
Element.remove(_1d);
}
});
},multiple:function(_1f,_20){
var _21;
if(((typeof _1f=="object")||(typeof _1f=="function"))&&(_1f.length)){
_21=_1f;
}else{
_21=$(_1f).childNodes;
}
var _22=Object.extend({speed:0.1,delay:0},arguments[2]||{});
var _23=_22.delay;
$A(_21).each(function(_24,_25){
new _20(_24,Object.extend(_22,{delay:_25*_22.speed+_23}));
});
},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(_26,_27){
_26=$(_26);
_27=(_27||"appear").toLowerCase();
var _28=Object.extend({queue:{position:"end",scope:(_26.id||"global"),limit:1}},arguments[2]||{});
Effect[_26.visible()?Effect.PAIRS[_27][1]:Effect.PAIRS[_27][0]](_26,_28);
}};
var Effect2=Effect;
Effect.Transitions={};
Effect.Transitions.linear=Prototype.K;
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.currentStyle.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:Math.round(this.options.x*_49+this.originalLeft)+"px",top:Math.round(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","%","pt"].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=Math.round(_57)+"px";
}
if(this.options.scaleY){
d.height=Math.round(_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,Object.extend({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});
}});
}},arguments[1]||{}));
};
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:window.opera?0:1,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,window.opera?0:1,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,initialMoveY;
var _9d,moveY;
switch(_99.direction){
case "top-left":
_9c=initialMoveY=_9d=moveY=0;
break;
case "top-right":
_9c=_9b.width;
initialMoveY=moveY=0;
_9d=-_9b.width;
break;
case "bottom-left":
_9c=_9d=0;
initialMoveY=_9b.height;
moveY=-_9b.height;
break;
case "bottom-right":
_9c=_9b.width;
initialMoveY=_9b.height;
_9d=-_9b.width;
moveY=-_9b.height;
break;
case "center":
_9c=_9b.width/2;
initialMoveY=_9b.height/2;
_9d=-_9b.width/2;
moveY=-_9b.height/2;
break;
}
return new Effect.Move(_98,{x:_9c,y:initialMoveY,duration:0.01,beforeSetup:function(_9e){
_9e.element.hide();
_9e.element.makeClipping();
_9e.element.makePositioned();
},afterFinishInternal:function(_9f){
new Effect.Parallel([new Effect.Opacity(_9f.element,{sync:true,to:1,from:0,transition:_99.opacityTransition}),new Effect.Move(_9f.element,{x:_9d,y:moveY,sync:true,transition:_99.moveTransition}),new Effect.Scale(_9f.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(_a0){
_a0.effects[0].element.setStyle({height:"0px"});
_a0.effects[0].element.show();
},afterFinishInternal:function(_a1){
_a1.effects[0].element.undoClipping();
_a1.effects[0].element.undoPositioned();
_a1.effects[0].element.setStyle(_9a);
}},_99));
}});
};
Effect.Shrink=function(_a2){
_a2=$(_a2);
var _a3=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var _a4={top:_a2.style.top,left:_a2.style.left,height:_a2.style.height,width:_a2.style.width,opacity:_a2.getInlineOpacity()};
var _a5=_a2.getDimensions();
var _a6,moveY;
switch(_a3.direction){
case "top-left":
_a6=moveY=0;
break;
case "top-right":
_a6=_a5.width;
moveY=0;
break;
case "bottom-left":
_a6=0;
moveY=_a5.height;
break;
case "bottom-right":
_a6=_a5.width;
moveY=_a5.height;
break;
case "center":
_a6=_a5.width/2;
moveY=_a5.height/2;
break;
}
return new Effect.Parallel([new Effect.Opacity(_a2,{sync:true,to:0,from:1,transition:_a3.opacityTransition}),new Effect.Scale(_a2,window.opera?1:0,{sync:true,transition:_a3.scaleTransition,restoreAfterFinish:true}),new Effect.Move(_a2,{x:_a6,y:moveY,sync:true,transition:_a3.moveTransition})],Object.extend({beforeStartInternal:function(_a7){
_a7.effects[0].element.makePositioned();
_a7.effects[0].element.makeClipping();
},afterFinishInternal:function(_a8){
_a8.effects[0].element.hide();
_a8.effects[0].element.undoClipping();
_a8.effects[0].element.undoPositioned();
_a8.effects[0].element.setStyle(_a4);
}},_a3));
};
Effect.Pulsate=function(_a9){
_a9=$(_a9);
var _aa=arguments[1]||{};
var _ab=_a9.getInlineOpacity();
var _ac=_aa.transition||Effect.Transitions.sinoidal;
var _ad=function(pos){
return _ac(1-Effect.Transitions.pulse(pos));
};
_ad.bind(_ac);
return new Effect.Opacity(_a9,Object.extend(Object.extend({duration:3,from:0,afterFinishInternal:function(_af){
_af.element.setStyle({opacity:_ab});
}},_aa),{transition:_ad}));
};
Effect.Fold=function(_b0){
_b0=$(_b0);
var _b1={top:_b0.style.top,left:_b0.style.left,width:_b0.style.width,height:_b0.style.height};
Element.makeClipping(_b0);
return new Effect.Scale(_b0,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(_b2){
new Effect.Scale(_b0,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(_b3){
_b3.element.hide();
_b3.element.undoClipping();
_b3.element.setStyle(_b1);
}});
}},arguments[1]||{}));
};
["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","childrenWithClassName"].each(function(f){
Element.Methods[f]=Element[f];
});
Element.Methods.visualEffect=function(_b5,_b6,_b7){
s=_b6.gsub(/_/,"-").camelize();
effect_class=s.charAt(0).toUpperCase()+s.substring(1);
new Effect[effect_class](_b5,_b7);
return $(_b5);
};
Element.addMethods();

