jQuery.fn.ww_contentSlider = function(parameter) {

	// On Load
	selector = "#"+jQuery(this).attr("id");
	jQuery(selector+" .smallswitch ul li").first().addClass("activ");
	countElements = jQuery(selector+" .smallswitch ul li").length;
	

	
	
	// Function initialze Autoplay
	itemCS = 1;
	function autoplayInitCS () {
		
		// Start with 0 after first round
		if (itemCS > (countElements -1)) {
			itemCS = 0;
		}

		// Reset Classes and add active Class & start switcher
		jQuery(selector+" .smallswitch ul li").removeClass("activ");
		jQuery(selector+" .smallswitch ul li").eq(itemCS).addClass("activ");
		switcher();	
		
		// Count up
		itemCS++;
		
	}


	// Function setInterval & clearIntervall
	function autoplay(status) {
		
		if (status == "stop") {
			clearInterval(startAutoplay);
		} else {
			startAutoplay = setInterval(function() {
				autoplayInitCS();
			}, parameter.autoplay);   				
		}

	}

	autoplay("start");

	// Event Start/Stop
	jQuery(selector).hover(function() {
		autoplay("stop");
	}, function() {
		autoplay("start");																					 
	});


	
	// On Mouseenter
	jQuery(selector+" .smallswitch ul li").mouseover(function() {	

		itemCS = jQuery(this).index() + 1;	

		if(jQuery(this).hasClass("activ")) {
			actIndicator = true;
		} else {
			actIndicator = false;			
		}
		
		jQuery(selector+" .smallswitch ul li").removeClass("activ");
		jQuery(this).addClass("activ");
		
		if ( actIndicator == false) {
			switcher();	
		}

	});
	

	
	

}

function switcher() {
	
		hoveredElement = jQuery(selector+" .smallswitch ul li.activ").index();	
			
		jQuery(selector+" .smallpics ul.fadeteaser li").stop(true, true).hide();
		jQuery(selector+" .smallpics ul.fadeteaser li").eq(hoveredElement).fadeIn(600);
						
}
