$("div[id^='ib']").hover(function(){
$(this).addClass('h4-hover').siblings().removeClass('h4-hover');
});
или
<head>
<style>
div[id^=ib] {
cursor: pointer;
color: blue;
}
div[id^=ib]:hover {
cursor: pointer;
color: red;
text-decoration: underline;
}
</style>
</head>
<body>
<div id="ib1">Текст</div>
<div id="ib2">Текст</div>
<div id="ib3">Текст</div>
<div id="ib4">Текст</div>
</body>