function changeLinkToFade( el ) {
  if (typeof(el) != 'object') el = $(el);
  // copy the href
  el.link = el.href;
  el.href='javascript:';
  Event.observe(el,'click',function(event) { 
    new Effect.Fade($('page'),{
    	afterFinish:function() { 
	    	// fix the back button (make page Appear after changing the page) 
    		new Effect.Appear($('page'),{duration: 3});
    		// change the location 
    		window.location = el.link; 
    		return false;
   		}
   	});
    return false;
  });
}
function initiateLinkToFade() {
	$$('a.fade').each( function( el ) { changeLinkToFade( el ); } );
}
