!function($) {
$.fn.hoverWithTimeout = function(timeout, callback) {
$(this).each(function() {
var $this = $(this);
var timer;
$this.on('mouseover', function(e) {
timer = setTimeout(function() {
callback.call($this, e);
}, timeout);
});
$this.on('mouseout', function() {
clearTimeout(timer);
});
});
};
}(jQuery);