$(window).scroll(function() { /* some code */ });
var top = $('#filter_wrap').offset().top;
if ($(window).scrollTop() >= top) {
$('#filter_wrap').css({
posiotion: "fixed"
});
} else {
$('#filter_wrap').css({
posiotion: "static"
});
}