/* $(document).ready(function() { 
   $('ul li:has(ul)').hover( 
      function(e) 
      { 
         $(this).find('ul').css({display: "block"}); 
      }, 
      function(e) 
      { 
         $(this).find('ul').css({display: "none"}); 
      } 
   ); 
});*/

$(function()
{
	var imgWrapper = $('.carrusel > img');
	var overlay = $('.carrusel > div');
	// mostrar sólo la primera imagen, ocultar el resto

	imgWrapper.hide().filter(':first').show();
	overlay.hide().filter(':first').show();
	
	$('div.listaReciente ul li a').click(function ()
	{
		// comprobar si este elemento no tiene class="actual"
		// si tiene class="actual" no debe ejecutar el script de nuevo

		if (this.className.indexOf('actual') == -1)
		{
			imgWrapper.hide();
			overlay.hide();
			imgWrapper.filter(this.hash).fadeIn(500);
			overlay.filter(this.hash).fadeIn(500);
			$('div.listaReciente ul li a').removeClass('actual');
			$(this).addClass('actual');
		}
		return false;
	});
});

