// JavaScript Document
$(document).ready(function()
{
		initRolloverImg();
		$('a').focus(function(){ $(this).blur() } );
		$('a.blank').attr('target', '_blank');
});


function initRolloverImg()
{
	//--- cache les images par défaut
	$('#content .cat div img').hide();
	
	//--- ajout le background dynamiquement
	$('#content .cat div a img').each(
		function()
		{
			var url_out = $(this).attr('src');
			var pos = url_out.indexOf('_out');
			var url_over = url_out.substring(0, pos) + '_over.jpg';
			$(this).parent('a').parent('div').css('background', 'url('+url_out+') no-repeat');	
			$(this).attr('src', url_over);
		}
	);
	
	//--- gere le hover
	$('#content .cat div.left div.img').hover(
		function()
		{
			$(this).children('a').children('img').fadeIn('normal'); //rollover
		},
		
		function()
		{
			$(this).children('a').children('img').fadeOut('normal'); //rollout
		}
	);
	
}