<div class="head"></div>.head {
	top: 0;
	width: 100%;
	height: 200px;
	background: blue;
	position: fixed;
}$(document).ready(function() {
	$(window).scroll(function() {
		$('.head').animate({
		height: "100px",
	}, 500);
	});
});$(window).scroll(function() {
    var top = $(window).scrollTop();  
    if(top>0){
        $('.header').addClass('header--min');
    } else {
        $('.header').removeClass('header--min');
    }
});.header--min{} задавай изменения состояния.