			
			$(function()
			{
				// this initialises the demo scollpanes on the page.
				$('#pane1, #pane2, #pane3, #pane4, #pane5, #pane6, #pane7, #pane8, #pane9, #pane10, #pane_dettaglio, #pane_mappa, #pane_regioni, #pane_note, #pane_dettaglio_news, #pane_temp').jScrollPane({showArrows:true});
				
				var isResizing;
				
				// and the body scrollpane
				var setContainerHeight = function()
				{
					// IE triggers the onResize event internally when you do the stuff in this function
					// so make sure we don't enter an infinite loop and crash the browser
					if (!isResizing) { 
						isResizing = true;
						$w = $(window);
						$c = $('#nulla');
						var p = (parseInt($c.css('paddingLeft')) || 0) + (parseInt($c.css('paddingRight')) || 0);
						$('body>.jScrollPaneContainer').css({'height': $w.height() + 'px', 'width': $w.width() + 'px'});
						$c.css({'height': ($w.height()-p) + 'px', 'width': ($w.width() - p) + 'px', 'overflow':'auto'});
						$c.jScrollPane();
						isResizing = false;	
					}
				}
				$(window).bind('resize', setContainerHeight);
				setContainerHeight();
				
				// it seems like you need to call this twice to get consistantly correct results cross browser...
				setContainerHeight();
				
			});
