                // execute your scripts when the DOM is ready. this is a good habit
$(document).ready(function() { 
                                //$("#TdgScrollable").scrollable({circular:true}).autoscroll(2000);  
			
			$("#TdgScrollable").scrollable({circular:true});                    
                });


$(function() {
                
                //set all the li elements to an opacity of 0.7 at start          
    $(".items li").css("opacity","0.7");
                                
                $(".items li").mousedown(function() {
                              
                                var img = new Image();
                                
                                 // call this function after it's loaded
                                               
                                // begin loading the image
                                
                                                               
                                //on masque tous les éléments de home`
                                $(".dispo-prod").stop(true,true).fadeOut(1000);  
                                
                                $(".items li").removeClass("active");
                                $(this).addClass("active");
                                
                                //on affiche uniquement celui qui est sélectionné
                                
                                                var dispo ="dispo-"+$(this).attr("id");
                                                $("#"+dispo).stop(true,true).delay(1000).fadeIn(1000);
                                                
                                
                
                // when page loads simulate a "mousedown" on the first image
                }).filter(":first").mousedown();
                
                // ON MOUSE OVER
                $(".items li").hover(function() 
                {
				 $(this).addClass("hover");
                                // SET OPACITY TO 100%
                                $(this).stop().animate({opacity: 1.0}, "slow");
	       },
                
                // ON MOUSE OUT
                function () 
                { 
				 $(this).removeClass("hover");
                                // SET OPACITY BACK TO 70%
                                $(this).stop().animate({opacity: 0.7}, "slow");
                });
                
                /*//on Mousedown
                $(".latest_img").mousedown(function () 
                {
                                // SET OPACITY TO 100%
                                $(this).stop().animate({opacity: 1.0}, "slow");
                });*/
                
/*function fadeDiv(){
                var dispo ="dispo-"+$(this).attr("id");
                                $("#"+dispo).fadeIn(4000);}*/
                
                                                
                });

