Что-то типа такого...
<!DOCTYPE html>
<html>
<head>
<script src='http://code.jquery.com/jquery-latest.js'></script>
<!--
<link rel='stylesheet type=text/css href=tmp.css' />
-->
<style type='text/css'>
.one {
background-color: red;
}
.two {
background-color: yellow;
}
</style>
<script type='text/javascript'>
$(function (){
(function (){
var ind;
$('p').mouseover(function (){
ind=setInterval((function (Obj){
return function (){
Obj.className=(Obj.className=='one')? 'two': 'one';
};
})(this),100);
});
$('p').mouseout(function (){
clearInterval(ind);
this.className='';
});
})();
});
</script>
</head>
<body>
<p>Test</p>
</body>
</html>
</html>