$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'fade', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed:500, // Slide transition speed
        pauseTime:3000, // How long each slide will show
        startSlide:0, // Set starting Slide (0 index)
        directionNav:false, // Next & Prev navigation
        directionNavHide:false, // Only show on hover
        controlNav:false, // 1,2,3... navigation
        keyboardNav:true, // Use left & right arrows
        pauseOnHover:true, // Stop animation while hovering
        manualAdvance:false, // Force manual transitions
        captionOpacity:0.9, // Universal caption opacity
        prevText: '', // Prev directionNav text
        nextText: '', // Next directionNav text
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){}, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded
    });
});

$(document).ready(function() {
	//$('div.subcontent').not(':first').hide();

	/*
	$('#sidebar li a').click(function() {
	
		$('div.subcontent').hide();
		var n = $(this).attr('rel');
		$('#entry'+n).show();
		
		$('#sidebar li a').removeClass('active');
		$(this).addClass('active');
		
		return false;
	});
	*/
	
    $('#sidebar ul').parent().find('span').toggle(function() {
     $(this).parent().find('ul:first').slideDown(500);
    }, function() {
     $(this).parent().find('ul:first').slideUp(500);
    });
	
	$("div.scrollable").scrollable({
		onSeek: function() {
			mh = $('div.items > div:eq('+this.getIndex()+')').height();
			if (mh < 350) mh = 350;
			$('#entry').css('min-height', mh + 'px');
		}
	}).navigator({
		navi: '#sidebar',
		naviItem: 'a'
	});
	mh2 = $('div.items > div:eq(0)').height();
	if (mh2 < 350) mh2 = 350;
	$('#entry').css('min-height', mh2 + 'px');
	
});

