$(document).ready(function(){
	//Round Corners
	$('#main-menue .selected').corner('top 10px cc:#0e5aa7');
	$('.news-header').corner('top 10px');
	$('.news').corner('bottom 10px');
				
    current = 1;
	init = true;
	var teaserId = '#main-content-teaser';
	$(teaserId).cycle({ 
	    delay:  6000,
		timeout: 8000, //Überblenden
	    speed:  3500,
		slideExpr: 'img',
	    before: function() {
			if (init == true) {
				init = false;
			} else {
				current++;
				var i = $(teaserId).children().length / 2;
				$(teaserId + ' div.activ').fadeOut(1500, function() {
					setTimeout(function() {
						if(current > i) {
							$(teaserId + ' div').first().fadeIn(2000, function() {
								$(teaserId + ' div.activ').attr('class', 'hidden');
								$(teaserId + ' div').first().attr('class', 'activ');
								current = 1;
							});
						} else {
							$(teaserId + ' div.activ').next().next().fadeIn(1500, function() {
								$(teaserId +' div.activ').attr('class', 'hidden').next().next().attr('class', 'activ');
							});
						}
					}, 100);
				});
			}
		}
	});
});
