// JavaScript Document
$(window).load(function() {
	
	var total = $('#slider img').length;
	var rand = Math.floor(Math.random()*total);

	$('#slider').nivoSlider({
		effect:'random',
		slices:15,
		animSpeed:500,
		pauseTime:3000,
		startSlide:rand, 
		directionNav:true, 
		directionNavHide:true, 
		controlNav:true, 
		controlNavThumbs:true, 
		keyboardNav:true, 
		pauseOnHover:true, 
		manualAdvance:false, 
		captionOpacity:0.8, 
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} 
	});
});

