Hell yeah, this can be made shorter. But it would help to see your HTML in order to suggest a more generic traversal method.
The first thing that comes to my mind right now would be:
Code:
$('.blok').mouseenter(function(){
$(this).find('[id*=message]').show();
}).mouseleave(function(){
$(this).find('[id*=message]').hide();
});
That’s the “contains” selector; alternatively you could use the “starts with” selector:
[id^=message] or the “contains prefix” selector (string separated by hyphens):
[id|=message]