//INITILIALISATION DES SCRIPTS UTILISANT JQUERY

function init() {
   // alert('init')
	comportementPopUp('ul#ac_menuniv1 li#catalogue','div.popUpCatalogue');
    // Ajouter une classe alternative pour les rangées impaires de tableau de contenu (typo3)
	$("table.contenttable tbody tr:odd").addClass("odd");
}

function comportementPopUp (objAct, popUp) {
	    //alert('comportementPopUp')
        $(popUp).fadeOut(0);
		$(objAct).hover(function() {
			//$('body').append('ho:');
			// if the element is currently being animated (to fadeOut)...
		 	if ($(popUp).is(':animated')) {
				//$('body').append('isanim<br/>');
				// ...stop the current animation, and fade it to 1 from current position
				$(popUp).stop().fadeTo(500, 1);
			} else {
				//$('body').append('isnot<br/>');
				$(popUp).fadeIn(500);
			}
			return false
		}, function () {
			//$('body').append('notho:');
			if ($(popUp).is(':animated')) {
				//$('body').append('isanim<br/>');
				$(popUp).stop().fadeTo(500, 0);
			} else {
				//$('body').append('isnot<br/>');
				$(popUp).fadeOut(500);
			}
			return false
		});
}

$(document).ready(function() {init();});
