var listesScript = {
	listesscript:function() {
	$("#top-menu-input-recherche").click(function() {
		if ( ($(this).val()=="recherche" && lgses == "fr") || ($(this).val()=="search" && lgses == "en") )
			$(this).val("");
	});
	
	$("#top-menu-input-recherche").blur(function() {
		if ($(this).val()=="")
		{
			if (lgses == "fr") $(this).val("recherche");
			if (lgses == "en") $(this).val("search");
		}
	});
	
	$("#top-menu-input-recherche").bind('click keyup', function() {
		var rech = $(this).val();
		if (rech != "" && rech != "recherche" && rech != "search")
		{
			$.post(baseUrl+"/recherche/encart", { rech: rech },
					function(data){
						$("#mainsearch-window").html(data);
						$(".int-titre-chro").each( function() {
							if ( $(this).height() > 14 )
							{
									$(this).parent(".titre").css('width','168px');
									$(this).parent(".artiste").css('width','168px');
									$(this).append('<div style="position:absolute;top:0;left:'+$(this).width()+'px;">...</div>');
							}
						});
						$(".int-titre-art").each( function() {
							if ( $(this).height() > 14 )
							{
									$(this).parent(".titre").css('width','146px');
									$(this).parent(".artiste").css('width','146px');
									$(this).append('<div style="position:absolute;top:0;left:'+$(this).width()+'px;">...</div>');
							}
						});
						
						$(".int-titre-chro,.int-titre-art").mouseover( function() { 
							if ($(this).height() > 14)
							{
								var w = $(this).width()
								$(this).children('div').fadeOut("fast");
								$(this).css('position','absolute');
								$(this).width(w);
								var lsc = 13 - $(this).height();
								$(this).animate({top:lsc},1200);
								$(this).animate({top:lsc},400);
								$(this).animate({top:0},1200);
							}
						});
						
						$(".int-titre-chro,.int-titre-art").mouseout( function() { 		
							if ($(this).height() > 14)
							{
								$(this).stop(true, false);
								$(this).animate({top:0},400,"linear",function(){
									$(this).css('position','static');
									$(this).children().fadeIn("fast");
								});
							}	
						});
					});
		}
		else
		{
			$("#mainsearch-window").html('');
		}
	});
	
	$(".ligne-scroll-in").mouseover( function() { 		
		if ($(this).width() > 196)
		{
			var lsc = 196 - $(this).width();
			$(this).animate({left:lsc},3000);
			$(this).animate({left:lsc},1000);
			$(this).animate({left:0},3000);
		}	
	});
	
	$(".ligne-scroll-in").mouseout( function() { 		
		if ($(this).width() > 196)
		{
			$(this).stop(true, false);
			$(this).animate({left:0},1000);	
		}	
	});

	$(".lien-connexe-scroll-in").mouseover( function() { 		
		if ($(this).width() > 200)
		{
			var lsc = 196 - $(this).width();
			$(this).animate({left:lsc},3000);
			$(this).animate({left:lsc},1000);
			$(this).animate({left:0},3000);
		}	
	});
	
	$(".lien-connexe-scroll-in").mouseout( function() { 		
		if ($(this).width() > 200)
		{
			$(this).stop(true, false);
			$(this).animate({left:0},1000);	
		}	
	});
	
	$(".int-titre").each( function() {
		if ( $(this).height() > 16 )
		{
			if  ( $(this).width() > 151 )
			{
				$(this).parent(".titre").css('width','151px');
				$(this).parent(".artiste").css('width','151px');
				$(this).append('<div style="position:absolute;top:0;left:'+$(this).width()+'px;">...</div>');
			}
			else
			{
				$(this).append('<div style="position:absolute;top:0;left:'+$(this).width()+'px;">...</div>');
			}
		}
	});
	
	$(".int-titre").mouseover( function() { 
		if ($(this).height() > 16)
		{
			$(this).children().fadeOut("fast");
			$(this).css('position','absolute');
			var lsc = 15 - $(this).height();
			$(this).animate({top:lsc},1200);
			$(this).animate({top:lsc},400);
			$(this).animate({top:0},1200);
		}
	});
	
	$(".int-titre").mouseout( function() { 		
		if ($(this).height() > 16)
		{
			$(this).stop(true, false);
			$(this).animate({top:0},400,"linear",function(){
				$(this).css('position','static');
				$(this).children().fadeIn("fast");
			});
		}	
	});
	
	$(".int-titre-art-rech").each( function() {
		if ( $(this).height() > 16 )
		{
			$(this).append('<div style="position:absolute;top:0;left:'+$(this).width()+'px;">...</div>');
		}
	});
	
	$(".int-titre-art-rech").mouseover( function() { 
		if ($(this).height() > 16)
		{
			$(this).children().fadeOut("fast");
			$(this).css('position','absolute');
			var lsc = 15 - $(this).height();
			$(this).animate({top:lsc},1200);
			$(this).animate({top:lsc},400);
			$(this).animate({top:0},1200);
		}
	});
	
	$(".int-titre-art-rech").mouseout( function() { 		
		if ($(this).height() > 16)
		{
			$(this).stop(true, false);
			$(this).animate({top:0},400,"linear",function(){
				$(this).css('position','static');
				$(this).children().fadeIn("fast");
			});
		}	
	});
	
	$(".int-titre-rech").each( function() {
		if ( $(this).height() > 16 )
		{
			$(this).append('<div style="position:absolute;top:0;left:'+$(this).width()+'px;">...</div>');
		}
	});
	
	$(".int-titre-rech").mouseover( function() { 
		if ($(this).height() > 16)
		{
			$(this).children().fadeOut("fast");
			$(this).css('position','absolute');
			var lsc = 15 - $(this).height();
			$(this).animate({top:lsc},1200);
			$(this).animate({top:lsc},400);
			$(this).animate({top:0},1200);
		}
	});
	
	$(".int-titre-rech").mouseout( function() { 		
		if ($(this).height() > 16)
		{
			$(this).stop(true, false);
			$(this).animate({top:0},400,"linear",function(){
				$(this).css('position','static');
				$(this).children().fadeIn("fast");
			});
		}	
	});
	
	$("#chro_rech_red").click( function() {
		$("#chro_rech_red_liste").css("display","block");
	});
	
	
	$(document).click(function (e) {
		var $parents_rech = $(e.target).parents("#mainsearch-window");
		if ( ($parents_rech.length == 0) && (!$(e.target).is("#mainsearch-window")) ) {
			$("#mainsearch-window").fadeOut('500', function(){ 
				$("#mainsearch-window").html('');
				$("#mainsearch-window").fadeIn('10');
			});	  
	      }
	});

}
}	

	

