/**
 * Contains various methods to tweak visual presentations
 */

/**
 * Changes the content area to fit the browser size
 */
function adjustContentArea( selector )
{
	var wind = $(window).height();
	var top =   $( selector ).offset().top;
	$( selector ).height( wind - top - 50);
}

//Add the scroll pane and handle proper sizing of content including images
function addScrollpane( selector )
{
	$(selector).jScrollPane
	(
		{
			showArrows: true,
			horizontalGutter: 10
		}
	);

	var api = $(selector).data('jsp');
	
	var i = 0;

	// Force a refresh after images have been loaded
	int = setInterval(
		function()
		{
			api.reinitialise();
			i++;
			if( i == 1) clearInterval( int );
		},
		3000
	);
}

