document.observe('dom:loaded',function(){var busy=false;$$('ul.content_musea').each(function(ul){ul.hide()});$$('ul#content_locaties > li.locatie > a').each(function(a){a.observe('click',function(evt){evt.stop();$$('ul#content_locaties > li.locatie > a').each(function(otherlink){if(otherlink!=a)otherlink.next('ul.content_musea').hide()});a.next('ul.content_musea').toggle()})});$$('li.scroll-up a').each(function(a){a.observe('click',function(evt){evt.stop();if(busy)return;var div=a.up('.musea-wrapper').down('.scroll-wrapper').down('.ul_content_left'),elements=div.getElementsByTagName('li'),top=div.getStyle('top');if(elements.length<4)return;if(top!=null)top=top.replace('px','');if(top==null||top==0)return;new Effect.Move(div,{x:0,y:76,beforeStart:function(){busy=true},afterFinish:function(){busy=false}})})});$$('li.scroll-down a').each(function(a){a.observe('click',function(evt){evt.stop();if(busy)return;var div=a.up('.musea-wrapper').down('.scroll-wrapper').down('.ul_content_left'),elements=div.getElementsByTagName('li'),top=div.getStyle('top'),offset=-76;if(elements.length<4)return;if(top!=null)top=top.replace('px','');if(top==((elements.length-3)*-76))offset=((elements.length-3)*76);new Effect.Move(div,{x:0,y:offset,beforeStart:function(){busy=true},afterFinish:function(){busy=false}})})})})
