/**
 * @author actunet
 */
function addLegend($){
    $(".legende").html("<span class='yellow'>Legende :</span> " + $(".singlethumb").attr("alt"));
}

jQuery("document").ready(function($){

	//addLegend($);
    $('.ad-gallery').adGallery({
		display_next_and_prev: false,
		display_back_and_forward: true,
		
   		callbacks: {
			init: function(){
//				this.preloadAll();
				$(".the_author_photo").html("Photo : " + $(".ad-active").attr('title'));
			},
			
			afterImageVisible: function(){
				$(".the_author_photo").html("Photo : " + $(".ad-active").attr('title'));
			}
		}
	});
    
    $('.ad-image-wrapper').click(function(){
        $("#f" + $('.ad-active').children('img').attr('class')).trigger('click');
    });
    
	$('.slideFull a').lightbox({
		show_extended_info: true
	});
	
	$(".launch_diapo").click(function() {
		$("#f" + $('.ad-active').children('img').attr('class')).trigger('click');
	});
    
});

