function axome_flash2(swf,l,h,remplace)
{
	var t = '<param name="wmode" value="transparent" />';
	document.write('<object type="application/x-shockwave-flash" data="'+ swf +'" width="'+ l +'" height="'+ h +'"><param name="movie" value="'+ swf +'" />'+ t + remplace +'</object>');
}

$(function() {
	var val_def_recherche = $('input#recherche').val();
	$('input#recherche').blur(function() {
		if( $(this).val()=='' )
			$(this).val(val_def_recherche);
	});
	
	$('#centre a.spip_out').attr("target", "_blank");
	
	$("#documents_portfolio a, #documents_portfolio_gauche a, #logo_produit a").fancybox();

	$('.texte_article a:not(.jTip), #documents_joints_prod a:not(.jTip)').each(function() {
		if( $(this).attr('href')!=undefined && $(this).attr('href')!="undefined" ) {
			var url = $(this).attr('href');
			var extension = url.substr(url.length-3, url.length);
			if( extension=="pdf" )
				$(this).attr("target", "_blank");
		}
	});
	
	$('div#documents_joints a').click(function() { window.open($(this).attr('href')); return false; });
	
	
	$('a#lien_imprimer').click(function() { window.print(); return false; });
	
	$('a.plus_infos').click(function() {
			$('div#texte_suite').slideToggle();
			return false;
	});
	
	$('a.lien_vers_prod').parent().parent().hover(function() {
		$(this).addClass('lien_prod');
	}, function() {
		$(this).removeClass('lien_prod');
	});
	
	$('div#liste_rubriques ul li').click(function() {
		var lien = $(this).find('a').attr('href');
		window.location = lien;
		return false;
	});



	//accordeon
	if( $('div#centre_home ul').length ) {
		
		$('div#centre_home ul li:last a.catalogue_logo').css('height', '272px');
	}


	$('div#centre_home ul li a.catalogue_titre').hover(function() {
		var bloc = $(this).next();
		if( !parseInt(bloc.css('height').replace('px', '')) ) {
			$('div#centre_home ul li a.catalogue_logo').stop().animate({height: '0'});
			bloc.stop().animate({height: '272px'});
		}
		return false;
	}, function() {});


	
	$('#marques ul').innerfade({
		speed: 'slow',
		timeout: 3000,
		type: 'random',
		containerheight: '100px'
	});
	

	
	$('#hierarchie').css('opacity', 0.8);
});


