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 postit () {
  element = $('references');
  if (element.getStyle('top')!='-118px') {
    element.shake(5,0,120);
  }
}
	  
window.addEvent("domready", function() {
	$('references').addEvent('mouseenter', function(){
		$('references').effect('left', {duration: 150}).start('120px');
		$('references').effect('top', {duration: 150}).start('-118px');
	});
	
	$('references').addEvent('mouseleave', function(){
		$('references').effect('left', {duration: 150}).start('120px');
		$('references').effect('top', {duration: 150}).start('0px');
	});
	postit.periodical(2000);
});