$(function() {
    
    $('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
    
    $('ul.gallery_demo').galleria({
      history   : false, // deactivates the history object for bookmarking, back-button etc.
      clickNext : false, // helper for making the image clickable. Let's not have that in this example.
      insert    : '#gallery_image', // the containing selector for our main image. 
                   // If not found or undefined (like here), galleria will create a container 
                   // before the ul with the class .galleria_container (see CSS)
      onImage   : function(image,caption,thumb) { // fade in the image & caption
                    image.css('display','none').fadeIn(1000);
                    caption.css('display','none').fadeIn(1000);
                  }        
    });
    
    $.timer(10000, function() { $.galleria.next(); });
  });
