    $(window).load(function () {
        
        // Over su menu'
        $(".main_menu2 .bottone").mouseover(function() {
            $(this).css("background", "url('./images/main_menu_over.gif')"); 
        }).mouseout(function() {
            $(this).css("background", ""); 
        });
        
        
        // Lightbox
        $('a[rel^=lightbox]').lightBox();
        
    
    
    
    
    
    
    
    
    
   
              
                
        (function($) {
            var imgList = [];
            $.extend({
                preload: function(imgArr, option) {
                    var setting = $.extend({
                        init: function(loaded, total) {},
                        loaded: function(img, loaded, total) {},
                        loaded_all: function(loaded, total) {}
                    }, option);
                    var total = imgArr.length;
                    var loaded = 0;
                    
                    setting.init(0, total);
                    for(var i in imgArr) {
                        imgList.push($("<img />")
                            .attr("src", imgArr[i])
                            .css({opacity: 0.0})
                            .addClass('slide')
                            .load(function() {
                                loaded++;
                                setting.loaded(this, loaded, total);
                                if(loaded == total) {
                                    setting.loaded_all(loaded, total);
                                }
                            })
                        );
                    }
                    
                }
            });
        })(jQuery);

               
    
        $(function() {
            $.preload(
                list_slideshow
            /*[
                "./images/header_img1.jpg",
                "./images/header_img2.jpg",
                "./images/header_img3.jpg",
                "./images/header_img4.jpg",
                "./images/header_img5.jpg",
                "./images/header_img6.jpg",
                "./images/header_img7.jpg",
                "./images/header_img8.jpg",
                "./images/header_img9.jpg",
                "./images/header_img10.jpg",
                "./images/header_img11.jpg",
                "./images/header_img12.jpg",
                "./images/header_img13.jpg",
                
            ]*/
            
            , {
                init: function(loaded, total) {},
                loaded: function(img, loaded, total) {
                    
                    $("#slideShow").append(img);
                },
                loaded_all: function(loaded, total) {}
            });
        });
      
        
            

        $(function() {
            slideSwitch();
            setInterval( "slideSwitch()", 8000 );
        });

    
    
    
    
    
    
    
    
    
    
        
        
    });
    
    
    
    

        function slideSwitch() {
            var $active = $('#slideShow  IMG.slide.active');
            if ( $active.length == 0 ) $active = $('#slideShow IMG.slide:last');
            var $next =  $active.next().length ? $active.next() : $('#slideShow IMG.slide:first');
            $active.addClass('last-active');
            //alert($next.attr('src'));
            $next.css({opacity: 0.0})
                .addClass('active')
                .animate({opacity: 1.0}, 1000, function() {
                    $active.removeClass('active last-active');
                });
        }
