scrollTop - scroll with window only in Firefox

scrollTop - scroll with window only in Firefox

Hello,

i have a div box which should smooth scroll with the window.

So i wrote this:

var currentTop = parseInt($(".video").css("top"));
$(window).scroll(function() {
$(".video").stop().animate({"top": $(window).scrollTop()+currentTop+"px"}, 500);
});


and the div is set to position:absolute.

But this works only in Firefox! (?) Where's the problem?