Element.extend({
  shake : function(amt,begint,beginl){
    var al = beginl + amt;
	var bl = beginl - amt;
	var at = begint + amt;
	var bt = begint - amt;
	var l = this.effect('left',{duration:50});
	var t = this.effect('top',{duration:50});
	l.start(beginl,bl).chain(function(){
	  t.start(begint,bt)							
	  l.start(bl,al)
	}).chain(function(){
	  t.start(bt,at)
	  l.start(al,bl)
	}).chain(function(){
	  t.start(at,bt)
	  l.start(bl,al)
	}).chain(function(){
	  t.start(bt,at)
	  l.start(al,bl)
	}).chain(function(){
	  t.start(at,begint)
	  l.start(bl,beginl)
	}); 
  } 
});
function moveNews () {
  element = $('news');
  if (element.getStyle('top')!='-35px') {
    element.shake(5,-95,-98);
  }
}
	  
window.addEvent("domready", function() {
	$('news').addEvent('mouseenter', function(){
		$('news').effect('left', {duration: 150}).start('-38px');
		$('news').effect('top', {duration: 150}).start('-35px');
	});
	
	$('news').addEvent('mouseleave', function(){
		$('news').effect('left', {duration: 150}).start('-98px');
		$('news').effect('top', {duration: 150}).start('-95px');
	});
	moveNews.periodical(8000);
});