onDomReady(function(){$el('hmenu','img.hover_img').forEach(function(item,i){var myimages=new Array()
myimages[i]=new Image()
myimages[i].src=item.src.replace(".png","_hover.png");addEvent(item,'mouseover',function(){this.src=(this.src.indexOf("_hover")==-1)?this.src.replace(".png","_hover.png"):this.src;});addEvent(item,'mouseout',function(){this.src=(this.src.indexOf("_hover")!=-1)?this.src.replace("_hover.png",".png"):this.src;});});var monthBlock=$css('li.month_block');var eventList=$css('div.event_list');var oFx=[];eventList.forEach(function(item,index){setStyles(item,{'overflow':'hidden'});if(!hasClass(item,'open'))setStyles(item,{'height':'0px'});oFx[index]=new Fx;oFx[index].initialize(item,{duration:600,curve:['easeInOut',4]});});monthBlock.forEach(function(item,i){addEvent($el(item,'a.month_link')[0],'click',function(event,i){stopEvent(event);reverseClass(this,'arrow_close','arrow_open');removeClass(eventList[i],'close');var to=firstNodeChild(eventList[i]).offsetHeight;if(hasClass(eventList[i],'fx_open')){removeClass(eventList[i],'fx_open');addClass(eventList[i],'fx_close');oFx[i].start({'height':[to,0]});}else{removeClass(eventList[i],'fx_close');addClass(eventList[i],'fx_open');oFx[i].start({'height':[0,to]});}
eventList.forEach(function(other,j){if(i!=j&&(hasClass(other,'fx_open')||hasClass(other,'open'))){removeClass(eventList[j],'fx_open');addClass(eventList[j],'fx_close');reverseClass($el(monthBlock[j],'a.month_link')[0],'arrow_close','arrow_open');var from=firstNodeChild(other).offsetHeight;oFx[j].start({'height':[from,0]});}});},i);});});
