$(document).ready(function() {
  $('#tr_menu div.language span').click(function(){
    $('#tr_menu div.language ul').slideToggle('medium');
  });
  
  
  $(".content_col_b2").find('h2 > a').each(function(index){
      $(this).click(function(){
         $(".content_col_b2").find('h2 > a').removeClass('active') ;
         $(this).addClass('active');
         $('#special_content').find('>div.bg_text_center_b').hide() ;
         $('#special_content').find('>div.bg_text_center_b').eq(index).show() ;
      });
  }); 


  $("#home_tabs .tabs_nav li").each(function(index){
      $(this).click(function(){
         $("#home_tabs .tabs_nav li.active").removeClass('active') ;
         $(this).addClass('active');
         $('#home_tabs .tab_content').hide() ;
         $('#home_tabs .tab_content').eq(index).show() ;
      });
  }); 
  
  
  $('.fix_ie').each(function() {
    $(this).css('width', $(this).css('width')); 
  });

  $('#main_menu > ul > li')
    .mouseover(function(){
      $(this).addClass('over');//find('div.products_roll').show();
    })
    .mouseout(function(){
      $(this).removeClass('over');//find('div.products_roll').hide();
    });

  $('.products_roll .bottom a').click(function(){
    $(this).parents('div.products_roll').hide();
  });  
});

var obj = null;

function checkHover() {
	if (obj) {
		obj.find('ul').fadeOut('fast');	
	} //if
} //checkHover

$(document).ready(function() {
	$('.topnav > li').hover(function() {
		if (obj) {
			obj.find('ul').fadeOut('fast');
			obj = null;
		} //if
		
		$(this).find('ul').fadeIn('fast');
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			0); // si vous souhaitez retarder la disparition, c'est ici
	});
});

