$().ready(function() {


	$(".popup").fancybox({
	});

	$( "#ss-nav" ).accordion({
		collapsible: true,
		header: 'a.ss-nav-null',
		active: '0',
		autoHeight: false
	});

	var settings = {
		showArrows: true
	};
	
	var pane = $('.subnav-scr').jScrollPane(settings);
	var api = pane.data('jsp');
	var throttleTimeout;
	
	
	//Re-initialize on window resize
	/*
	$(window).bind('resize',function() {
		if ($.browser.msie) {
			// IE fires multiple resize events while you are dragging the browser window which
			// causes it to crash if you try to update the scrollpane on every one. So we need
			// to throttle it to fire a maximum of once every 50 milliseconds…
			if (!throttleTimeout) {
				throttleTimeout = setTimeout(
					function() {
						api.reinitialise();
						throttleTimeout = null;
					},
					50
				);
			}
		} else {
			api.reinitialise();
		}
	});
	*/
	
	
	//Re-initialize every .5 seconds
	if(pane.length > 0) {
		setInterval(
			function() {
				api.reinitialise();
			},
		500);
	}

	
	
});

