You can try adding a setTimeout to stop the shaking after sometimes.
Maybe something like this:
$(selector).each(function(){
var elem = this;
var vibrateIndex;
var timeoutIndex;
$(this).hover( /* The button ID */
function(){
vibrateIndex = setInterval(function(){
vibrate(elem);
}, interval, 0);
timeoutIndex = setTimeout(function(){clearInterval(vibrateIndex)},1000);
},
function(){
clearInterval(vibrateIndex);
clearTimeout(timeoutIndex);
}
);
})
check out the jsfiddle