$(window).scroll(function () {
if ($(window).scrollTop() >= $('.block2').offset().top + $('.block2').height()) {
$('.block-hid').addClass("block-hid--visible");
$('.block-hid').stop().animate({
bottom: "0px"
}, 900);
};
if ($(window).scrollTop() < 250 && $('.block-hid').hasClass("block-hid--visible")) {
$('.block-hid').stop().animate({
bottom: "-100"
}, 1000, function () {
$('.block-hid').removeClass("block-hid--visible");
});
};
});