// JavaScript Document
var first; 
//var sec; 
function nextNews() {
  first = $('news-wrap').getElementsByTagName('LI')[0]; 
  //sec = $('news-wrap').getElementsByTagName('LI')[1]; 
  new Effect.Morph(first, { duration: 1, fps: 24, transition: Effect.Transitions.sinoidal, 
      style: 'margin-top: -115px;', 
      afterFinish: function () {
        first.style.marginTop = 0;
        $('news-wrap').removeChild(first); 
        $('news-wrap').appendChild(first); 
      }
  }); 
}
function prevNews(no) {
  first = $('news-wrap').getElementsByTagName('LI')[0]; 
  var last = $('news-wrap').getElementsByTagName('LI')[no-1]; 
  
  // $('news-wrap').appendChild(first); 
  $('news-wrap').appendChild(last); 
 
//   $('news-wrap').removeChild(first); 
	$('news-wrap').removeChild(last); 
	
  new Effect.Morph(first, { duration: 1, fps: 24, transition: Effect.Transitions.sinoidal, 
      style: 'margin-top: 95px;', 
      afterFinish: function () {
        first.style.marginTop = 0; 
        $('news-wrap').removeChild(first); 
		//$('news-wrap').removeChild(sec); 
        $('news-wrap').appendChild(first); 
		//$('news-wrap').appendChild(sec); 
      }
  }); 
  
}
setInterval(nextNews, 4000)

/**
function nextNews(){
	var clientTween = new fx.ElementScroll($('news'), {duration: 400, transition: fx.sinoidal});
	clientTween.custom(0, -785);
}***/
