Mouseover/mouseout weirdness

Mouseover/mouseout weirdness

I want to add some captions to images on the following page


Unfortunately, I can't use one of the caption plugins because they don't play nice with Fancybox which is also on the page.

Anyway, if you roll-over the images you will see that sometimes a caption appears , but sometimes it doesn't (often if i enter the div containing the image from the right). 

Can any one tell me why the caption loading is erratic ?

I've been trying to have the code from various tutorials on the web.

The code that handles the caption
  1. $(".boxgrid").mouseenter(function(){
  2.    jQuery(this).find("a").after('<div class="cover boxcaption"><p>' + jQuery(this).find("img").attr('alt') + '</p></div>');
  3.     });
  4. $(".boxgrid").mouseout(function(){
  5. $(".cover").remove();  
  6. });
On mouseenter a div class=cover boxcaption is created after the <a> tag needed by fancybox which includes the text from the ALT tag of the fancybox <a> tag. This is within a div of class boxgrid.

On mouseout I call remove() on ".cover" with the aim of destroying the div i created on mouseenter.

I hope someone can advise

Ta

Chris