$(function() { 
	
	$("a.spip_out").attr("target", "_blank");
	
	$("#documents_portfolio a").fancybox();

	$(".texte_article a").each(function() {
		var url = $(this).attr('href');
		var extension = url.substr(url.length-3, url.length);
		if(extension == "pdf") { $(this).attr("target", "_blank"); } 
	});
	
	if($("#documents_portfolio_diapo").length > 0) {
		$('#documents_portfolio_diapo').innerfade({ timeout: 3000, speed: "slow", type: 'random', containerheight: $('#documents_portfolio_diapo').css("height") });
	}
	
	$('div.lien_bas_home h2 a').each(function() {
		var txt = $(this).html().replace(" ", "<br />");
		$(this).html(txt);
	});
	
	$('#mydiaporama ul').innerfade({
		speed: 'slow',
		timeout: 5000,
		containerheight: '356px'
	});
	$('div#diaporama_home ul li div strong').css('opacity', .7);

});

