// JavaScript Document

$(function() {
var offset = $("#box").offset();
var topPadding = 15;


document.getElementById("box").style.left = document.getElementById("wrapper").style.left + document.getElementById("wrapper").style.width + 20;

$(window).scroll(function() {
	document.getElementById("box").style.left = document.getElementById("wrapper").style.left + document.getElementById("wrapper").style.width + 20;
if ($(window).scrollTop() > offset.top) {
$("#box").stop().animate({
marginTop: $(window).scrollTop() - offset.top + topPadding
});
} else {
$("#box").stop().animate({
marginTop: 0
});
};
});
});
