Changeset 1360

Show
Ignore:
Timestamp:
04/19/08 03:48:18 (3 months ago)
Author:
cederberg@gmail.com
Message:

Added MochiKit.Visual.Transitions.parabolic (patch from Christoph Zwerschke).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/trunk/MochiKit/Visual.js

    r1359 r1360  
    475475    var decimals = pos - Math.floor(pos); 
    476476    return (Math.floor(pos) % 2 == 0) ? decimals : 1 - decimals; 
     477}; 
     478 
     479/** @id MochiKit.Visual.Transitions.parabolic */ 
     480MochiKit.Visual.Transitions.parabolic = function (pos) { 
     481   return pos * pos; 
    477482}; 
    478483 
  • mochikit/trunk/doc/html/MochiKit/Visual.html

    r1358 r1360  
    756756<td>A multi-period triangle curve transition with 5 pulses (by default) and ending with zero (0).</td> 
    757757</tr> 
     758<tr><td>parabolic</td> 
     759<td>A smooth parabolic transition.</td> 
     760</tr> 
    758761<tr><td>none</td> 
    759762<td>A fixed zero (0) value transition.</td> 
  • mochikit/trunk/doc/rst/MochiKit/Visual.rst

    r1358 r1360  
    597597    wobble      A multi-period sine curve transition with 4.5 wobbles and ending with one (1). 
    598598    pulse       A multi-period triangle curve transition with 5 pulses (by default) and ending with zero (0). 
     599    parabolic   A smooth parabolic transition. 
    599600    none        A fixed zero (0) value transition. 
    600601    full        A fixed one (1) value transition. 
  • mochikit/trunk/packed/MochiKit/MochiKit.js

    r1359 r1360  
    57985798return (Math.floor(pos)%2==0)?_61e:1-_61e; 
    57995799}; 
     5800MochiKit.Visual.Transitions.parabolic=function(pos){ 
     5801return pos*pos; 
     5802}; 
    58005803MochiKit.Visual.Transitions.none=function(pos){ 
    58015804return 0; 
     
    58145817this.effects=[]; 
    58155818this.interval=null; 
    5816 },add:function(_622){ 
    5817 var _623=new Date().getTime(); 
    5818 var _624=(typeof (_622.options.queue)=="string")?_622.options.queue:_622.options.queue.position; 
     5819},add:function(_623){ 
     5820var _624=new Date().getTime(); 
     5821var _625=(typeof (_623.options.queue)=="string")?_623.options.queue:_623.options.queue.position; 
    58195822var ma=MochiKit.Base.map; 
    5820 switch(_624){ 
     5823switch(_625){ 
    58215824case "front": 
    58225825ma(function(e){ 
    58235826if(e.state=="idle"){ 
    5824 e.startOn+=_622.finishOn; 
    5825 e.finishOn+=_622.finishOn; 
     5827e.startOn+=_623.finishOn; 
     5828e.finishOn+=_623.finishOn; 
    58265829} 
    58275830},this.effects); 
    58285831break; 
    58295832case "end": 
    5830 var _627
     5833var _628
    58315834ma(function(e){ 
    58325835var i=e.finishOn; 
    5833 if(i>=(_627||i)){ 
    5834 _627=i; 
     5836if(i>=(_628||i)){ 
     5837_628=i; 
    58355838} 
    58365839},this.effects); 
    5837 _623=_627||_623
     5840_624=_628||_624
    58385841break; 
    58395842case "break": 
     
    58435846break; 
    58445847} 
    5845 _622.startOn+=_623
    5846 _622.finishOn+=_623
    5847 if(!_622.options.queue.limit||this.effects.length<_622.options.queue.limit){ 
    5848 this.effects.push(_622); 
     5848_623.startOn+=_624
     5849_623.finishOn+=_624
     5850if(!_623.options.queue.limit||this.effects.length<_623.options.queue.limit){ 
     5851this.effects.push(_623); 
    58495852} 
    58505853if(!this.interval){ 
    58515854this.interval=this.startLoop(MochiKit.Base.bind(this.loop,this),40); 
    58525855} 
    5853 },startLoop:function(func,_62c){ 
    5854 return setInterval(func,_62c); 
    5855 },remove:function(_62d){ 
     5856},startLoop:function(func,_62d){ 
     5857return setInterval(func,_62d); 
     5858},remove:function(_62e){ 
    58565859this.effects=MochiKit.Base.filter(function(e){ 
    5857 return e!=_62d
     5860return e!=_62e
    58585861},this.effects); 
    58595862if(!this.effects.length){ 
     
    58615864this.interval=null; 
    58625865} 
    5863 },stopLoop:function(_62f){ 
    5864 clearInterval(_62f); 
     5866},stopLoop:function(_630){ 
     5867clearInterval(_630); 
    58655868},loop:function(){ 
    5866 var _630=new Date().getTime(); 
    5867 MochiKit.Base.map(function(_631){ 
    5868 _631.loop(_630); 
     5869var _631=new Date().getTime(); 
     5870MochiKit.Base.map(function(_632){ 
     5871_632.loop(_631); 
    58695872},this.effects); 
    58705873}}); 
    5871 MochiKit.Visual.Queues={instances:{},get:function(_632){ 
    5872 if(typeof (_632)!="string"){ 
    5873 return _632
    5874 } 
    5875 if(!this.instances[_632]){ 
    5876 this.instances[_632]=new MochiKit.Visual.ScopedQueue(); 
    5877 } 
    5878 return this.instances[_632]; 
     5874MochiKit.Visual.Queues={instances:{},get:function(_633){ 
     5875if(typeof (_633)!="string"){ 
     5876return _633
     5877} 
     5878if(!this.instances[_633]){ 
     5879this.instances[_633]=new MochiKit.Visual.ScopedQueue(); 
     5880} 
     5881return this.instances[_633]; 
    58795882}}; 
    58805883MochiKit.Visual.Queue=MochiKit.Visual.Queues.get("global"); 
     
    58825885MochiKit.Visual.Base=function(){ 
    58835886}; 
    5884 MochiKit.Visual.Base.prototype={__class__:MochiKit.Visual.Base,start:function(_633){ 
     5887MochiKit.Visual.Base.prototype={__class__:MochiKit.Visual.Base,start:function(_634){ 
    58855888var v=MochiKit.Visual; 
    5886 this.options=MochiKit.Base.setdefault(_633,v.DefaultOptions); 
     5889this.options=MochiKit.Base.setdefault(_634,v.DefaultOptions); 
    58875890this.currentFrame=0; 
    58885891this.state="idle"; 
     
    58935896v.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).add(this); 
    58945897} 
    5895 },loop:function(_635){ 
    5896 if(_635>=this.startOn){ 
    5897 if(_635>=this.finishOn){ 
     5898},loop:function(_636){ 
     5899if(_636>=this.startOn){ 
     5900if(_636>=this.finishOn){ 
    58985901return this.finalize(); 
    58995902} 
    5900 var pos=(_635-this.startOn)/(this.finishOn-this.startOn); 
    5901 var _637=Math.round(pos*this.options.fps*this.options.duration); 
    5902 if(_637>this.currentFrame){ 
     5903var pos=(_636-this.startOn)/(this.finishOn-this.startOn); 
     5904var _638=Math.round(pos*this.options.fps*this.options.duration); 
     5905if(_638>this.currentFrame){ 
    59035906this.render(pos); 
    5904 this.currentFrame=_637
     5907this.currentFrame=_638
    59055908} 
    59065909} 
     
    59355938},setup:function(){ 
    59365939},finish:function(){ 
    5937 },update:function(_639){ 
    5938 },event:function(_63a){ 
    5939 if(this.options[_63a+"Internal"]){ 
    5940 this.options[_63a+"Internal"](this); 
    5941 } 
    5942 if(this.options[_63a]){ 
    5943 this.options[_63a](this); 
     5940},update:function(_63a){ 
     5941},event:function(_63b){ 
     5942if(this.options[_63b+"Internal"]){ 
     5943this.options[_63b+"Internal"](this); 
     5944} 
     5945if(this.options[_63b]){ 
     5946this.options[_63b](this); 
    59445947} 
    59455948},repr:function(){ 
    59465949return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]"; 
    59475950}}; 
    5948 MochiKit.Visual.Parallel=function(_63b,_63c){ 
     5951MochiKit.Visual.Parallel=function(_63c,_63d){ 
    59495952var cls=arguments.callee; 
    59505953if(!(this instanceof cls)){ 
    5951 return new cls(_63b,_63c); 
    5952 } 
    5953 this.__init__(_63b,_63c); 
     5954return new cls(_63c,_63d); 
     5955} 
     5956this.__init__(_63c,_63d); 
    59545957}; 
    59555958MochiKit.Visual.Parallel.prototype=new MochiKit.Visual.Base(); 
    5956 MochiKit.Base.update(MochiKit.Visual.Parallel.prototype,{__class__:MochiKit.Visual.Parallel,__init__:function(_63e,_63f){ 
    5957 this.effects=_63e||[]; 
    5958 this.start(_63f); 
    5959 },update:function(_640){ 
    5960 MochiKit.Base.map(function(_641){ 
    5961 _641.render(_640); 
     5959MochiKit.Base.update(MochiKit.Visual.Parallel.prototype,{__class__:MochiKit.Visual.Parallel,__init__:function(_63f,_640){ 
     5960this.effects=_63f||[]; 
     5961this.start(_640); 
     5962},update:function(_641){ 
     5963MochiKit.Base.map(function(_642){ 
     5964_642.render(_641); 
    59625965},this.effects); 
    59635966},finish:function(){ 
    5964 MochiKit.Base.map(function(_642){ 
    5965 _642.finalize(); 
     5967MochiKit.Base.map(function(_643){ 
     5968_643.finalize(); 
    59665969},this.effects); 
    59675970}}); 
    5968 MochiKit.Visual.Opacity=function(_643,_644){ 
     5971MochiKit.Visual.Opacity=function(_644,_645){ 
    59695972var cls=arguments.callee; 
    59705973if(!(this instanceof cls)){ 
    5971 return new cls(_643,_644); 
    5972 } 
    5973 this.__init__(_643,_644); 
     5974return new cls(_644,_645); 
     5975} 
     5976this.__init__(_644,_645); 
    59745977}; 
    59755978MochiKit.Visual.Opacity.prototype=new MochiKit.Visual.Base(); 
    5976 MochiKit.Base.update(MochiKit.Visual.Opacity.prototype,{__class__:MochiKit.Visual.Opacity,__init__:function(_646,_647){ 
     5979MochiKit.Base.update(MochiKit.Visual.Opacity.prototype,{__class__:MochiKit.Visual.Opacity,__init__:function(_647,_648){ 
    59775980var b=MochiKit.Base; 
    59785981var s=MochiKit.Style; 
    5979 this.element=MochiKit.DOM.getElement(_646); 
     5982this.element=MochiKit.DOM.getElement(_647); 
    59805983if(this.element.currentStyle&&(!this.element.currentStyle.hasLayout)){ 
    59815984s.setStyle(this.element,{zoom:1}); 
    59825985} 
    5983 _647=b.update({from:s.getStyle(this.element,"opacity")||0,to:1},_647); 
    5984 this.start(_647); 
    5985 },update:function(_64a){ 
    5986 MochiKit.Style.setStyle(this.element,{"opacity":_64a}); 
     5986_648=b.update({from:s.getStyle(this.element,"opacity")||0,to:1},_648); 
     5987this.start(_648); 
     5988},update:function(_64b){ 
     5989MochiKit.Style.setStyle(this.element,{"opacity":_64b}); 
    59875990}}); 
    5988 MochiKit.Visual.Move=function(_64b,_64c){ 
     5991MochiKit.Visual.Move=function(_64c,_64d){ 
    59895992var cls=arguments.callee; 
    59905993if(!(this instanceof cls)){ 
    5991 return new cls(_64b,_64c); 
    5992 } 
    5993 this.__init__(_64b,_64c); 
     5994return new cls(_64c,_64d); 
     5995} 
     5996this.__init__(_64c,_64d); 
    59945997}; 
    59955998MochiKit.Visual.Move.prototype=new MochiKit.Visual.Base(); 
    5996 MochiKit.Base.update(MochiKit.Visual.Move.prototype,{__class__:MochiKit.Visual.Move,__init__:function(_64e,_64f){ 
    5997 this.element=MochiKit.DOM.getElement(_64e); 
    5998 _64f=MochiKit.Base.update({x:0,y:0,mode:"relative"},_64f); 
    5999 this.start(_64f); 
     5999MochiKit.Base.update(MochiKit.Visual.Move.prototype,{__class__:MochiKit.Visual.Move,__init__:function(_64f,_650){ 
     6000this.element=MochiKit.DOM.getElement(_64f); 
     6001_650=MochiKit.Base.update({x:0,y:0,mode:"relative"},_650); 
     6002this.start(_650); 
    60006003},setup:function(){ 
    60016004MochiKit.DOM.makePositioned(this.element); 
    60026005var s=this.element.style; 
    6003 var _651=s.visibility; 
    6004 var _652=s.display; 
    6005 if(_652=="none"){ 
     6006var _652=s.visibility; 
     6007var _653=s.display; 
     6008if(_653=="none"){ 
    60066009s.visibility="hidden"; 
    60076010s.display=""; 
     
    60136016this.options.y-=this.originalTop; 
    60146017} 
    6015 if(_652=="none"){ 
    6016 s.visibility=_651
    6017 s.display=_652
    6018 } 
    6019 },update:function(_653){ 
    6020 MochiKit.Style.setStyle(this.element,{left:Math.round(this.options.x*_653+this.originalLeft)+"px",top:Math.round(this.options.y*_653+this.originalTop)+"px"}); 
     6018if(_653=="none"){ 
     6019s.visibility=_652
     6020s.display=_653
     6021} 
     6022},update:function(_654){ 
     6023MochiKit.Style.setStyle(this.element,{left:Math.round(this.options.x*_654+this.originalLeft)+"px",top:Math.round(this.options.y*_654+this.originalTop)+"px"}); 
    60216024}}); 
    6022 MochiKit.Visual.Scale=function(_654,_655,_656){ 
     6025MochiKit.Visual.Scale=function(_655,_656,_657){ 
    60236026var cls=arguments.callee; 
    60246027if(!(this instanceof cls)){ 
    6025 return new cls(_654,_655,_656); 
    6026 } 
    6027 this.__init__(_654,_655,_656); 
     6028return new cls(_655,_656,_657); 
     6029} 
     6030this.__init__(_655,_656,_657); 
    60286031}; 
    60296032MochiKit.Visual.Scale.prototype=new MochiKit.Visual.Base(); 
    6030 MochiKit.Base.update(MochiKit.Visual.Scale.prototype,{__class__:MochiKit.Visual.Scale,__init__:function(_658,_659,_65a){ 
    6031 this.element=MochiKit.DOM.getElement(_658); 
    6032 _65a=MochiKit.Base.update({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_659},_65a); 
    6033 this.start(_65a); 
     6033MochiKit.Base.update(MochiKit.Visual.Scale.prototype,{__class__:MochiKit.Visual.Scale,__init__:function(_659,_65a,_65b){ 
     6034this.element=MochiKit.DOM.getElement(_659); 
     6035_65b=MochiKit.Base.update({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_65a},_65b); 
     6036this.start(_65b); 
    60346037},setup:function(){ 
    60356038this.restoreAfterFinish=this.options.restoreAfterFinish||false; 
     
    60436046this.originalTop=this.element.offsetTop; 
    60446047this.originalLeft=this.element.offsetLeft; 
    6045 var _65e=MochiKit.Style.getStyle(this.element,"font-size")||"100%"; 
    6046 ma(b(function(_65f){ 
    6047 if(_65e.indexOf(_65f)>0){ 
    6048 this.fontSize=parseFloat(_65e); 
    6049 this.fontSizeType=_65f
     6048var _65f=MochiKit.Style.getStyle(this.element,"font-size")||"100%"; 
     6049ma(b(function(_660){ 
     6050if(_65f.indexOf(_660)>0){ 
     6051this.fontSize=parseFloat(_65f); 
     6052this.fontSizeType=_660
    60506053} 
    60516054},this),["em","px","%"]); 
     
    60606063} 
    60616064} 
    6062 },update:function(_660){ 
    6063 var _661=(this.options.scaleFrom/100)+(this.factor*_660); 
     6065},update:function(_661){ 
     6066var _662=(this.options.scaleFrom/100)+(this.factor*_661); 
    60646067if(this.options.scaleContent&&this.fontSize){ 
    6065 MochiKit.Style.setStyle(this.element,{fontSize:this.fontSize*_661+this.fontSizeType}); 
    6066 } 
    6067 this.setDimensions(this.dims[0]*_661,this.dims[1]*_661); 
     6068MochiKit.Style.setStyle(this.element,{fontSize:this.fontSize*_662+this.fontSizeType}); 
     6069} 
     6070this.setDimensions(this.dims[0]*_662,this.dims[1]*_662); 
    60686071},finish:function(){ 
    60696072if(this.restoreAfterFinish){ 
    60706073MochiKit.Style.setStyle(this.element,this.originalStyle); 
    60716074} 
    6072 },setDimensions:function(_662,_663){ 
     6075},setDimensions:function(_663,_664){ 
    60736076var d={}; 
    60746077var r=Math.round; 
     
    60776080} 
    60786081if(this.options.scaleX){ 
    6079 d.width=r(_663)+"px"; 
     6082d.width=r(_664)+"px"; 
    60806083} 
    60816084if(this.options.scaleY){ 
    6082 d.height=r(_662)+"px"; 
     6085d.height=r(_663)+"px"; 
    60836086} 
    60846087if(this.options.scaleFromCenter){ 
    6085 var topd=(_662-this.dims[0])/2; 
    6086 var _667=(_663-this.dims[1])/2; 
     6088var topd=(_663-this.dims[0])/2; 
     6089var _668=(_664-this.dims[1])/2; 
    60876090if(this.elementPositioning=="absolute"){ 
    60886091if(this.options.scaleY){ 
     
    60906093} 
    60916094if(this.options.scaleX){ 
    6092 d.left=this.originalLeft-_667+"px"; 
     6095d.left=this.originalLeft-_668+"px"; 
    60936096} 
    60946097}else{ 
     
    60976100} 
    60986101if(this.options.scaleX){ 
    6099 d.left=-_667+"px"; 
     6102d.left=-_668+"px"; 
    61006103} 
    61016104} 
     
    61036106MochiKit.Style.setStyle(this.element,d); 
    61046107}}); 
    6105 MochiKit.Visual.Highlight=function(_668,_669){ 
     6108MochiKit.Visual.Highlight=function(_669,_66a){ 
    61066109var cls=arguments.callee; 
    61076110if(!(this instanceof cls)){ 
    6108 return new cls(_668,_669); 
    6109 } 
    6110 this.__init__(_668,_669); 
     6111return new cls(_669,_66a); 
     6112} 
     6113this.__init__(_669,_66a); 
    61116114}; 
    61126115MochiKit.Visual.Highlight.prototype=new MochiKit.Visual.Base(); 
    6113 MochiKit.Base.update(MochiKit.Visual.Highlight.prototype,{__class__:MochiKit.Visual.Highlight,__init__:function(_66b,_66c){ 
    6114 this.element=MochiKit.DOM.getElement(_66b); 
    6115 _66c=MochiKit.Base.update({startcolor:"#ffff99"},_66c); 
    6116 this.start(_66c); 
     6116MochiKit.Base.update(MochiKit.Visual.Highlight.prototype,{__class__:MochiKit.Visual.Highlight,__init__:function(_66c,_66d){ 
     6117this.element=MochiKit.DOM.getElement(_66c); 
     6118_66d=MochiKit.Base.update({startcolor:"#ffff99"},_66d); 
     6119this.start(_66d); 
    61176120},setup:function(){ 
    61186121var b=MochiKit.Base; 
     
    61366139return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i]; 
    61376140},this),[0,1,2]); 
    6138 },update:function(_671){ 
     6141},update:function(_672){ 
    61396142var m="#"; 
    61406143MochiKit.Base.map(MochiKit.Base.bind(function(i){ 
    6141 m+=MochiKit.Color.toColorPart(Math.round(this._base[i]+this._delta[i]*_671)); 
     6144m+=MochiKit.Color.toColorPart(Math.round(this._base[i]+this._delta[i]*_672)); 
    61426145},this),[0,1,2]); 
    61436146MochiKit.Style.setStyle(this.element,{backgroundColor:m}); 
     
    61456148MochiKit.Style.setStyle(this.element,MochiKit.Base.update(this.oldStyle,{backgroundColor:this.options.restorecolor})); 
    61466149}}); 
    6147 MochiKit.Visual.ScrollTo=function(_674,_675){ 
     6150MochiKit.Visual.ScrollTo=function(_675,_676){ 
    61486151var cls=arguments.callee; 
    61496152if(!(this instanceof cls)){ 
    6150 return new cls(_674,_675); 
    6151 } 
    6152 this.__init__(_674,_675); 
     6153return new cls(_675,_676); 
     6154} 
     6155this.__init__(_675,_676); 
    61536156}; 
    61546157MochiKit.Visual.ScrollTo.prototype=new MochiKit.Visual.Base(); 
    6155 MochiKit.Base.update(MochiKit.Visual.ScrollTo.prototype,{__class__:MochiKit.Visual.ScrollTo,__init__:function(_677,_678){ 
    6156 this.element=MochiKit.DOM.getElement(_677); 
    6157 this.start(_678); 
     6158MochiKit.Base.update(MochiKit.Visual.ScrollTo.prototype,{__class__:MochiKit.Visual.ScrollTo,__init__:function(_678,_679){ 
     6159this.element=MochiKit.DOM.getElement(_678); 
     6160this.start(_679); 
    61586161},setup:function(){ 
    61596162var p=MochiKit.Position; 
    61606163p.prepare(); 
    6161 var _67a=p.cumulativeOffset(this.element); 
     6164var _67b=p.cumulativeOffset(this.element); 
    61626165if(this.options.offset){ 
    6163 _67a.y+=this.options.offset; 
     6166_67b.y+=this.options.offset; 
    61646167} 
    61656168var max; 
     
    61766179} 
    61776180this.scrollStart=p.windowOffset.y; 
    6178 this.delta=(_67a.y>max?max:_67a.y)-this.scrollStart; 
    6179 },update:function(_67c){ 
     6181this.delta=(_67b.y>max?max:_67b.y)-this.scrollStart; 
     6182},update:function(_67d){ 
    61806183var p=MochiKit.Position; 
    61816184p.prepare(); 
    6182 window.scrollTo(p.windowOffset.x,this.scrollStart+(_67c*this.delta)); 
     6185window.scrollTo(p.windowOffset.x,this.scrollStart+(_67d*this.delta)); 
    61836186}}); 
    61846187MochiKit.Visual.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; 
    6185 MochiKit.Visual.Morph=function(_67e,_67f){ 
     6188MochiKit.Visual.Morph=function(_67f,_680){ 
    61866189var cls=arguments.callee; 
    61876190if(!(this instanceof cls)){ 
    6188 return new cls(_67e,_67f); 
    6189 } 
    6190 this.__init__(_67e,_67f); 
     6191return new cls(_67f,_680); 
     6192} 
     6193this.__init__(_67f,_680); 
    61916194}; 
    61926195MochiKit.Visual.Morph.prototype=new MochiKit.Visual.Base(); 
    6193 MochiKit.Base.update(MochiKit.Visual.Morph.prototype,{__class__:MochiKit.Visual.Morph,__init__:function(_681,_682){ 
    6194 this.element=MochiKit.DOM.getElement(_681); 
    6195 this.start(_682); 
     6196MochiKit.Base.update(MochiKit.Visual.Morph.prototype,{__class__:MochiKit.Visual.Morph,__init__:function(_682,_683){ 
     6197this.element=MochiKit.DOM.getElement(_682); 
     6198this.start(_683); 
    61966199},setup:function(){ 
    61976200var b=MochiKit.Base; 
    6198 var _684=this.options.style; 
     6201var _685=this.options.style; 
    61996202this.styleStart={}; 
    62006203this.styleEnd={}; 
    62016204this.units={}; 
    6202 var _685,unit; 
    6203 for(var s in _684){ 
    6204 _685=_684[s]; 
     6205var _686,unit; 
     6206for(var s in _685){ 
     6207_686=_685[s]; 
    62056208s=b.camelize(s); 
    6206 if(MochiKit.Visual.CSS_LENGTH.test(_685)){ 
    6207 var _688=_685.match(/^([\+\-]?[0-9\.]+)(.*)$/); 
    6208 _685=parseFloat(_688[1]); 
    6209 unit=(_688.length==3)?_688[2]:null; 
    6210 this.styleEnd[s]=_685
     6209if(MochiKit.Visual.CSS_LENGTH.test(_686)){ 
     6210var _689=_686.match(/^([\+\-]?[0-9\.]+)(.*)$/); 
     6211_686=parseFloat(_689[1]); 
     6212unit=(_689.length==3)?_689[2]:null; 
     6213this.styleEnd[s]=_686
    62116214this.units[s]=unit; 
    6212 _685=MochiKit.Style.getStyle(this.element,s); 
    6213 _688=_685.match(/^([\+\-]?[0-9\.]+)(.*)$/); 
    6214 _685=parseFloat(_688[1]); 
    6215 this.styleStart[s]=_685
     6215_686=MochiKit.Style.getStyle(this.element,s); 
     6216_689=_686.match(/^([\+\-]?[0-9\.]+)(.*)$/); 
     6217_686=parseFloat(_689[1]); 
     6218this.styleStart[s]=_686
    62166219}else{ 
    62176220var c=MochiKit.Color.Color; 
    6218 _685=c.fromString(_685); 
    6219 if(_685){ 
     6221_686=c.fromString(_686); 
     6222if(_686){ 
    62206223this.units[s]="color"; 
    6221 this.styleEnd[s]=_685.toHexString(); 
    6222 _685=MochiKit.Style.getStyle(this.element,s); 
    6223 this.styleStart[s]=c.fromString(_685).toHexString(); 
     6224this.styleEnd[s]=_686.toHexString(); 
     6225_686=MochiKit.Style.getStyle(this.element,s); 
     6226this.styleStart[s]=c.fromString(_686).toHexString(); 
    62246227this.styleStart[s]=b.map(b.bind(function(i){ 
    62256228return parseInt(this.styleStart[s].slice(i*2+1,i*2+3),16); 
     
    62316234} 
    62326235} 
    6233 },update:function(_68c){ 
    6234 var _68d
     6236},update:function(_68d){ 
     6237var _68e
    62356238for(var s in this.styleStart){ 
    62366239if(this.units[s]=="color"){ 
    62376240var m="#"; 
    6238 var _690=this.styleStart[s]; 
     6241var _691=this.styleStart[s]; 
    62396242var end=this.styleEnd[s]; 
    62406243MochiKit.Base.map(MochiKit.Base.bind(function(i){ 
    6241 m+=MochiKit.Color.toColorPart(Math.round(_690[i]+(end[i]-_690[i])*_68c)); 
     6244m+=MochiKit.Color.toColorPart(Math.round(_691[i]+(end[i]-_691[i])*_68d)); 
    62426245},this),[0,1,2]); 
    62436246this.element.style[s]=m; 
    62446247}else{ 
    6245 _68d=this.styleStart[s]+Math.round((this.styleEnd[s]-this.styleStart[s])*_68c*1000)/1000+this.units[s]; 
    6246 this.element.style[s]=_68d
     6248_68e=this.styleStart[s]+Math.round((this.styleEnd[s]-this.styleStart[s])*_68d*1000)/1000+this.units[s]; 
     6249this.element.style[s]=_68e
    62476250} 
    62486251} 
    62496252}}); 
    6250 MochiKit.Visual.fade=function(_693,_694){ 
     6253MochiKit.Visual.fade=function(_694,_695){ 
    62516254var s=MochiKit.Style; 
    6252 var _696=s.getStyle(_693,"opacity"); 
    6253 _694=MochiKit.Base.update({from:s.getStyle(_693,"opacity")||1,to:0,afterFinishInternal:function(_697){ 
    6254 if(_697.options.to!==0){ 
     6255var _697=s.getStyle(_694,"opacity"); 
     6256_695=MochiKit.Base.update({from:s.getStyle(_694,"opacity")||1,to:0,afterFinishInternal:function(_698){ 
     6257if(_698.options.to!==0){ 
    62556258return; 
    62566259} 
    6257 s.hideElement(_697.element); 
    6258 s.setStyle(_697.element,{"opacity":_696}); 
    6259 }},_694); 
    6260 return new MochiKit.Visual.Opacity(_693,_694); 
    6261 }; 
    6262 MochiKit.Visual.appear=function(_698,_699){ 
     6260s.hideElement(_698.element); 
     6261s.setStyle(_698.element,{"opacity":_697}); 
     6262}},_695); 
     6263return new MochiKit.Visual.Opacity(_694,_695); 
     6264}; 
     6265MochiKit.Visual.appear=function(_699,_69a){ 
    62636266var s=MochiKit.Style; 
    62646267var v=MochiKit.Visual; 
    6265 _699=MochiKit.Base.update({from:(s.getStyle(_698,"display")=="none"?0:s.getStyle(_698,"opacity")||0),to:1,afterFinishInternal:function(_69c){ 
    6266 v.forceRerendering(_69c.element); 
    6267 },beforeSetupInternal:function(_69d){ 
    6268 s.setStyle(_69d.element,{"opacity":_69d.options.from}); 
    6269 s.showElement(_69d.element); 
    6270 }},_699); 
    6271 return new v.Opacity(_698,_699); 
    6272 }; 
    6273 MochiKit.Visual.puff=function(_69e,_69f){ 
     6268_69a=MochiKit.Base.update({from:(s.getStyle(_699,"display")=="none"?0:s.getStyle(_699,"opacity")||0),to:1,afterFinishInternal:function(_69d){ 
     6269v.forceRerendering(_69d.element); 
     6270},beforeSetupInternal:function(_69e){ 
     6271s.setStyle(_69e.element,{"opacity":_69e.options.from}); 
     6272s.showElement(_69e.element); 
     6273}},_69a); 
     6274return new v.Opacity(_699,_69a); 
     6275}; 
     6276MochiKit.Visual.puff=function(_69f,_6a0){ 
    62746277var s=MochiKit.Style; 
    62756278var v=MochiKit.Visual; 
    6276 _69e=MochiKit.DOM.getElement(_69e); 
    6277 var _6a2={position:s.getStyle(_69e,"position"),top:_69e.style.top,left:_69e.style.left,width:_69e.style.width,height:_69e.style.height,opacity:s.getStyle(_69e,"opacity")}; 
    6278 _69f=MochiKit.Base.update({beforeSetupInternal:function(_6a3){ 
    6279 MochiKit.Position.absolutize(_6a3.effects[0].element); 
    6280 },afterFinishInternal:function(_6a4){ 
    6281 s.hideElement(_6a4.effects[0].element); 
    6282 s.setStyle(_6a4.effects[0].element,_6a2); 
    6283 },scaleContent:true,scaleFromCenter:true},_69f); 
    6284 return new v.Parallel([new v.Scale(_69e,200,{sync:true,scaleFromCenter:_69f.scaleFromCenter,scaleContent:_69f.scaleContent,restoreAfterFinish:true}),new v.Opacity(_69e,{sync:true,to:0})],_69f); 
    6285 }; 
    6286 MochiKit.Visual.blindUp=function(_6a5,_6a6){ 
     6279_69f=MochiKit.DOM.getElement(_69f); 
     6280var _6a3={position:s.getStyle(_69f,"position"),top:_69f.style.top,left:_69f.style.left,width:_69f.style.width,height:_69f.style.height,opacity:s.getStyle(_69f,"opacity")}; 
     6281_6a0=MochiKit.Base.update({beforeSetupInternal:function(_6a4){ 
     6282MochiKit.Position.absolutize(_6a4.effects[0].element); 
     6283},afterFinishInternal:function(_6a5){ 
     6284s.hideElement(_6a5.effects[0].element); 
     6285s.setStyle(_6a5.effects[0].element,_6a3); 
     6286},scaleContent:true,scaleFromCenter:true},_6a0); 
     6287return new v.Parallel([new v.Scale(_69f,200,{sync:true,scaleFromCenter:_6a0.scaleFromCenter,scaleContent:_6a0.scaleContent,restoreAfterFinish:true}),new v.Opacity(_69f,{sync:true,to:0})],_6a0); 
     6288}; 
     6289MochiKit.Visual.blindUp=function(_6a6,_6a7){ 
    62876290var d=MochiKit.DOM; 
    6288 _6a5=d.getElement(_6a5); 
    6289 var _6a8=d.makeClipping(_6a5); 
    6290 _6a6=MochiKit.Base.update({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_6a9){ 
    6291 MochiKit.Style.hideElement(_6a9.element); 
    6292 d.undoClipping(_6a9.element,_6a8); 
    6293 }},_6a6); 
    6294 return new MochiKit.Visual.Scale(_6a5,0,_6a6); 
    6295 }; 
    6296 MochiKit.Visual.blindDown=function(_6aa,_6ab){ 
     6291_6a6=d.getElement(_6a6); 
     6292var _6a9=d.makeClipping(_6a6); 
     6293_6a7=MochiKit.Base.update({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_6aa){ 
     6294MochiKit.Style.hideElement(_6aa.element); 
     6295d.undoClipping(_6aa.element,_6a9); 
     6296}},_6a7); 
     6297return new MochiKit.Visual.Scale(_6a6,0,_6a7); 
     6298}; 
     6299MochiKit.Visual.blindDown=function(_6ab,_6ac){ 
    62976300var d=MochiKit.DOM; 
    62986301var s=MochiKit.Style; 
    6299 _6aa=d.getElement(_6aa); 
    6300 var _6ae=s.getElementDimensions(_6aa); 
    6301 var _6af
    6302 _6ab=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_6ae.h,originalWidth:_6ae.w},restoreAfterFinish:true,afterSetupInternal:function(_6b0){ 
    6303 _6af=d.makeClipping(_6b0.element); 
    6304 s.setStyle(_6b0.element,{height:"0px"}); 
    6305 s.showElement(_6b0.element); 
    6306 },afterFinishInternal:function(_6b1){ 
    6307 d.undoClipping(_6b1.element,_6af); 
    6308 }},_6ab); 
    6309 return new MochiKit.Visual.Scale(_6aa,100,_6ab); 
    6310 }; 
    6311 MochiKit.Visual.switchOff=function(_6b2,_6b3){ 
     6302_6ab=d.getElement(_6ab); 
     6303var _6af=s.getElementDimensions(_6ab); 
     6304var _6b0
     6305_6ac=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_6af.h,originalWidth:_6af.w},restoreAfterFinish:true,afterSetupInternal:function(_6b1){ 
     6306_6b0=d.makeClipping(_6b1.element); 
     6307s.setStyle(_6b1.element,{height:"0px"}); 
     6308s.showElement(_6b1.element); 
     6309},afterFinishInternal:function(_6b2){ 
     6310d.undoClipping(_6b2.element,_6b0); 
     6311}},_6ac); 
     6312return new MochiKit.Visual.Scale(_6ab,100,_6ac); 
     6313}; 
     6314MochiKit.Visual.switchOff=function(_6b3,_6b4){ 
    63126315var d=MochiKit.DOM; 
    6313 _6b2=d.getElement(_6b2); 
    6314 var _6b5=MochiKit.Style.getStyle(_6b2,"opacity"); 
    6315 var _6b6
    6316 _6b3=MochiKit.Base.update({duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetupInternal:function(_6b7){ 
    6317 d.makePositioned(_6b7.element); 
    6318 _6b6=d.makeClipping(_6b7.element); 
    6319 },afterFinishInternal:function(_6b8){ 
    6320 MochiKit.Style.hideElement(_6b8.element); 
    6321 d.undoClipping(_6b8.element,_6b6); 
    6322 d.undoPositioned(_6b8.element); 
    6323 MochiKit.Style.setStyle(_6b8.element,{"opacity":_6b5}); 
    6324 }},_6b3); 
     6316_6b3=d.getElement(_6b3); 
     6317var _6b6=MochiKit.Style.getStyle(_6b3,"opacity"); 
     6318var _6b7
     6319_6b4=MochiKit.Base.update({duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetupInternal:function(_6b8){ 
     6320d.makePositioned(_6b8.element); 
     6321_6b7=d.makeClipping(_6b8.element); 
     6322},afterFinishInternal:function(_6b9){ 
     6323MochiKit.Style.hideElement(_6b9.element); 
     6324d.undoClipping(_6b9.element,_6b7); 
     6325d.undoPositioned(_6b9.element); 
     6326MochiKit.Style.setStyle(_6b9.element,{"opacity":_6b6}); 
     6327}},_6b4); 
    63256328var v=MochiKit.Visual; 
    6326 return new v.appear(_6b2,{duration:0.4,from:0,transition:v.Transitions.flicker,afterFinishInternal:function(_6ba){ 
    6327 new v.Scale(_6ba.element,1,_6b3); 
     6329return new v.appear(_6b3,{duration:0.4,from:0,transition:v.Transitions.flicker,afterFinishInternal:function(_6bb){ 
     6330new v.Scale(_6bb.element,1,_6b4); 
    63286331}}); 
    63296332}; 
    6330 MochiKit.Visual.dropOut=function(_6bb,_6bc){ 
     6333MochiKit.Visual.dropOut=function(_6bc,_6bd){ 
    63316334var d=MochiKit.DOM; 
    63326335var s=MochiKit.Style; 
    6333 _6bb=d.getElement(_6bb); 
    6334 var _6bf={top:s.getStyle(_6bb,"top"),left:s.getStyle(_6bb,"left"),opacity:s.getStyle(_6bb,"opacity")}; 
    6335 _6bc=MochiKit.Base.update({duration:0.5,distance:100,beforeSetupInternal:function(_6c0){ 
    6336 d.makePositioned(_6c0.effects[0].element); 
    6337 },afterFinishInternal:function(_6c1){ 
    6338 s.hideElement(_6c1.effects[0].element); 
    6339 d.undoPositioned(_6c1.effects[0].element); 
    6340 s.setStyle(_6c1.effects[0].element,_6bf); 
    6341 }},_6bc); 
     6336_6bc=d.getElement(_6bc); 
     6337var _6c0={top:s.getStyle(_6bc,"top"),left:s.getStyle(_6bc,"left"),opacity:s.getStyle(_6bc,"opacity")}; 
     6338_6bd=MochiKit.Base.update({duration:0.5,distance:100,beforeSetupInternal:function(_6c1){ 
     6339d.makePositioned(_6c1.effects[0].element); 
     6340},afterFinishInternal:function(_6c2){ 
     6341s.hideElement(_6c2.effects[0].element); 
     6342d.undoPositioned(_6c2.effects[0].element); 
     6343s.setStyle(_6c2.effects[0].element,_6c0); 
     6344}},_6bd); 
    63426345var v=MochiKit.Visual; 
    6343 return new v.Parallel([new v.Move(_6bb,{x:0,y:_6bc.distance,sync:true}),new v.Opacity(_6bb,{sync:true,to:0})],_6bc); 
    6344 }; 
    6345 MochiKit.Visual.shake=function(_6c3,_6c4){ 
     6346return new v.Parallel([new v.Move(_6bc,{x:0,y:_6bd.distance,sync:true}),new v.Opacity(_6bc,{sync:true,to:0})],_6bd); 
     6347}; 
     6348MochiKit.Visual.shake=function(_6c4,_6c5){ 
    63466349var d=MochiKit.DOM; 
    63476350var v=MochiKit.Visual; 
    63486351var s=MochiKit.Style; 
    6349 _6c3=d.getElement(_6c3); 
    6350 var _6c8={top:s.getStyle(_6c3,"top"),left:s.getStyle(_6c3,"left")}; 
    6351 _6c4=MochiKit.Base.update({x:-20,y:0,duration:0.05,afterFinishInternal:function(_6c9){ 
    6352 d.undoPositioned(_6c9.element); 
    6353 s.setStyle(_6c9.element,_6c8); 
    6354 }},_6c4); 
    6355 return new v.Move(_6c3,{x:20,y:0,duration:0.05,afterFinishInternal:function(_6ca){ 
    6356 new v.Move(_6ca.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_6cb){ 
    6357 new v.Move(_6cb.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_6cc){ 
    6358 new v.Move(_6cc.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_6cd){ 
    6359 new v.Move(_6cd.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_6ce){ 
    6360 new v.Move(_6ce.element,_6c4); 
     6352_6c4=d.getElement(_6c4); 
     6353var _6c9={top:s.getStyle(_6c4,"top"),left:s.getStyle(_6c4,"left")}; 
     6354_6c5=MochiKit.Base.update({x:-20,y:0,duration:0.05,afterFinishInternal:function(_6ca){ 
     6355d.undoPositioned(_6ca.element); 
     6356s.setStyle(_6ca.element,_6c9); 
     6357}},_6c5); 
     6358return new v.Move(_6c4,{x:20,y:0,duration:0.05,afterFinishInternal:function(_6cb){ 
     6359new v.Move(_6cb.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_6cc){ 
     6360new v.Move(_6cc.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_6cd){ 
     6361new v.Move(_6cd.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_6ce){ 
     6362new v.Move(_6ce.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_6cf){ 
     6363new v.Move(_6cf.element,_6c5); 
    63616364}}); 
    63626365}}); 
     
    63656368}}); 
    63666369}; 
    6367 MochiKit.Visual.slideDown=function(_6cf,_6d0){ 
     6370MochiKit.Visual.slideDown=function(_6d0,_6d1){ 
    63686371var d=MochiKit.DOM; 
    63696372var b=MochiKit.Base; 
    63706373var s=MochiKit.Style; 
    6371 _6cf=d.getElement(_6cf); 
    6372 if(!_6cf.firstChild){ 
     6374_6d0=d.getElement(_6d0); 
     6375if(!_6d0.firstChild){ 
    63736376throw "MochiKit.Visual.slideDown must be used on a element with a child"; 
    63746377} 
    6375 d.removeEmptyTextNodes(_6cf); 
    6376 var _6d4=s.getStyle(_6cf.firstChild,"bottom")||0; 
    6377 var _6d5=s.getElementDimensions(_6cf); 
    6378 var _6d6
    6379 _6d0=b.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_6d5.h,originalWidth:_6d5.w},restoreAfterFinish:true,afterSetupInternal:function(_6d7){ 
    6380 d.makePositioned(_6d7.element); 
    6381 d.makePositioned(_6d7.element.firstChild); 
     6378d.removeEmptyTextNodes(_6d0); 
     6379var _6d5=s.getStyle(_6d0.firstChild,"bottom")||0; 
     6380var _6d6=s.getElementDimensions(_6d0); 
     6381var _6d7
     6382_6d1=b.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_6d6.h,originalWidth:_6d6.w},restoreAfterFinish:true,afterSetupInternal:function(_6d8){ 
     6383d.makePositioned(_6d8.element); 
     6384d.makePositioned(_6d8.element.firstChild); 
    63826385if(/Opera/.test(navigator.userAgent)){ 
    6383 s.setStyle(_6d7.element,{top:""}); 
    6384 } 
    6385 _6d6=d.makeClipping(_6d7.element); 
    6386 s.setStyle(_6d7.element,{height:"0px"}); 
    6387 s.showElement(_6d7.element); 
    6388 },afterUpdateInternal:function(_6d8){ 
    6389 s.setStyle(_6d8.element.firstChild,{bottom:(_6d8.dims[0]-_6d8.element.clientHeight)+"px"}); 
    6390 },afterFinishInternal:function(_6d9){ 
    6391 d.undoClipping(_6d9.element,_6d6); 
     6386s.setStyle(_6d8.element,{top:""}); 
     6387} 
     6388_6d7=d.makeClipping(_6d8.element); 
     6389s.setStyle(_6d8.element,{height:"0px"}); 
     6390s.showElement(_6d8.element); 
     6391},afterUpdateInternal:function(_6d9){ 
     6392s.setStyle(_6d9.element.firstChild,{bottom:(_6d9.dims[0]-_6d9.element.clientHeight)+"px"}); 
     6393},afterFinishInternal:function(_6da){ 
     6394d.undoClipping(_6da.element,_6d7); 
    63926395if(/MSIE/.test(navigator.userAgent)){ 
    6393 d.undoPositioned(_6d9.element); 
    6394 d.undoPositioned(_6d9.element.firstChild); 
    6395 }else{ 
    6396 d.undoPositioned(_6d9.element.firstChild); 
    6397 d.undoPositioned(_6d9.element); 
    6398 } 
    6399 s.setStyle(_6d9.element.firstChild,{bottom:_6d4}); 
    6400 }},_6d0); 
    6401 return new MochiKit.Visual.Scale(_6cf,100,_6d0); 
    6402 }; 
    6403 MochiKit.Visual.slideUp=function(_6da,_6db){ 
     6396d.undoPositioned(_6da.element); 
     6397d.undoPositioned(_6da.element.firstChild); 
     6398}else{ 
     6399d.undoPositioned(_6da.element.firstChild); 
     6400d.undoPositioned(_6da.element); 
     6401} 
     6402s.setStyle(_6da.element.firstChild,{bottom:_6d5}); 
     6403}},_6d1); 
     6404return new MochiKit.Visual.Scale(_6d0,100,_6d1); 
     6405}; 
     6406MochiKit.Visual.slideUp=function(_6db,_6dc){ 
    64046407var d=MochiKit.DOM; 
    64056408var b=MochiKit.Base; 
    64066409var s=MochiKit.Style; 
    6407 _6da=d.getElement(_6da); 
    6408 if(!_6da.firstChild){ 
     6410_6db=d.getElement(_6db); 
     6411if(!_6db.firstChild){ 
    64096412throw "MochiKit.Visual.slideUp must be used on a element with a child"; 
    64106413} 
    6411 d.removeEmptyTextNodes(_6da); 
    6412 var _6df=s.getStyle(_6da.firstChild,"bottom"); 
    6413 var _6e0
    6414 _6db=b.update({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_6e1){ 
    6415 d.makePositioned(_6e1.element); 
    6416 d.makePositioned(_6e1.element.firstChild); 
     6414d.removeEmptyTextNodes(_6db); 
     6415var _6e0=s.getStyle(_6db.firstChild,"bottom"); 
     6416var _6e1
     6417_6dc=b.update({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_6e2){ 
     6418d.makePositioned(_6e2.element); 
     6419d.makePositioned(_6e2.element.firstChild); 
    64176420if(/Opera/.test(navigator.userAgent)){ 
    6418 s.setStyle(_6e1.element,{top:""}); 
    6419 } 
    6420 _6e0=d.makeClipping(_6e1.element); 
    6421 s.showElement(_6e1.element); 
    6422 },afterUpdateInternal:function(_6e2){ 
    6423 s.setStyle(_6e2.element.firstChild,{bottom:(_6e2.dims[0]-_6e2.element.clientHeight)+"px"}); 
    6424 },afterFinishInternal:function(_6e3){ 
    6425 s.hideElement(_6e3.element); 
    6426 d.undoClipping(_6e3.element,_6e0); 
    6427 d.undoPositioned(_6e3.element.firstChild); 
    6428 d.undoPositioned(_6e3.element); 
    6429 s.setStyle(_6e3.element.firstChild,{bottom:_6df}); 
    6430 }},_6db); 
    6431 return new MochiKit.Visual.Scale(_6da,0,_6db); 
    6432 }; 
    6433 MochiKit.Visual.squish=function(_6e4,_6e5){ 
     6421s.setStyle(_6e2.element,{top:""}); 
     6422} 
     6423_6e1=d.makeClipping(_6e2.element); 
     6424s.showElement(_6e2.element); 
     6425},afterUpdateInternal:function(_6e3){ 
     6426s.setStyle(_6e3.element.firstChild,{bottom:(_6e3.dims[0]-_6e3.element.clientHeight)+"px"}); 
     6427},afterFinishInternal:function(_6e4){ 
     6428s.hideElement(_6e4.element); 
     6429d.undoClipping(_6e4.element,_6e1); 
     6430d.undoPositioned(_6e4.element.firstChild); 
     6431d.undoPositioned(_6e4.element); 
     6432s.setStyle(_6e4.element.firstChild,{bottom:_6e0}); 
     6433}},_6dc); 
     6434return new MochiKit.Visual.Scale(_6db,0,_6dc); 
     6435}; 
     6436MochiKit.Visual.squish=function(_6e5,_6e6){ 
    64346437var d=MochiKit.DOM; 
    64356438var b=MochiKit.Base; 
    6436 var _6e8
    6437 _6e5=b.update({restoreAfterFinish:true,beforeSetupInternal:function(_6e9){ 
    6438 _6e8=d.makeClipping(_6e9.element); 
    6439 },afterFinishInternal:function(_6ea){ 
    6440 MochiKit.Style.hideElement(_6ea.element); 
    6441 d.undoClipping(_6ea.element,_6e8); 
    6442 }},_6e5); 
    6443 return new MochiKit.Visual.Scale(_6e4,/Opera/.test(navigator.userAgent)?1:0,_6e5); 
    6444 }; 
    6445 MochiKit.Visual.grow=function(_6eb,_6ec){ 
     6439var _6e9
     6440_6e6=b.update({restoreAfterFinish:true,beforeSetupInternal:function(_6ea){ 
     6441_6e9=d.makeClipping(_6ea.element); 
     6442},afterFinishInternal:function(_6eb){ 
     6443MochiKit.Style.hideElement(_6eb.element); 
     6444d.undoClipping(_6eb.element,_6e9); 
     6445}},_6e6); 
     6446return new MochiKit.Visual.Scale(_6e5,/Opera/.test(navigator.userAgent)?1:0,_6e6); 
     6447}; 
     6448MochiKit.Visual.grow=function(_6ec,_6ed){ 
    64466449var d=MochiKit.DOM; 
    64476450var v=MochiKit.Visual; 
    64486451var s=MochiKit.Style; 
    6449 _6eb=d.getElement(_6eb); 
    6450 _6ec=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.full,scaleContent:true,scaleFromCenter:false},_6ec); 
    6451 var _6f0={top:_6eb.style.top,left:_6eb.style.left,height:_6eb.style.height,width:_6eb.style.width,opacity:s.getStyle(_6eb,"opacity")}; 
    6452 var dims=s.getElementDimensions(_6eb); 
    6453 var _6f2,_6f3
    6454 var _6f4,_6f5
    6455 switch(_6ec.direction){ 
     6452_6ec=d.getElement(_6ec); 
     6453_6ed=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.full,scaleContent:true,scaleFromCenter:false},_6ed); 
     6454var _6f1={top:_6ec.style.top,left:_6ec.style.left,height:_6ec.style.height,width:_6ec.style.width,opacity:s.getStyle(_6ec,"opacity")}; 
     6455var dims=s.getElementDimensions(_6ec); 
     6456var _6f3,_6f4
     6457var _6f5,_6f6
     6458switch(_6ed.direction){ 
    64566459case "top-left": 
    6457 _6f2=_6f3=_6f4=_6f5=0; 
     6460_6f3=_6f4=_6f5=_6f6=0; 
    64586461break; 
    64596462case "top-right": 
    6460 _6f2=dims.w; 
    6461 _6f3=_6f5=0; 
    6462 _6f4=-dims.w; 
     6463_6f3=dims.w; 
     6464_6f4=_6f6=0; 
     6465_6f5=-dims.w; 
    64636466break; 
    64646467case "bottom-left": 
    6465 _6f2=_6f4=0; 
    6466 _6f3=dims.h; 
    6467 _6f5=-dims.h; 
     6468_6f3=_6f5=0; 
     6469_6f4=dims.h; 
     6470_6f6=-dims.h; 
    64686471break; 
    64696472case "bottom-right": 
    6470 _6f2=dims.w; 
    6471 _6f3=dims.h; 
    6472 _6f4=-dims.w; 
    6473 _6f5=-dims.h; 
     6473_6f3=dims.w; 
     6474_6f4=dims.h; 
     6475_6f5=-dims.w; 
     6476_6f6=-dims.h; 
    64746477break; 
    64756478case "center": 
    6476 _6f2=dims.w/2; 
    6477 _6f3=dims.h/2; 
    6478 _6f4=-dims.w/2; 
    6479 _6f5=-dims.h/2; 
     6479_6f3=dims.w/2; 
     6480_6f4=dims.h/2; 
     6481_6f5=-dims.w/2; 
     6482_6f6=-dims.h/2; 
    64806483break; 
    64816484} 
    6482 var _6f6=MochiKit.Base.update({beforeSetupInternal:function(_6f7){ 
    6483 s.setStyle(_6f7.effects[0].element,{height:"0px"}); 
    6484 s.showElement(_6f7.effects[0].element); 
    6485 },afterFinishInternal:function(_6f8){ 
    6486 d.undoClipping(_6f8.effects[0].element); 
    6487 d.undoPositioned(_6f8.effects[0].element); 
    6488 s.setStyle(_6f8.effects[0].element,_6f0); 
    6489 }},_6ec); 
    6490 return new v.Move(_6eb,{x:_6f2,y:_6f3,duration:0.01,beforeSetupInternal:function(_6f9){ 
    6491 s.hideElement(_6f9.element); 
    6492 d.makeClipping(_6f9.element); 
    6493 d.makePositioned(_6f9.element); 
    6494 },afterFinishInternal:function(_6fa){ 
    6495 new v.Parallel([new v.Opacity(_6fa.element,{sync:true,to:1,from:0,transition:_6ec.opacityTransition}),new v.Move(_6fa.element,{x:_6f4,y:_6f5,sync:true,transition:_6ec.moveTransition}),new v.Scale(_6fa.element,100,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,scaleFrom:/Opera/.test(navigator.userAgent)?1:0,transition:_6ec.scaleTransition,scaleContent:_6ec.scaleContent,scaleFromCenter:_6ec.scaleFromCenter,restoreAfterFinish:true})],_6f6); 
     6485var _6f7=MochiKit.Base.update({beforeSetupInternal:function(_6f8){ 
     6486s.setStyle(_6f8.effects[0].element,{height:"0px"}); 
     6487s.showElement(_6f8.effects[0].element); 
     6488},afterFinishInternal:function(_6f9){ 
     6489d.undoClipping(_6f9.effects[0].element); 
     6490d.undoPositioned(_6f9.effects[0].element); 
     6491s.setStyle(_6f9.effects[0].element,_6f1); 
     6492}},_6ed); 
     6493return new v.Move(_6ec,{x:_6f3,y:_6f4,duration:0.01,beforeSetupInternal:function(_6fa){ 
     6494s.hideElement(_6fa.element); 
     6495d.makeClipping(_6fa.element); 
     6496d.makePositioned(_6fa.element); 
     6497},afterFinishInternal:function(_6fb){ 
     6498new v.Parallel([new v.Opacity(_6fb.element,{sync:true,to:1,from:0,transition:_6ed.opacityTransition}),new v.Move(_6fb.element,{x:_6f5,y:_6f6,sync:true,transition:_6ed.moveTransition}),new v.Scale(_6fb.element,100,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,scaleFrom:/Opera/.test(navigator.userAgent)?1:0,transition:_6ed.scaleTransition,scaleContent:_6ed.scaleContent,scaleFromCenter:_6ed.scaleFromCenter,restoreAfterFinish:true})],_6f7); 
    64966499}}); 
    64976500}; 
    6498 MochiKit.Visual.shrink=function(_6fb,_6fc){ 
     6501MochiKit.Visual.shrink=function(_6fc,_6fd){ 
    64996502var d=MochiKit.DOM; 
    65006503var v=MochiKit.Visual; 
    65016504var s=MochiKit.Style; 
    6502 _6fb=d.getElement(_6fb); 
    6503 _6fc=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.none,scaleContent:true,scaleFromCenter:false},_6fc); 
    6504 var _700={top:_6fb.style.top,left:_6fb.style.left,height:_6fb.style.height,width:_6fb.style.width,opacity:s.getStyle(_6fb,"opacity")}; 
    6505 var dims=s.getElementDimensions(_6fb); 
    6506 var _702,_703
    6507 switch(_6fc.direction){ 
     6505_6fc=d.getElement(_6fc); 
     6506_6fd=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.none,scaleContent:true,scaleFromCenter:false},_6fd); 
     6507var _701={top:_6fc.style.top,left:_6fc.style.left,height:_6fc.style.height,width:_6fc.style.width,opacity:s.getStyle(_6fc,"opacity")}; 
     6508var dims=s.getElementDimensions(_6fc); 
     6509var _703,_704
     6510switch(_6fd.direction){ 
    65086511case "top-left": 
    6509 _702=_703=0; 
     6512_703=_704=0; 
    65106513break; 
    65116514case "top-right": 
    6512 _702=dims.w; 
    6513 _703=0; 
     6515_703=dims.w; 
     6516_704=0; 
    65146517break; 
    65156518case "bottom-left": 
    6516 _702=0; 
    6517 _703=dims.h; 
     6519_703=0; 
     6520_704=dims.h; 
    65186521break; 
    65196522case "bottom-right": 
    6520 _702=dims.w; 
    6521 _703=dims.h; 
     6523_703=dims.w; 
     6524_704=dims.h; 
    65226525break; 
    65236526case "center": 
    6524 _702=dims.w/2; 
    6525 _703=dims.h/2; 
     6527_703=dims.w/2; 
     6528_704=dims.h/2; 
    65266529break; 
    65276530} 
    6528 var _704
    6529 var _705=MochiKit.Base.update({beforeStartInternal:function(_706){ 
    6530 _704=d.makePositioned(_706.effects[0].element); 
    6531 d.makeClipping(_706.effects[0].element); 
    6532 },afterFinishInternal:function(_707){ 
    6533 s.hideElement(_707.effects[0].element); 
    6534 d.undoClipping(_707.effects[0].element,_704); 
    6535 d.undoPositioned(_707.effects[0].element); 
    6536 s.setStyle(_707.effects[0].element,_700); 
    6537 }},_6fc); 
    6538 return new v.Parallel([new v.Opacity(_6fb,{sync:true,to:0,from:1,transition:_6fc.opacityTransition}),new v.Scale(_6fb,/Opera/.test(navigator.userAgent)?1:0,{sync:true,transition:_6fc.scaleTransition,scaleContent:_6fc.scaleContent,scaleFromCenter:_6fc.scaleFromCenter,restoreAfterFinish:true}),new v.Move(_6fb,{x:_702,y:_703,sync:true,transition:_6fc.moveTransition})],_705