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.setStyle=function(_9,_a){
_9=$(_9);
for(k in _a){
_9.style[k.camelize()]=_a[k];
}
};
Element.setContentZoom=function(_b,_c){
Element.setStyle(_b,{fontSize:(_c/100)+"em"});
if(navigator.appVersion.indexOf("AppleWebKit")>0){
window.scrollBy(0,0);
}
};
Element.getOpacity=function(_d){
var _e;
if(_e=Element.getStyle(_d,"opacity")){
return parseFloat(_e);
}
if(_e=(Element.getStyle(_d,"filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_e[1]){
return parseFloat(_e[1])/100;
}
}
return 1;
};
Element.setOpacity=function(_f,_10){
_f=$(_f);
if(_10==1){
Element.setStyle(_f,{opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});
if(/MSIE/.test(navigator.userAgent)){
Element.setStyle(_f,{filter:Element.getStyle(_f,"filter").replace(/alpha\([^\)]*\)/gi,"")});
}
}else{
if(_10<0.00001){
_10=0;
}
Element.setStyle(_f,{opacity:_10});
if(/MSIE/.test(navigator.userAgent)){
Element.setStyle(_f,{filter:Element.getStyle(_f,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_10*100+")"});
}
}
};
Element.getInlineOpacity=function(_11){
return $(_11).style.opacity||"";
};
Element.childrenWithClassName=function(_12,_13){
return $A($(_12).getElementsByTagName("*")).select(function(c){
return Element.hasClassName(c,_13);
});
};
Element.forceRerendering=function(_15){
try{
_15=$(_15);
var n=document.createTextNode(" ");
_15.appendChild(n);
_15.removeChild(n);
}
catch(e){
}
};
Array.prototype.call=function(){
var _17=arguments;
this.each(function(f){
f.apply(this,_17);
});
};
var Effect={tagifyText:function(_19){
var _1a="position:relative";
if(/MSIE/.test(navigator.userAgent)){
_1a+=";zoom:1";
}
_19=$(_19);
$A(_19.childNodes).each(function(_1b){
if(_1b.nodeType==3){
_1b.nodeValue.toArray().each(function(_1c){
_19.insertBefore(Builder.node("span",{style:_1a},_1c==" "?String.fromCharCode(160):_1c),_1b);
});
Element.remove(_1b);
}
});
},multiple:function(_1d,_1e){
var _1f;
if(((typeof _1d=="object")||(typeof _1d=="function"))&&(_1d.length)){
_1f=_1d;
}else{
_1f=$(_1d).childNodes;
}
var _20=Object.extend({speed:0.1,delay:0},arguments[2]||{});
var _21=_20.delay;
$A(_1f).each(function(_22,_23){
new _1e(_22,Object.extend(_20,{delay:_23*_20.speed+_21}));
});
},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(_24,_25){
_24=$(_24);
_25=(_25||"appear").toLowerCase();
var _26=Object.extend({queue:{position:"end",scope:(_24.id||"global"),limit:1}},arguments[2]||{});
Effect[Element.visible(_24)?Effect.PAIRS[_25][1]:Effect.PAIRS[_25][0]](_24,_26);
}};
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(_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(/MSIE/.test(navigator.userAgent)&&(!this.element.hasLayout)){
Element.setStyle(this.element,{zoom:1});
}
var _44=Object.extend({from:Element.getOpacity(this.element)||0,to:1},arguments[1]||{});
this.start(_44);
},update:function(_45){
Element.setOpacity(this.element,_45);
}});
Effect.Move=Class.create();
Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(_46){
this.element=$(_46);
var _47=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});
this.start(_47);
},setup:function(){
Element.makePositioned(this.element);
this.originalLeft=parseFloat(Element.getStyle(this.element,"left")||"0");
this.originalTop=parseFloat(Element.getStyle(this.element,"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){
Element.setStyle(this.element,{left:this.options.x*_48+this.originalLeft+"px",top: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);
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=Element.getStyle(this.element,"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=Element.getStyle(this.element,"font-size")||"100%";
["em","px","%"].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){
Element.setStyle(this.element,{fontSize:this.fontSize*_53+this.fontSizeType});
}
this.setDimensions(this.dims[0]*_53,this.dims[1]*_53);
},finish:function(_54){
if(this.restoreAfterFinish){
Element.setStyle(this.element,this.originalStyle);
}
},setDimensions:function(_55,_56){
var d={};
if(this.options.scaleX){
d.width=_56+"px";
}
if(this.options.scaleY){
d.height=_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";
}
}
}
Element.setStyle(this.element,d);
}});
Effect.Highlight=Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(_5a){
this.element=$(_5a);
var _5b=Object.extend({startcolor:"#ffff99"},arguments[1]||{});
this.start(_5b);
},setup:function(){
if(Element.getStyle(this.element,"display")=="none"){
this.cancel();
return;
}
this.oldStyle={backgroundImage:Element.getStyle(this.element,"background-image")};
Element.setStyle(this.element,{backgroundImage:"none"});
if(!this.options.endcolor){
this.options.endcolor=Element.getStyle(this.element,"background-color").parseColor("#ffffff");
}
if(!this.options.restorecolor){
this.options.restorecolor=Element.getStyle(this.element,"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){
Element.setStyle(this.element,{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(){
Element.setStyle(this.element,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){
var _67=Element.getInlineOpacity(_66);
var _68=Object.extend({from:Element.getOpacity(_66)||1,to:0,afterFinishInternal:function(_69){
with(Element){
if(_69.options.to!=0){
return;
}
hide(_69.element);
setStyle(_69.element,{opacity:_67});
}
}},arguments[1]||{});
return new Effect.Opacity(_66,_68);
};
Effect.Appear=function(_6a){
var _6b=Object.extend({from:(Element.getStyle(_6a,"display")=="none"?0:Element.getOpacity(_6a)||0),to:1,afterFinishInternal:function(_6c){
Element.forceRerendering(_6c.element);
},beforeSetup:function(_6d){
with(Element){
setOpacity(_6d.element,_6d.options.from);
show(_6d.element);
}
}},arguments[1]||{});
return new Effect.Opacity(_6a,_6b);
};
Effect.Puff=function(_6e){
_6e=$(_6e);
var _6f={opacity:Element.getInlineOpacity(_6e),position:Element.getStyle(_6e,"position")};
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){
with(Element){
setStyle(_70.effects[0].element,{position:"absolute"});
}
},afterFinishInternal:function(_71){
with(Element){
hide(_71.effects[0].element);
setStyle(_71.effects[0].element,_6f);
}
}},arguments[1]||{}));
};
Effect.BlindUp=function(_72){
_72=$(_72);
Element.makeClipping(_72);
return new Effect.Scale(_72,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_73){
with(Element){
[hide,undoClipping].call(_73.element);
}
}},arguments[1]||{}));
};
Effect.BlindDown=function(_74){
_74=$(_74);
var _75=Element.getDimensions(_74);
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){
with(Element){
makeClipping(_76.element);
setStyle(_76.element,{height:"0px"});
show(_76.element);
}
},afterFinishInternal:function(_77){
Element.undoClipping(_77.element);
}},arguments[1]||{}));
};
Effect.SwitchOff=function(_78){
_78=$(_78);
var _79=Element.getInlineOpacity(_78);
return new Effect.Appear(_78,{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){
with(Element){
[makePositioned,makeClipping].call(_7b.element);
}
},afterFinishInternal:function(_7c){
with(Element){
[hide,undoClipping,undoPositioned].call(_7c.element);
setStyle(_7c.element,{opacity:_79});
}
}});
}});
};
Effect.DropOut=function(_7d){
_7d=$(_7d);
var _7e={top:Element.getStyle(_7d,"top"),left:Element.getStyle(_7d,"left"),opacity:Element.getInlineOpacity(_7d)};
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){
with(Element){
makePositioned(_7f.effects[0].element);
}
},afterFinishInternal:function(_80){
with(Element){
[hide,undoPositioned].call(_80.effects[0].element);
setStyle(_80.effects[0].element,_7e);
}
}},arguments[1]||{}));
};
Effect.Shake=function(_81){
_81=$(_81);
var _82={top:Element.getStyle(_81,"top"),left:Element.getStyle(_81,"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){
with(Element){
undoPositioned(_88.element);
setStyle(_88.element,_82);
}
}});
}});
}});
}});
}});
}});
};
Effect.SlideDown=function(_89){
_89=$(_89);
Element.cleanWhitespace(_89);
var _8a=Element.getStyle(_89.firstChild,"bottom");
var _8b=Element.getDimensions(_89);
return new Effect.Scale(_89,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_8b.height,originalWidth:_8b.width},restoreAfterFinish:true,afterSetup:function(_8c){
with(Element){
makePositioned(_8c.element);
makePositioned(_8c.element.firstChild);
if(window.opera){
setStyle(_8c.element,{top:""});
}
makeClipping(_8c.element);
setStyle(_8c.element,{height:"0px"});
show(_89);
}
},afterUpdateInternal:function(_8d){
with(Element){
setStyle(_8d.element.firstChild,{bottom:(_8d.dims[0]-_8d.element.clientHeight)+"px"});
}
},afterFinishInternal:function(_8e){
with(Element){
undoClipping(_8e.element);
if(/MSIE/.test(navigator.userAgent)){
undoPositioned(_8e.element);
undoPositioned(_8e.element.firstChild);
}else{
undoPositioned(_8e.element.firstChild);
undoPositioned(_8e.element);
}
setStyle(_8e.element.firstChild,{bottom:_8a});
}
}},arguments[1]||{}));
};
Effect.SlideUp=function(_8f){
_8f=$(_8f);
Element.cleanWhitespace(_8f);
var _90=Element.getStyle(_8f.firstChild,"bottom");
return new Effect.Scale(_8f,0,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_91){
with(Element){
makePositioned(_91.element);
makePositioned(_91.element.firstChild);
if(window.opera){
setStyle(_91.element,{top:""});
}
makeClipping(_91.element);
show(_8f);
}
},afterUpdateInternal:function(_92){
with(Element){
setStyle(_92.element.firstChild,{bottom:(_92.dims[0]-_92.element.clientHeight)+"px"});
}
},afterFinishInternal:function(_93){
with(Element){
[hide,undoClipping].call(_93.element);
undoPositioned(_93.element.firstChild);
undoPositioned(_93.element);
setStyle(_93.element.firstChild,{bottom:_90});
}
}},arguments[1]||{}));
};
Effect.Squish=function(_94){
return new Effect.Scale(_94,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(_95){
with(Element){
makeClipping(_95.element);
}
},afterFinishInternal:function(_96){
with(Element){
hide(_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:Element.getInlineOpacity(_97)};
var _9a=Element.getDimensions(_97);
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){
with(Element){
hide(_9f.element);
makeClipping(_9f.element);
makePositioned(_9f.element);
}
},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){
with(Element){
setStyle(_a1.effects[0].element,{height:"0px"});
show(_a1.effects[0].element);
}
},afterFinishInternal:function(_a2){
with(Element){
[undoClipping,undoPositioned].call(_a2.effects[0].element);
setStyle(_a2.effects[0].element,_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:Element.getInlineOpacity(_a3)};
var _a6=Element.getDimensions(_a3);
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){
with(Element){
[makePositioned,makeClipping].call(_a9.effects[0].element);
}
},afterFinishInternal:function(_aa){
with(Element){
[hide,undoClipping,undoPositioned].call(_aa.effects[0].element);
setStyle(_aa.effects[0].element,_a5);
}
}},_a4));
};
Effect.Pulsate=function(_ab){
_ab=$(_ab);
var _ac=arguments[1]||{};
var _ad=Element.getInlineOpacity(_ab);
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){
Element.setStyle(_b1.element,{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){
with(Element){
[hide,undoClipping].call(_b5.element);
setStyle(_b5.element,_b3);
}
}});
}},arguments[1]||{}));
};
if(Element.Methods){
Element.Methods.visualEffect=function(_b6,_b7,_b8){
s=_b7.gsub(/_/,"-").camelize();
effect_class=s.charAt(0).toUpperCase()+s.substring(1);
new Effect[effect_class](_b6,_b8);
return $(_b6);
};
}
Effect.SlideRight=function(_b9){
_b9=$(_b9);
Element.cleanWhitespace(_b9);
var _ba=Element.getStyle(_b9.firstChild,"right");
var _bb=Element.getDimensions(_b9);
return new Effect.Scale(_b9,100,Object.extend({scaleContent:false,scaleY:false,scaleFrom:0,scaleMode:{originalHeight:_bb.height,originalWidth:_bb.width},restoreAfterFinish:true,afterSetup:function(_bc){
with(Element){
makePositioned(_bc.element);
makePositioned(_bc.element.firstChild);
if(window.opera){
setStyle(_bc.element,{top:""});
}
makeClipping(_bc.element);
setStyle(_bc.element,{width:"0px"});
show(_b9);
}
},afterUpdateInternal:function(_bd){
with(Element){
setStyle(_bd.element.firstChild,{right:(_bd.dims[0]-_bd.element.clientWidth)+"px"});
}
},afterFinishInternal:function(_be){
with(Element){
undoClipping(_be.element);
undoPositioned(_be.element.firstChild);
undoPositioned(_be.element);
setStyle(_be.element.firstChild,{right:_ba});
}
}},arguments[1]||{}));
};
Effect.SlideLeft=function(_bf){
_bf=$(_bf);
Element.cleanWhitespace(_bf);
var _c0=Element.getStyle(_bf.firstChild,"right");
return new Effect.Scale(_bf,0,Object.extend({scaleContent:false,scaleY:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_c1){
with(Element){
makePositioned(_c1.element);
makePositioned(_c1.element.firstChild);
if(window.opera){
setStyle(_c1.element,{top:""});
}
makeClipping(_c1.element);
show(_bf);
}
},afterUpdateInternal:function(_c2){
with(Element){
setStyle(_c2.element.firstChild,{right:(_c2.dims[0]-_c2.element.clientWidth)+"px"});
}
},afterFinishInternal:function(_c3){
with(Element){
[hide,undoClipping].call(_c3.element);
undoPositioned(_c3.element.firstChild);
undoPositioned(_c3.element);
setStyle(_c3.element.firstChild,{right:_c0});
}
}},arguments[1]||{}));
};
