
var Onetime=Fx.Elements.extend({initialize:function(togglers,elements,options){this.parent(elements,options);togglers.each(function(tog,i){$(tog).addEvent('focus',function(){this.showAll()}.bind(this));$(tog).addEvent('click',function(){this.showAll()}.bind(this));},this);this.togglers=togglers;this.h={};this.w={};this.o={};this.elements.each(function(el,i){$(el).setStyles({'height':0,'overflow':'hidden'});},this);},showThis:function(i){this.h={'height':[this.elements[i].offsetHeight,this.elements[i].scrollHeight]};},showAll:function(){var objObjs={};var madeInactive=false;this.elements.each(function(el,i){this.showThis(i);objObjs[i]=Object.extend(this.h,Object.extend(this.o,this.w));},this);this.options.remove.each(function(el,i){el.setStyles({'overflow':'hidden'});new Fx.Style(el,'height').custom(el.scrollHeight,0).chain(function(){el.setStyles({'display':'none'})});}.bind(this));this.togglers.each(function(tog,i){tog.onclick=function(){};},this);return this.custom(objObjs);}});