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:1});
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
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)&&!window.opera){
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={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(_1a){
if(typeof Builder=="undefined"){
throw ("Effect.tagifyText requires including script.aculo.us' builder.js library");
}
var _1b="position:relative";
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_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=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(_2f){
this.effects._each(_2f);
},add:function(_30){
var _31=new Date().getTime();
var _32=(typeof _30.options.queue=="string")?_30.options.queue:_30.options.queue.position;
switch(_32){
case "front":
this.effects.findAll(function(e){
return e.state=="idle";
}).each(function(e){
e.startOn+=_30.finishOn;
e.finishOn+=_30.finishOn;
});
break;
case "end":
_31=this.effects.pluck("finishOn").max()||_31;
break;
}
_30.startOn+=_31;
_30.finishOn+=_31;
if(!_30.options.queue.limit||(this.effects.length<_30.options.queue.limit)){
this.effects.push(_30);
}
if(!this.interval){
this.interval=setInterval(this.loop.bind(this),40);
}
},remove:function(_35){
this.effects=this.effects.reject(function(e){
return e==_35;
});
if(this.effects.length==0){
clearInterval(this.interval);
this.interval=null;
}
},loop:function(){
var _37=new Date().getTime();
this.effects.invoke("loop",_37);
}});
Effect.Queues={instances:$H(),get:function(_38){
if(typeof _38!="string"){
return _38;
}
if(!this.instances[_38]){
this.instances[_38]=new Effect.ScopedQueue();
}
return this.instances[_38];
}};
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(_39){
this.options=Object.extend(Object.extend({},Effect.DefaultOptions),_39||{});
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(_3a){
if(_3a>=this.startOn){
if(_3a>=this.finishOn){
this.render(1);
this.cancel();
this.event("beforeFinish");
if(this.finish){
this.finish();
}
this.event("afterFinish");
return;
}
var pos=(_3a-this.startOn)/(this.finishOn-this.startOn);
var _3c=Math.round(pos*this.options.fps*this.options.duration);
if(_3c>this.currentFrame){
this.render(pos);
this.currentFrame=_3c;
}
}
},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(_3e){
if(this.options[_3e+"Internal"]){
this.options[_3e+"Internal"](this);
}
if(this.options[_3e]){
this.options[_3e](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(_3f){
this.effects=_3f||[];
this.start(arguments[1]);
},update:function(_40){
this.effects.invoke("render",_40);
},finish:function(_41){
this.effects.each(function(_42){
_42.render(1);
_42.cancel();
_42.event("beforeFinish");
if(_42.finish){
_42.finish(_41);
}
_42.event("afterFinish");
});
}});
Effect.Opacity=Class.create();
Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(_43){
this.element=$(_43);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
if(/MSIE/.test(navigator.userAgent)&&!window.opera&&(!this.element.currentStyle.hasLayout)){
this.element.setStyle({zoom:1});
}
var _44=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});
this.start(_44);
},update:function(_45){
this.element.setOpacity(_45);
}});
Effect.Move=Class.create();
Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(_46){
this.element=$(_46);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _47=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});
this.start(_47);
},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(_48){
this.element.setStyle({left:Math.round(this.options.x*_48+this.originalLeft)+"px",top:Math.round(this.options.y*_48+this.originalTop)+"px"});
}});
Effect.MoveBy=function(_49,_4a,_4b){
return new Effect.Move(_49,Object.extend({x:_4b,y:_4a},arguments[3]||{}));
};
Effect.Scale=Class.create();
Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(_4c,_4d){
this.element=$(_4c);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _4e=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_4d},arguments[2]||{});
this.start(_4e);
},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 _50=this.element.getStyle("font-size")||"100%";
["em","px","%","pt"].each(function(_51){
if(_50.indexOf(_51)>0){
this.fontSize=parseFloat(_50);
this.fontSizeType=_51;
}
}.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(_52){
var _53=(this.options.scaleFrom/100)+(this.factor*_52);
if(this.options.scaleContent&&this.fontSize){
this.element.setStyle({fontSize:this.fontSize*_53+this.fontSizeType});
}
this.setDimensions(this.dims[0]*_53,this.dims[1]*_53);
},finish:function(_54){
if(this.restoreAfterFinish){
this.element.setStyle(this.originalStyle);
}
},setDimensions:function(_55,_56){
var d={};
if(this.options.scaleX){
d.width=Math.round(_56)+"px";
}
if(this.options.scaleY){
d.height=Math.round(_55)+"px";
}
if(this.options.scaleFromCenter){
var _58=(_55-this.dims[0])/2;
var _59=(_56-this.dims[1])/2;
if(this.elementPositioning=="absolute"){
if(this.options.scaleY){
d.top=this.originalTop-_58+"px";
}
if(this.options.scaleX){
d.left=this.originalLeft-_59+"px";
}
}else{
if(this.options.scaleY){
d.top=-_58+"px";
}
if(this.options.scaleX){
d.left=-_59+"px";
}
}
}
this.element.setStyle(d);
}});
Effect.Highlight=Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(_5a){
this.element=$(_5a);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _5b=Object.extend({startcolor:"#ffff99"},arguments[1]||{});
this.start(_5b);
},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(_5e){
this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*_5e)).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(_62){
this.element=$(_62);
this.start(arguments[1]||{});
},setup:function(){
Position.prepare();
var _63=Position.cumulativeOffset(this.element);
if(this.options.offset){
_63[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=(_63[1]>max?max:_63[1])-this.scrollStart;
},update:function(_65){
Position.prepare();
window.scrollTo(Position.deltaX,this.scrollStart+(_65*this.delta));
}});
Effect.Fade=function(_66){
_66=$(_66);
var _67=_66.getInlineOpacity();
var _68=Object.extend({from:_66.getOpacity()||1,to:0,afterFinishInternal:function(_69){
if(_69.options.to!=0){
return;
}
_69.element.hide();
_69.element.setStyle({opacity:_67});
}},arguments[1]||{});
return new Effect.Opacity(_66,_68);
};
Effect.Appear=function(_6a){
_6a=$(_6a);
var _6b=Object.extend({from:(_6a.getStyle("display")=="none"?0:_6a.getOpacity()||0),to:1,afterFinishInternal:function(_6c){
_6c.element.forceRerendering();
},beforeSetup:function(_6d){
_6d.element.setOpacity(_6d.options.from);
_6d.element.show();
}},arguments[1]||{});
return new Effect.Opacity(_6a,_6b);
};
Effect.Puff=function(_6e){
_6e=$(_6e);
var _6f={opacity:_6e.getInlineOpacity(),position:_6e.getStyle("position"),top:_6e.style.top,left:_6e.style.left,width:_6e.style.width,height:_6e.style.height};
return new Effect.Parallel([new Effect.Scale(_6e,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(_6e,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(_70){
Position.absolutize(_70.effects[0].element);
},afterFinishInternal:function(_71){
_71.effects[0].element.hide();
_71.effects[0].element.setStyle(_6f);
}},arguments[1]||{}));
};
Effect.BlindUp=function(_72){
_72=$(_72);
_72.makeClipping();
return new Effect.Scale(_72,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_73){
_73.element.hide();
_73.element.undoClipping();
}},arguments[1]||{}));
};
Effect.BlindDown=function(_74){
_74=$(_74);
var _75=_74.getDimensions();
return new Effect.Scale(_74,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_75.height,originalWidth:_75.width},restoreAfterFinish:true,afterSetup:function(_76){
_76.element.makeClipping();
_76.element.setStyle({height:"0px"});
_76.element.show();
},afterFinishInternal:function(_77){
_77.element.undoClipping();
}},arguments[1]||{}));
};
Effect.SwitchOff=function(_78){
_78=$(_78);
var _79=_78.getInlineOpacity();
return new Effect.Appear(_78,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(_7a){
new Effect.Scale(_7a.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(_7b){
_7b.element.makePositioned();
_7b.element.makeClipping();
},afterFinishInternal:function(_7c){
_7c.element.hide();
_7c.element.undoClipping();
_7c.element.undoPositioned();
_7c.element.setStyle({opacity:_79});
}});
}},arguments[1]||{}));
};
Effect.DropOut=function(_7d){
_7d=$(_7d);
var _7e={top:_7d.getStyle("top"),left:_7d.getStyle("left"),opacity:_7d.getInlineOpacity()};
return new Effect.Parallel([new Effect.Move(_7d,{x:0,y:100,sync:true}),new Effect.Opacity(_7d,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(_7f){
_7f.effects[0].element.makePositioned();
},afterFinishInternal:function(_80){
_80.effects[0].element.hide();
_80.effects[0].element.undoPositioned();
_80.effects[0].element.setStyle(_7e);
}},arguments[1]||{}));
};
Effect.Shake=function(_81){
_81=$(_81);
var _82={top:_81.getStyle("top"),left:_81.getStyle("left")};
return new Effect.Move(_81,{x:20,y:0,duration:0.05,afterFinishInternal:function(_83){
new Effect.Move(_83.element,{x:-40,y:0,duration:0.1,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:-20,y:0,duration:0.05,afterFinishInternal:function(_88){
_88.element.undoPositioned();
_88.element.setStyle(_82);
}});
}});
}});
}});
}});
}});
};
Effect.SlideDown=function(_89){
_89=$(_89);
_89.cleanWhitespace();
var _8a=$(_89.firstChild).getStyle("bottom");
var _8b=_89.getDimensions();
return new Effect.Scale(_89,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:_8b.height,originalWidth:_8b.width},restoreAfterFinish:true,afterSetup:function(_8c){
_8c.element.makePositioned();
_8c.element.firstChild.makePositioned();
if(window.opera){
_8c.element.setStyle({top:""});
}
_8c.element.makeClipping();
_8c.element.setStyle({height:"0px"});
_8c.element.show();
},afterUpdateInternal:function(_8d){
_8d.element.firstChild.setStyle({bottom:(_8d.dims[0]-_8d.element.clientHeight)+"px"});
},afterFinishInternal:function(_8e){
_8e.element.undoClipping();
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_8e.element.undoPositioned();
_8e.element.firstChild.undoPositioned();
}else{
_8e.element.firstChild.undoPositioned();
_8e.element.undoPositioned();
}
_8e.element.firstChild.setStyle({bottom:_8a});
}},arguments[1]||{}));
};
Effect.SlideUp=function(_8f){
_8f=$(_8f);
_8f.cleanWhitespace();
var _90=$(_8f.firstChild).getStyle("bottom");
return new Effect.Scale(_8f,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_91){
_91.element.makePositioned();
_91.element.firstChild.makePositioned();
if(window.opera){
_91.element.setStyle({top:""});
}
_91.element.makeClipping();
_91.element.show();
},afterUpdateInternal:function(_92){
_92.element.firstChild.setStyle({bottom:(_92.dims[0]-_92.element.clientHeight)+"px"});
},afterFinishInternal:function(_93){
_93.element.hide();
_93.element.undoClipping();
_93.element.firstChild.undoPositioned();
_93.element.undoPositioned();
_93.element.setStyle({bottom:_90});
}},arguments[1]||{}));
};
Effect.Squish=function(_94){
return new Effect.Scale(_94,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(_95){
_95.element.makeClipping(_95.element);
},afterFinishInternal:function(_96){
_96.element.hide(_96.element);
_96.element.undoClipping(_96.element);
}});
};
Effect.Grow=function(_97){
_97=$(_97);
var _98=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});
var _99={top:_97.style.top,left:_97.style.left,height:_97.style.height,width:_97.style.width,opacity:_97.getInlineOpacity()};
var _9a=_97.getDimensions();
var _9b,_9c;
var _9d,_9e;
switch(_98.direction){
case "top-left":
_9b=_9c=_9d=_9e=0;
break;
case "top-right":
_9b=_9a.width;
_9c=_9e=0;
_9d=-_9a.width;
break;
case "bottom-left":
_9b=_9d=0;
_9c=_9a.height;
_9e=-_9a.height;
break;
case "bottom-right":
_9b=_9a.width;
_9c=_9a.height;
_9d=-_9a.width;
_9e=-_9a.height;
break;
case "center":
_9b=_9a.width/2;
_9c=_9a.height/2;
_9d=-_9a.width/2;
_9e=-_9a.height/2;
break;
}
return new Effect.Move(_97,{x:_9b,y:_9c,duration:0.01,beforeSetup:function(_9f){
_9f.element.hide();
_9f.element.makeClipping();
_9f.element.makePositioned();
},afterFinishInternal:function(_a0){
new Effect.Parallel([new Effect.Opacity(_a0.element,{sync:true,to:1,from:0,transition:_98.opacityTransition}),new Effect.Move(_a0.element,{x:_9d,y:_9e,sync:true,transition:_98.moveTransition}),new Effect.Scale(_a0.element,100,{scaleMode:{originalHeight:_9a.height,originalWidth:_9a.width},sync:true,scaleFrom:window.opera?1:0,transition:_98.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(_a1){
_a1.effects[0].element.setStyle({height:"0px"});
_a1.effects[0].element.show();
},afterFinishInternal:function(_a2){
_a2.effects[0].element.undoClipping();
_a2.effects[0].element.undoPositioned();
_a2.effects[0].element.setStyle(_99);
}},_98));
}});
};
Effect.Shrink=function(_a3){
_a3=$(_a3);
var _a4=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var _a5={top:_a3.style.top,left:_a3.style.left,height:_a3.style.height,width:_a3.style.width,opacity:_a3.getInlineOpacity()};
var _a6=_a3.getDimensions();
var _a7,_a8;
switch(_a4.direction){
case "top-left":
_a7=_a8=0;
break;
case "top-right":
_a7=_a6.width;
_a8=0;
break;
case "bottom-left":
_a7=0;
_a8=_a6.height;
break;
case "bottom-right":
_a7=_a6.width;
_a8=_a6.height;
break;
case "center":
_a7=_a6.width/2;
_a8=_a6.height/2;
break;
}
return new Effect.Parallel([new Effect.Opacity(_a3,{sync:true,to:0,from:1,transition:_a4.opacityTransition}),new Effect.Scale(_a3,window.opera?1:0,{sync:true,transition:_a4.scaleTransition,restoreAfterFinish:true}),new Effect.Move(_a3,{x:_a7,y:_a8,sync:true,transition:_a4.moveTransition})],Object.extend({beforeStartInternal:function(_a9){
_a9.effects[0].element.makePositioned();
_a9.effects[0].element.makeClipping();
},afterFinishInternal:function(_aa){
_aa.effects[0].element.hide();
_aa.effects[0].element.undoClipping();
_aa.effects[0].element.undoPositioned();
_aa.effects[0].element.setStyle(_a5);
}},_a4));
};
Effect.Pulsate=function(_ab){
_ab=$(_ab);
var _ac=arguments[1]||{};
var _ad=_ab.getInlineOpacity();
var _ae=_ac.transition||Effect.Transitions.sinoidal;
var _af=function(pos){
return _ae(1-Effect.Transitions.pulse(pos));
};
_af.bind(_ae);
return new Effect.Opacity(_ab,Object.extend(Object.extend({duration:3,from:0,afterFinishInternal:function(_b1){
_b1.element.setStyle({opacity:_ad});
}},_ac),{transition:_af}));
};
Effect.Fold=function(_b2){
_b2=$(_b2);
var _b3={top:_b2.style.top,left:_b2.style.left,width:_b2.style.width,height:_b2.style.height};
Element.makeClipping(_b2);
return new Effect.Scale(_b2,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(_b4){
new Effect.Scale(_b2,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(_b5){
_b5.element.hide();
_b5.element.undoClipping();
_b5.element.setStyle(_b3);
}});
}},arguments[1]||{}));
};
["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","childrenWithClassName"].each(function(f){
Element.Methods[f]=Element[f];
});
Element.Methods.visualEffect=function(_b7,_b8,_b9){
s=_b8.gsub(/_/,"-").camelize();
effect_class=s.charAt(0).toUpperCase()+s.substring(1);
new Effect[effect_class](_b7,_b9);
return $(_b7);
};
Element.addMethods();

