function cUpcomingEvents()
{
	// Function that runs when the page loads
	//
	this.onLoad = function()
	{
		var _this = this;
		$(".LeftArrowButton").click(function()
		{
			_this.scroll('left');
		});

		$(".RightArrowButton").click(function()
		{
			_this.scroll('right');
		});
	
	};
	
	this.scroll = function( direction )
	{
		var $lefty = $(".DetailsNavScrollOuter");
		var visibleWidth = $lefty.width();
		var totalWidth = $(".DetailsNavScrollInner").width();
		var currentLeft = parseInt( $lefty.css('left'), 10);
		if( isNaN(currentLeft) ) currentLeft = 0;
		var newLeft = 0;

		// Has to be bigger than the visible width to be scrollable
		if( totalWidth > visibleWidth )
		{
			switch( direction )
			{
				case 'left':
					newLeft = currentLeft + visibleWidth;
					break;

				case 'right':
					newLeft = currentLeft - visibleWidth;
					break;
			}

			// Maximum left range check (left can be no larger than 0)
			newLeft = Math.min( 0, newLeft );

			// Minimum left range check (left can be no smaller than scrolled completely right)
			newLeft = Math.max( (( totalWidth - visibleWidth ) * -1), newLeft );
		}

		// Now scroll it
		$lefty.animate(
		{
			left: newLeft
		});
	};

	return this;
}

