

document.createElement("header");
document.createElement("footer");
document.createElement("section");
document.createElement("nav");
document.createElement("figure");
document.createElement("article");
document.createElement("aside");

$(document).ready(function(){

var tailleMoveSlide=-2000;
var vitesseSlide='1500';

	$(".slide1").click(function(){
	
		$("#slidebox")
		.animate({top: "0"}, vitesseSlide)
		$(".nav_article li a").removeClass("active");
		$(".nav_article li a.slide1").addClass("active");
		return false;
		
	});
	$(".slide2").click(function(){
	
		$("#slidebox")
		.animate({top: tailleMoveSlide}, vitesseSlide,'easeInOutExpo')
		
				$(".nav_article li a").removeClass("active");
		$(".nav_article li a.slide2").addClass("active");
return false;
	});
	$(".slide3").click(function(){
	
		$("#slidebox")
		.animate({top: tailleMoveSlide*2}, vitesseSlide,'easeInOutExpo')
				$(".nav_article li a").removeClass("active");
		$(".nav_article li a.slide3").addClass("active");
		return false;

	});
	$(".slide4").click(function(){
	
		$("#slidebox")
		.animate({top: tailleMoveSlide*3}, vitesseSlide,'easeInOutExpo')
				$(".nav_article li a").removeClass("active");
		$(".nav_article li a.slide4").addClass("active");
		return false;

	});
	$(".slide5").click(function(){
	
		$("#slidebox")
		.animate({top: tailleMoveSlide*4}, vitesseSlide,'easeInOutExpo')
				$(".nav_article li a").removeClass("active");
		$(".nav_article li a.slide5").addClass("active");
		return false;

	});
	$(".slide6").click(function(){
	
		$("#slidebox")
		.animate({top: tailleMoveSlide*5}, vitesseSlide,'easeInOutExpo')
				$(".nav_article li a").removeClass("active");
		$(".nav_article li a.slide6").addClass("active");
		return false;

	});


});



            $(function() {
                $('a#contact-link').bind('click',function(event){
                    var $anchor = $(this);
                    
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1500,'easeInOutExpo');
                    /*
                    if you don't want to use the easing effects:
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1000);
                    */
                    event.preventDefault();
                });
                });
            $(function() {
                $('a#top3').bind('click',function(event){
                    var $anchor = $(this);
                    
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1500,'easeInOutExpo');
                    /*
                    if you don't want to use the easing effects:
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1000);
                    */
                    event.preventDefault();
                });
                });
            $(function() {
                $('a#top4').bind('click',function(event){
                    var $anchor = $(this);
                    
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1500,'easeInOutExpo');
                    /*
                    if you don't want to use the easing effects:
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1000);
                    */
                    event.preventDefault();
                });
                });

		


    $(window).load(function() {
        $('#slider').nivoSlider();
    });

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

	
jQuery(document).ready(function() {
    // Initialise the first and second carousel by class selector.
	// Note that they use both the same configuration options (none in this case).
	jQuery('#mycarousel').jcarousel({
        auto: 5,
       wrap: 'circular',
        initCallback: mycarousel_initCallback,
        scroll: 1
    });	
});	


// Ajout class .js a la balise body si javascript fonctionne
jQuery(document).ready(function() {
		$("body").addClass("js");
		$(".nav_article li a.slide1").addClass("active");
	});






