var $fixed = $('#block-fixed'),
$needle = $('#block-needle'),
fixed_top = $fixed.position().top,
fixed_height = $fixed.height(),
needle_top = $needle.offset().top,
check = 0;
$(window).scroll(function(){
check = $(window).scrollTop() - fixed_top + fixed_height ;
if( check == needle_top )
{
// тут код
}
});