$(function() { 
	
	$("a.spip_out").attr("target", "_blank");
	
	var fb_options = {
        "padding": 0,
        "overlayOpacity" : 0.9, 
        "overlayColor" : "#000"
	};


	$("#documents_portfolio a").fancybox(fb_options);

	$(".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") });
	}
	
	$('#diapo_home').cycle({ 
		fx:     'fade', 
		next:   '.next', 
		prev:   '.prev' 
	});


	if(!$.browser.msie){
		$('#diapo_home_nav a, #prestations .bloc_home').hover(function() {
			$(this).stop().animate({opacity: .7}, 400);
		}, function() {
			$(this).stop().css("opacity", 1);
		});
	}
	

});

