var tab_carousel = {
    direction:"horizontal",
    autoSlide: true,
    loop: true,
    autoSlideInterval: 3000,
    pagination: true,
    dispItems: 1,
    animSpeed: "slow",
    slideEasing: "easeOutQuint",
    btnsPosition: "none" 
};

$(document).ready(function() {
	
    $("#Act-actu .actu-inner").carousel(tab_carousel);

    $("#BTN_bas").click(function(event) {
        if ($(this).hasClass('deploy')) {
            $(this).animate({
                bottom : '22px'
            }, 500, function() {
                $(this).css('background-position', 'left top');
            });
            $("#encartBas-ext").animate({
                height : '19px'
            }, 500);
            $("#encartBas-ext .actu h3 ").animate({
                backgroundColor: '#fff',
                color: '#000'
            });
            $(this).removeClass('deploy');
        } else {
            $(this).animate({
                bottom : '154px'
            }, 500, function() {
                $(this).css('background-position', 'left bottom');
            });
            $("#encartBas-ext").animate({
                height : '157px'
            }, 500);
            $("#encartBas-ext .actu h3 ").animate({
                backgroundColor: '#000',
                color: '#fff'
            });
            $(this).addClass('deploy');
        }

        return false;
    });	
	

});

var contact_send = false ;
$("#CONTACT_SEND").click(function(){
    if(($("#CONTACT_FORM").validate().form())&&(!contact_send))
    {
        // envoie du formulaire en AJAX
        // var str = $("#CONTACT_FORM").serialize();
        // $.ajax({
        //     type: "POST",
        //     url: "/include/tpl/tpl_ajaxMail.php",
        //     data: str,
        //     success: function(msg) {
        //         if(msg != ''){
        //             $("#message_span").html(msg);
        //             contact_send = true ;
        //         } else {
        //            // alert("Erreur lors de l'envoie d'e-mail");
        //         }
        //     }
        // });
    }
});
