function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function makeScrollbar(content,scrollbar,handle,horizontal,ignoreMouse){
     var steps = (horizontal?(content.getScrollSize().x - content.getSize().x):(content.getScrollSize().y - content.getSize().y))
     var slider = new Slider(scrollbar, handle, {
        steps: steps,
        mode: (horizontal?'horizontal':'vertical'),
        snap: true,
        onChange: function(step){
            // Scrolls the content element in x or y direction.
            var x = (horizontal?step:0);
            var y = (horizontal?0:step);
            content.scrollTo(x,y);
        }
     }).set(0);
     if( !(ignoreMouse) ){
        // Scroll the content element when the mousewheel is used within the
        // content or the scrollbar element.
        $$(content, scrollbar).addEvent('mousewheel', function(e){
            e = new Event(e).stop();
            var step = slider.step - e.wheel * 30;
            slider.set(step);
        });
     }
     // Stops the handle dragging process when the mouse leaves the document body.
     $(document.body).addEvent('mouseleave',function(){slider.drag.stop()});

     return slider;
}


var menu_slider, logo_slider, menulist_fade, project_menu_slider ;



function left_menu_init() {
   logo_slider = new Fx.Slide('logoc',{
   });

   menu_slider = new Fx.Slide('menuc',{
                                         mode: 'horizontal'
   });


   menulist_fade = new Fx.Tween('menulist', {
                                                   property: 'opacity',
                                                   duration: 1800,
                                                   transition: Fx.Transitions.Quart.easeInOut,
                                                   link: 'chain'
   });

   project_menu_slider = new Fx.Slide('project_menu',{
                                                         wrapper : 'cwrapper',
                                                         duration : 500,
                                                         transition: Fx.Transitions.Sine.easeOut
   });
   project_menu_slider.hide();

   var onclickhide = new Fx.Slide('project_menu');
	$('project_head').addEvent('click', function(e){
		e = new Event(e);
		onclickhide.toggle();
		e.stop();
	});

   //ie fix for menu offset...
   if (Browser.Engine.trident) {
      $('menu_text').setStyle('margin-left','5px');
   }
}
