function menu_horizon() {
	$("#navPrincipale ol>li>ul").hide();
	$("#navPrincipale ol>li").mouseover(function(){
		$(this).addClass("ouvert").children("ul").show();
		}).mouseout(function(){
      $(this).removeClass("ouvert").children("ul").hide();
	})
}
function slider_home() {
	$(".actu.mixte .slider").hover(function() {
        $(this).stop().animate({top:'132px'},{queue:false,duration:300}).addClass("ouvert");
    }, function() {
        $(this).stop().animate({top:'268px'},{queue:false,duration:300}).removeClass("ouvert");
    });
  $(".heroBiodiv .slider").hover(function() {
        $(this).stop().animate({top:'80px'},{queue:false,duration:300}).addClass("ouvert");
    }, function() {
        $(this).stop().animate({top:'154px'},{queue:false,duration:300}).removeClass("ouvert");
    });
  $(".labelliserProjet .slider").hover(function() {
        $(this).stop().animate({top:'80px'},{queue:false,duration:300}).addClass("ouvert");
    }, function() {
        $(this).stop().animate({top:'154px'},{queue:false,duration:300}).removeClass("ouvert");
    });
  $(".actionprio .slider").hover(function() {
        $(this).stop().animate({top:'60px'},{queue:false,duration:300}).addClass("ouvert");
    }, function() {
        $(this).stop().animate({top:'154px'},{queue:false,duration:300}).removeClass("ouvert");
    });
  $(".video .slider").hover(function() {
        $(this).stop().animate({top:'120px'},{queue:false,duration:300}).addClass("ouvert");
    }, function() {
        $(this).stop().animate({top:'190px'},{queue:false,duration:300}).removeClass("ouvert");
    });
  $(".histoiresBiodiv .slider").hover(function() {
        $(this).stop().animate({marginRight:'28px'},{queue:false,duration:300}).addClass("ouvert");
    }, function() {
        $(this).stop().animate({marginRight:'227px'},{queue:false,duration:300}).removeClass("ouvert");
    });
}

function effacer_value(elt){
	$(elt).focus(function(){
		$(this).removeAttr('value');
	});
}

function slider_horizon() {

		function formatText(index, panel) {
		  return index + "";
	    }

        $(function () {

            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 5000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 800,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "",             // Start text
		        stopText: "",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });

            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(5);
            });

        });
}

function picto_video() {
	$(".video.player").prepend("<img id='theImg' src='squelettes/theme/images/fondplayeurVideoHome.png' />");
}

function scroll_partenaires() {
  $("#partenairesBiodiv.auto").jCarouselLite({
    auto: 1300,
    speed: 1300,
    visible: 17,
    pauseOnHover: true
  });
	jQuery('#partenairesBiodiv').css({'width':980,'height':63});
}

$(document).ready(function() {

  /* Appeler une fonction */

	menu_horizon('#navPrincipale');
	effacer_value("input#txtrecherche");
	slider_horizon('.anythingSlider');
	picto_video(".video.player");
	slider_home('.slider');
	scroll_partenaires('ul#defillantPartenaires.auto');
});

