/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$(document).ready(function(){

    $('ul.img_gallery').addClass('js_gallery').before('<div id="gallery_window"></div>'); // adds new class name to maintain degradability
    $('.thumbs').css('display','none'); // hides the nav initially

    $('ul.img_gallery').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_window', // 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) {
			$('.thumbs').css('display','block');
			image.css('display', 'none').fadeIn('slow');
			caption.css('display','none').fadeIn('slow');
	} // shows the nav when the image is showing
    });
});

