 function init_portfoliosmenu()
 {
   var div      = document.getElementById('portfoliosmenu');
   if(div)
   {
   var tw = new Tween(div.style, 'height', Tween.strongEaseInOut, 0, 106, .5, 'px');
   div.startf = function ()
  	        {
  	           div.style.height='0px';
                   div.style.overflow = 'hidden';
  	           div.style.display = 'block';
  	           tw.onMotionFinished = function(){ div.style.overflow = 'visible'; tw.onMotionFinished = undefined; }
  	           tw.continueTo(106, .5);
  	        }
   div.endf  = function ()
  	       {
                   div.style.overflow = 'hidden';
  	           tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	           tw.continueTo(0, .5);
  	       }
   }
}
 function init_menubacking()
 {
   var div      = document.getElementById('menubacking');
   if(div)
   {
   var tw = new Tween(div.style, 'height', Tween.regularEaseInOut, 0, 118, .5, 'px');
   div.startf = function ()
  	        {
  	           div.style.height='0px';
                   div.style.overflow = 'hidden';
  	           div.style.display = 'block';
  	           tw.onMotionFinished = function(){ div.style.overflow = 'visible'; tw.onMotionFinished = undefined; }
  	           tw.continueTo(118, .5);
  	        }
   div.endf  = function ()
  	       {
                   div.style.overflow = 'hidden';
  	           tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
  	           tw.continueTo(0, .5);
  	       }
   }
}

function init_tweens()
{
 init_menubacking();
 init_portfoliosmenu();
}
