$(document).ready(function() {	$(".scrollArea").attr("scrollTop", 0);	scrollerHeight = $("#heightCheck").attr("offsetHeight");	overallHeight = scrollerHeight-380;	scrollHeight = 305;	scrollRatio = scrollHeight/overallHeight;	speed = 5000;	speedRatio = speed/scrollHeight;	$("#scrollBlock").draggable({"containment": 'parent', drag: function(event, ui) {		var top = $("#scrollBlock").css("top");		top = parseInt(top);		var move = top/scrollRatio;		$('.scrollArea').attr("scrollTop", move); 	}});});function stopMe() {	$(".scrollArea").stop().dequeue();	$("#scrollBlock").stop().dequeue();}function scrollDivUp(id) {	var scrollSpeed = parseInt($("#scrollBlock").css("top"));	if (scrollSpeed > 0) speed = speedRatio*scrollSpeed;		$("#"+id).animate({scrollTop: 0}, speed, "linear");	$("#scrollBlock").animate({top: 0}, speed, "linear");}function scrollDivDown(id){	var scrollSpeed = parseInt($("#scrollBlock").css("top"));	if (scrollSpeed > 0) speed = speedRatio*(scrollHeight-scrollSpeed);	$("#"+id).animate({scrollTop: overallHeight}, speed, "linear");	$("#scrollBlock").animate({top: scrollHeight}, speed, "linear");}