$(function() {
	
	if ((screen.height>600))
	{
            var offset = $("#box").offset();
            var topPadding = 1;
            $(window).scroll(function() {
                if ($(window).scrollTop() > offset.top) {
                    $("#box").stop().animate({
                        marginTop: $(window).scrollTop() - offset.top + topPadding
                    },1000);
                }              
                else {
                    $("#box").stop().animate({
                        marginTop: 0
                    });
                };
            });
	}
});




