// Javascript function to replicate a scrolling marquee
function marquee(boxClassName, boxColor, boxWidth, boxBorder, textClassName, textSpeed) 
{
	
	// Process the passed arguments
	$(boxClassName).css('background-color', boxColor);	// Set the background colour of the scroll box
	$(boxClassName).css('width', boxWidth);				// Set the width of the scroll box
	$(boxClassName).css('border', boxBorder);			// Set the border of the scroll box

	// to strip out the number from the starting point ie: 254px and convert to an integer and tag on a few more pixels
	var startingPoint = parseInt(boxWidth.match(/\d/g).join("")) + 4;
	
	// position the text at the starting point
	$(textClassName).css('margin-left', startingPoint + 'px');

	// set the finish point of the loop
	var endPoint = $(textClassName).width() * (-1);

	// and move the text to the end point
	$(textClassName).startAnimation({marginLeft:endPoint +'px'}, textSpeed, 'linear', function() {marquee(boxClassName, boxColor, boxWidth, boxBorder, textClassName, textSpeed);});

}



