	jQuery.footnotes = function () {


		//$('.footnoteBox').hide();
		
		$('div.footnote').parent().append('<div id="footnotesBox"><\/div>')
		
		$('div.footnote').each(
			function(){
				id = $(this).find('p sup a').attr('id');
				newId = id.replace(/\./,"-")+'_box';
				
				obj = $(this).clone().appendTo('#footnotesBox').attr('id',newId).addClass('footnoteBox').addClass('basicbg0').removeClass('footnote').hide();//;
				$(obj).find('sup').remove();
				$(obj).find('p').replaceWith('<div class="boxcontent">'+$(obj).find('p').html()+'<\/div>');
			}
		);
		
		$('sup').each(function(){
			$(this).addClass('fakelinkBlue');
			obj = $(this).find('a');
//			if($(this).attr('id')){
				$(obj).hover(							  
					function(){
						id=$(this).attr('href');
						id = id.replace(/\./,"-")+"_box";
						$(id).css({top:($(this).position().top-1)+'px',left:($(this).position().left-1)+'px'}).fadeIn('slow')				
					},
					function(){				
					}
				);
//			}
			
		});


		$('.footnoteBox').hover(
			function(){
			},
			function(){
				$(this).fadeOut('flow');
			}
		);
		
	}
	
