 function init_magmenu()
 {
 	var div      = document.getElementById('magmenu');
        if(div)
        {
 	var tw = new OpacityTween(div,Tween.regularEaseInOut,0,100,.3);
 	div.startf = function ()
  	             {
                        div.style.overflow = 'visible';
  	                tw.onMotionFinished = undefined;
  	                tw.continueTo(100, .3);
  	                div.style.display = 'block';
                        
  	             }
        div.endf   = function ()
  	             {
                        tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	                tw.continueTo(0, .3);
  	             }
        }
 }
 function init_maghoverbg()
 {
 	var div      = document.getElementById('maghoverbg');
        if(div)
        {
 	var tw = new OpacityTween(div,Tween.regularEaseInOut,0,100,.3);
 	div.startf = function ()
  	             {
                        div.style.overflow = 'visible';
  	                tw.onMotionFinished = undefined;
  	                tw.continueTo(100, .3);
  	                div.style.display = 'block';
                        
  	             }
        div.endf   = function ()
  	             {
                        tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	                tw.continueTo(0, .3);
  	             }
        }
 }
 function init_projectmenu()
 {
 	var div      = document.getElementById('projectmenu');
        if(div)
        {
 	var tw = new OpacityTween(div,Tween.regularEaseInOut,0,100,.3);
 	div.startf = function ()
  	             {
                        div.style.overflow = 'visible';
  	                tw.onMotionFinished = undefined;
  	                tw.continueTo(100, .3);
  	                div.style.display = 'block';
                        
  	             }
        div.endf   = function ()
  	             {
                        tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	                tw.continueTo(0, .3);
  	             }
        }
 }
 function init_projecthoverbg()
 {
 	var div      = document.getElementById('projecthoverbg');
        if(div)
        {
 	var tw = new OpacityTween(div,Tween.regularEaseInOut,0,100,.3);
 	div.startf = function ()
  	             {
                        div.style.overflow = 'visible';
  	                tw.onMotionFinished = undefined;
  	                tw.continueTo(100, .3);
  	                div.style.display = 'block';
                        
  	             }
        div.endf   = function ()
  	             {
                        tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	                tw.continueTo(0, .3);
  	             }
        }
 }
 function init_aboutmenu()
 {
 	var div      = document.getElementById('aboutmenu');
        if(div)
        {
 	var tw = new OpacityTween(div,Tween.regularEaseInOut,0,100,.3);
 	div.startf = function ()
  	             {
                        div.style.overflow = 'visible';
  	                tw.onMotionFinished = undefined;
  	                tw.continueTo(100, .3);
  	                div.style.display = 'block';
                        
  	             }
        div.endf   = function ()
  	             {
                        tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	                tw.continueTo(0, .3);
  	             }
        }
 }
 function init_abouthoverbg()
 {
 	var div      = document.getElementById('abouthoverbg');
        if(div)
        {
 	var tw = new OpacityTween(div,Tween.regularEaseInOut,0,100,.3);
 	div.startf = function ()
  	             {
                        div.style.overflow = 'visible';
  	                tw.onMotionFinished = undefined;
  	                tw.continueTo(100, .3);
  	                div.style.display = 'block';
                        
  	             }
        div.endf   = function ()
  	             {
                        tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	                tw.continueTo(0, .3);
  	             }
        }
 }

function init_tweens()
{
 init_abouthoverbg();
 init_aboutmenu();
 init_projecthoverbg();
 init_projectmenu();
 init_maghoverbg();
 init_magmenu();
}
