$$ = jQuery.fn.scrollList = function (height)
{
	$$.$list = $(this);
	$$.$screen = $$.$list.wrap('<div id="member-listing"></div>').parent();
	$$.$screen.width($$.$list.outerWidth());
	$$.$screen.height(height);
	
	$$.$screen.mouseover($$.stopScroll)
	$$.$screen.mouseout($$.continueScroll)
	
	$$.startpos = $$.$screen.outerHeight();
	$$.pos = $$.startpos;
	$$.speed = -1;
	$$.easespeed = 0;
	$$.interval = setInterval($$.scroll, 20);
}

$$.scroll = function ()
{	
	$$.easespeed += ($$.speed - $$.easespeed) * .2;
	$$.pos = $$.pos + $$.easespeed;
	$$.$list.css('top',$$.pos)
	if ($$.pos < -$$.$list.outerHeight())
	{
		$$.pos = $$.startpos;
	}
	if ($$.pos > $$.startpos)
	{
		$$.pos = -$$.$list.outerHeight();
	}
}

$$.stopScroll = function ()
{
	$$.speed = 0;
}

$$.continueScroll = function ()
{	
	$$.speed = -1;
	$$.$screen.mousemove(null);
}


$$.clear = function ()
{
	clearInterval( $$.interval );
}


$(function()
{
	$('#member-companies').scrollList(100);
})