

    $(document).ready(function() {

        var fadein_speed  = 200; /* Vitesse de transition (show) en ms (350 = 0.350s) */
        var fadeout_speed = 200; /* Vitesse de transition (hide) en ms (150 = 0.150s) */
        var opacity_show  = 1;   /* Opacit� du background (show) (1 = 100%) */
        var opacity_hide  = 0;   /* Opacit� du background (hide) (0 =   0%) */

        $('#menu-menu-haut a ').hover(
            function () { // mouse hover
                // on affiche le span progressivement
                $(this).children('span.background').stop().fadeTo(fadein_speed, opacity_show);
                $(this).children('span.texte').animate({color:'white'},50);

            },
            function () { // mouse leave
                // si le lien n'est pas "courant"
                if(!$(this).hasClass('current-menu-item'))
                {
                    // on fait disparaitre le span progressivement
                    $(this).children('span.texte').animate({color:'#494949'},50);
                    $(this).children('span.background').stop().fadeTo(fadeout_speed, opacity_hide);
                }
        });

          $('#menu-menu-voiture1 a').hover(
            function () { // mouse hover
                // on affiche le span progressivement
                $(this).children('span.background').stop().fadeTo(fadein_speed, opacity_show);
                

            },
            function () { // mouse leave
                // si le lien n'est pas "courant"
                if(!$(this).hasClass('current-menu-item'))
                {
                    // on fait disparaitre le span progressivement

                    
                    $(this).children('span.background').stop().fadeTo(fadeout_speed, opacity_hide);
                }
        });



         $('.xoxo a ').hover(
            function () { // mouse hover
                // on affiche le span progressivement
                $(this).children('span.background').stop().fadeTo(fadein_speed, opacity_show);
                $(this).children('span.texte').animate({color:'white'},50);

            },
            function () { // mouse leave
                // si le lien n'est pas "courant"
                if(!$(this).hasClass('current-menu-item'))
                {
                    // on fait disparaitre le span progressivement
                    $(this).children('span.texte').animate({color:'#494949'},50);
                    $(this).children('span.background').stop().fadeTo(fadeout_speed, opacity_hide);
                }
        });
        
        if($("#winnerPics").length == 1){
	        $("#winnerPics a").attr('rel', 'gallery').fancybox({
	        	'titleShow' : false
	        });
        }
        

    });




 $(function() {

		$("#menu-item-54").mouseenter(function() {
			 $("#auris").show();
		});
		  $("#menu-item-54").mouseleave(function() {
				$("#auris:visible").removeAttr('style').hide().fadeOut();
			});
		$("#auris").hide();
	});
	

	
	 $(function() {

	
		$("#menu-item-50").mouseenter(function() {
			$("#hiace").show();
		});
		$("#menu-item-50").mouseleave(function() {

				$("#hiace:visible").removeAttr('style').hide().fadeOut();});
		$("#hiace").hide();
	});
	 $(function() {

		$("#menu-item-52").mouseenter(function() {
			$("#hilux").show();
		});
		        $("#menu-item-52").mouseleave(function() {

				$("#hilux:visible").removeAttr('style').hide().fadeOut();

		});
		
		$("#hilux").hide();
	});
	 $(function() {

		
		$("#menu-item-51").mouseenter(function() {
			$("#land").show();
		});

		 $("#menu-item-51").mouseleave(function() {

				$("#land:visible").removeAttr('style').hide().fadeOut(); });

		$("#land").hide();
	});

	 $(function() {

		
		$("#menu-item-53").mouseenter(function() {
			$("#prado").show();
		});
                $("#menu-item-53").mouseleave(function() {

				$("#prado:visible").removeAttr('style').hide().fadeOut();

                   });
		
		$("#prado").hide();
	});
	 $(function() {

		$("#menu-item-110").mouseenter(function() {
			$("#prius").show();
		});

                	$("#menu-item-110").mouseleave(function() {

				$("#prius:visible").removeAttr('style').hide().fadeOut();

                   });
		
		$("#prius").hide();
	});
	 $(function() {

		
		$("#menu-item-49").mouseenter(function() {
			$("#rav4").show();

		});

			$("#menu-item-49").mouseleave(function() {

				$("#rav4:visible").removeAttr('style').hide().fadeOut();

                   });

		$("#rav4").hide();
	});
	 $(function() {


		$("#menu-item-56").mouseenter(function() {
			$("#tundra").show();
		});
			$("#menu-item-56").mouseleave(function() {

				$("#tundra:visible").removeAttr('style').hide().fadeOut();

                   });

		$("#tundra").hide();
	});
	 $(function() {

		
		$("#menu-item-55").mouseenter(function() {
                $("#yaris").show();
		});
		   $("#menu-item-55").mouseleave(function() {

			$("#yaris:visible").removeAttr('style').hide().fadeOut();

                   });
		$("#yaris").hide();
		
		
	});
		 $(function() {

		
		$("#menu-item-1510").mouseenter(function() {
                $("#tacoma").show();
		});
		   $("#menu-item-1510").mouseleave(function() {

			$("#tacoma:visible").removeAttr('style').hide().fadeOut();

                   });
		$("#tacoma").hide();
		
		
	});
	
	jQuery(window).load(function() {
	jQuery('#slider').nivoSlider({effect:'fade',animSpeed:1000,pauseTime:5000,directionNav:false,controlNav:false});
});
$(document).ready(function() {

    $('a[href=#wrapper]').click(function(){
        $('html, body').animate({scrollTop:0}, 'slow');
        return false;
    });


});


