// JavaScript Document
// Conti Script // Camyo 2011


 // *  ******************     MENU
$(document).ready(function() {
	
$("ul#topmenu li").hover(function() { //Hover over event on list item
	$(this).css({ 'background' : '#0066cc url(topnav_active.gif) repeat-x'}); //Add background color + image on hovered list item
	$(this).find("span").show(); //Show the subnav
} , function() { //on hover out...
	$(this).css({ 'background' : 'none'}); //Ditch the background
	$(this).find("span").hide(); //Hide the subnav
});
	

	
});
 // ********************************** FIN MENU


//  ********************************* BANNIERE
    $(function(){

//Au chargement de la page, 1ère exécution de toutes les fonctionnalités //de la bannière

    depObj();

    //Puis toutes les 10 secondes

    setInterval("depObj();",10000);

    });

    

    //Fonction regroupant tous les effets et animations de la bannière

    function depObj(){

    //Apparition/Disparition du premier slogan    

    $('#slog1').animate({left:"40%"},1000);

   $('#slog1').delay(500).fadeOut(1000);

    //Apparition/Disparition du deuxième slogan

    $('#slog2').delay (2500).animate({left:"40%"},2000);

    $('#slog2').delay(2000).fadeOut(1000);

    //Apparition/Disparition du troisième slogan
	
    $('#slog3').delay (4500).animate({left:"40%"},3000);

    $('#slog3').delay(3000).fadeOut(1000);

    //Repositionnement des textes

    $('#slog3').animate({left:"-400px"},9000);

    $('#slog3').fadeIn();

    $('#slog2').animate({left:"-400px"},9000);

    $('#slog2').fadeIn();

    $('#slog1').animate({left:"-400px"},9000);

    $('#slog1').fadeIn();

    }
//  ********************************* FIN BANNIERE

// **************************** SLIDESHOW IMAGES ENTETE
 $(function() {
     $('#slideshow').crossSlide({
  sleep: 2,
  fade: 1
}, [
  { src: 'images/header.jpg' },
  { src: 'images/header1.jpg' },
  { src: 'images/header2.jpg' },
  { src: 'images/header3.jpg' },
  { src: 'images/header4.jpg' },
  { src: 'images/header5.jpg' },
  { src: 'images/header6.jpg' },
  { src: 'images/header7.jpg' }
]);
  });
 // **************************** SLIDESHOW IMAGES ENTETE
