$(document).ready(function(){

        //Alert IE6
        $(".alert-ie6 .closeWarning").click(function(){
            $(".alert-ie6").hide();
        });


        //Auto Scroll (http://css-tricks.com/snippets/jquery/smooth-scrolling/)
        $('a[href*=#]').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
            && location.hostname == this.hostname) {
                var $target = $(this.hash);
                $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
                if ($target.length) {
                    var targetOffset = $target.offset().top;
                    $('html,body').animate({scrollTop: targetOffset}, 1000);
                    return false;
                }
            }
        });


        //Accordeon Renaissance + Cours gratuit
        $('.flecheRouge').click(function() {
            if($(this).hasClass('on')){
                $(this).next('div').slideUp('fast');
                $(this).removeClass('on');
            }else{
                $(this).next('div').fadeIn('slow');
                $(this).next('div').slideDown('fast');
                $(this).addClass('on');
            }
        });


        //Arbre Rhétorique
        $('.arbre').click(function() {
                $('#intro').addClass('grandir');
                $('#arbreRhetorique').fadeIn('slow');
                $('#fermer').fadeIn('slow');
                //Refresh de la div
                $('#rhetoriqueContenu').hide();
                $('#rhetoriqueContenu').show();
        });
        $('#fermer').click(function() {
                $('#arbreRhetorique').fadeOut('fast');
                $('#intro').removeClass('grandir');
                $('#fermer').fadeOut('fast');
                //Refresh de la div
                $('#rhetoriqueContenu').hide();
                $('#rhetoriqueContenu').show();
        });

});


