$(document).ready(
	function(){
		var EntryCount = $("#historyYearBar").children().length;
		var BarWidth = 50*EntryCount;
		var contentHeight = 0;
		$("#historyArticle").children().each(function(){
			if($(this).height() > contentHeight){
				contentHeight = $(this).height();
			}
		});
		
		$("#historyTimeline,#historyContent").css({"overflow":"hidden"});
		$("#historyContent").css({"height":contentHeight+"px"});
		
		$("#historyArticle").css({"width":EntryCount*470+(EntryCount*20)+"px"});
		$("#historyYearBar").css({"width":EntryCount*50+"px"});
		
		$("#historyYearDragger").draggable({
				containment: "#historyYearDragscape",
				axis: "x",
				cursor: "pointer",
				cursorAt: { left: 25 },
				drag: function(e, ui){
					$("#historyYearBar").css({"right":(ui.position.left/420)*((-420)+((EntryCount-1)*50))+"px"});
					$("#historyArticle").css({"right":(ui.position.left/420)*((EntryCount-1)*490)+"px"});
				}
			});
//		$("#historyYearBar li").mouseover(
// 			function(){
// 				var getClass = $(this).attr("class");
// 				var getPosition = $("#historyArticle li."+getClass).position();
// 				
// 				$("#historyArticle").stop().animate({"top":-getPosition.top},2000);
// 			}
// 		);
	}
);
