function scrollInDiv($scrollableDiv, $scrollTo, animate = true) {
var scrollTo =
$scrollTo.offset().top +
$scrollableDiv.scrollTop() -
$scrollableDiv.offset().top;
if (animate)
$scrollableDiv.animate({
scrollTop: scrollTo,
});
else $scrollableDiv.scrollTop(scrollTo);
}