You should debug on IE7&8 - what is the value of $(this).attr("src")
and what src
attribute has the element after enter with the mouse over the element? I suppose, that the IE maybe returns an absolute path to the image, like "http://example.com/image.png" - in this case your RegEx would not work.
Why not calling
var src = $(this).attr("src").replace(".png", "hover.png");
instead of
var src = $(this).attr("src").match(/[^\.]+/) + "hover.png";
this would be more consistent regarding the mouseout
method.