function initScroll()
{
	var IE6 = false;
	if (jQuery.browser.msie && parseInt(jQuery.browser.version) == 6) IE6 = true;

	$('#cont04').css('height', 'auto');
	$('#cont05').css('height', 'auto');

	var h = Math.max( $('#cont04').height() );
	var s = Math.max( $('#cont05').height() );
	var oh = 54;
	var os = 54;
	
	$('.section #cont04').css('height', h);
	$('.section #cont05').css('height', s);

	if (IE6) {
		$('#news-list').css('height', h-oh);
	}
	else {
		var t = $('#cont04 .jScrollPaneContainer');
		if (!t.height()) t = $('#news-list');

		$('#news-list').css('overflow','hidden');
		t.css('height', h-oh);
		$('#news-list').jScrollPane({showArrows:true, scrollbarWidth: 13, arrowSize: 13});
	}
	
if (IE6) {
		$('#books-list').css('height', s-os);
	}
	else {
		var t = $('#cont06 .jScrollPaneContainer');
		if (!t.height()) t = $('#books-list');

		$('#books-list').css('overflow','hidden');
		t.css('height', s-os);
		$('#books-list').jScrollPane({showArrows:true, scrollbarWidth: 13, arrowSize: 13});
	}
}

function resetScroll() {
	if ( $.jqem.current() != $.jqem.previous() ) {
		initScroll();
	}
}

$.jqem.bind(resetScroll);
$(initScroll);

