jQuery().ready(function()
{
	var len = $("#pic_container").children().length;
	if(len > 4)
	{
		$("#pic_container").css("height", "380px");
		var offset = (len - 4) * -97;
		$("#pic_container img").each(function()
		{
			$(this).css("position", "absolute");
			$(this).css("top", offset+"px");
			var top = parseInt($(this).css("top"));
			offset += 97;
		});

		setInterval(function()
		{
			offset = (len - 4) * -97;
			$("#pic_container img").each(function()
			{
				var top = parseInt($(this).css("top"));
				$(this).animate({top: (top+97)+"px"}, 500);
				if(top+97 > 380)
				{
					$(this).animate({top: offset+"px"}, 0);
				}
			});
		}, 15000);
	}
});