new ScrollUtils();
function ScrollUtils()
{
	// -------------------------------------------------------------------------------------------------------
	// Static functions
	// -------------------------------------------------------------------------------------------------------

	ScrollUtils.init = init;

	// -------------------------------------------------------------------------------------------------------
	// Functions
	// -------------------------------------------------------------------------------------------------------

	function init(contentDiv, scrollbarWidth, showArrows)
	{
		// Set default values
		if (scrollbarWidth == null) scrollbarWidth = 10;
		if (showArrows == null) showArrows = true;

		var selector = '.jScroll';

		// Limit the selector to specified content div.
		// The div can be either an id or an object.
		if (contentDiv != null && contentDiv != null.length > 0)
		{
			if ((typeof contentDiv == "string"))
			{
				selector = '#' + contentDiv + ' ' + selector;
			}
			else if((typeof contentDiv != "string"))
			{
				selector = '#' + contentDiv.attr('id') + ' ' + selector;
			}
		}

		// Initialise the custom scroll bar
		if (typeof $(selector).jScrollPane == 'function')
		{
			$(selector).jScrollPane(
			{
				scrollbarWidth: scrollbarWidth,
				showArrows: showArrows
			});
		}
	}
}
