function divFunc() {
	var n = $(".mainMenu li").length;
	if (n<=4) {
		$(".mainMenu li").css("width","90%");
	}
	var m = $("#teaser img").length;
	if (m>1) {
		//$("#teaser img:last").css({border: 'none', margin: '0', padding: '0'});
		$("#teaser img:first").addClass("teaser-home-1");
		$("#teaser img:last").addClass("teaser-home-2");
	}
}


//$(document).ready( function() {
$(window).load(function() {
	
	divFunc();
	
	var n_slice = $('#slideshow img').length;
	
	$('#slideshow').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:n_slice,
		animSpeed:1000, //Slide transition speed
		pauseTime:5000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
     	controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
	
	
});

