function setupCharCount()
{
	$('#textWrapper').css('position','relative');
	$('#textWrapper').prepend($('<span id="textCharCount" style="position: absolute; left: 406px; top:-8px; color: #000000"></span>'));
	
	$('#text').keydown(handleKeyDown);
	$('#text').attr('maxlength',250);
	$('#text').keydown();
}

function handleKeyDown(e)
{
	$('#textCharCount').html(250 - $('#text').val().length);
}

var cardOffset = new Object();
cardOffset.top = 0;
cardOffset.bottom = 0;

function cardsScroll(id,dir)
{
	if(dir == -1 && cardOffset[id] == 0) { return; }
	if(dir == 1 && cardOffset[id] + 5 >= cardCount[id]) { return; }
	
	cardOffset[id] += dir * 5;
	
	$(id == 'top' ? '#cardOfferTopContainer' : '#cardOfferBottomContainer').animate({left:-cardOffset[id] * (105 + 4 + 6)},900);
}
