$(function(){ // Appelle la fonction seulement quand la page est loadée, équivalent du init
	$(".glossaryLink").hover(recupLien);	
	
});

function recupLien(){
	url = $(this).attr('href');
	defId = url.match(/([0-9]+)/);
	var bigJack = defId[1];

	$(this).simpletip({ 
	
		content: 'Consultez la définition dans le glossaire médical.', 
		fixed: true, 
		position: 'top', 
		showEffect: 'fade', 
		hideEffect: 'fade',
		showTime: '300',
		hideTime: '600',
		
		onBeforeShow: function(){ // Note this refers to the API in the callback function
			this.load('http://www.neurochirurgie-cedres.com/wp-content/themes/Neurochirurgie/js/content.php?id='+bigJack); 
		} 		
	});
	
};
