if(typeof SLIDER_COROLS==='undefined'){var SLIDER_COROLS={item:'#fff',active:'#f6f9cc'}}function runSliders(){var ID_SLIDER_PREFF='slider-id';var show=function(el){el['full']=true;el.slider.slideIn();if(SLIDER_COROLS.active)el.bg.start({'background-color':SLIDER_COROLS.active});el.addClass('active')};var hide=function(el){el['full']=false;el.slider.slideOut();if(SLIDER_COROLS.item)el.bg.start({'background-color':SLIDER_COROLS.item});el.removeClass('active')};var toggling=function(el){el['full']?hide(el):show(el)};var items=$$('div[name=slider-block-contaner]');var mslider=function(cont,selector,options){var sliders=[];cont.getElements(selector).each(function(item,key){if(key!==0)options={};sliders.push(new Fx.Slide(item.setStyle('display','block'),options).hide())});this.slideOut=function(){sliders.each(function(s){s.slideOut()})};this.slideIn=function(){sliders.each(function(s){s.slideIn()})};this.hide=function(){sliders.each(function(s){s.hide()})};this.show=function(){sliders.each(function(s){s.show()})}};items.each(function(item){var onclick=function(e){new Event(e).stop();items.each(function(el){if(el!==item)hide(el)});toggling(item)};item['full']=false;item.slider=new mslider(item,'div[name=slider-block-item]',{duration:500,onComplete:function(){if(item['full'])location.replace(location.pathname+"#"+item.id.substring(ID_SLIDER_PREFF.length))}});if(SLIDER_COROLS.item){item.bg=new Fx.Styles(item.setStyle('background-color',SLIDER_COROLS.item))}item.getElements('a[class=xhr]').each(function(elem){elem.addEvent('click',onclick)})});if(location.hash){var el=$(ID_SLIDER_PREFF+location.hash.substring(1));if(el){show(el);el.scrollIntoView(true)}}};App.addOnDomReady(runSliders);
