// initialise plugins
		jQuery(function(){
			jQuery('ul.sf-menu').superfish({
					delay:         500,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing 	
 					animation:     {opacity:'show',height:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method 					
	 				dropShadows:   true,               // completely disable drop shadows by setting this to false 	
					autoArrows:    false,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
					speed:         'fast'           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
					});
		});
$(document).ready(  function(){ 	
	//kopfbilder rotierend:
		var zufallsRotation = $('#rotation-container').hasClass('random');
   		 $('#rotation-container').cycle({
		fx:     'fade', 
    	speed:  1250,
		   containerResize: 0,   // resize container to fit largest slide 
        prev:   '#kopfbilder-prev',
        next:   '#kopfbilder-next',
		random: 	zufallsRotation,
      	after: onAfterKopfbilder,
		prevNextClick: onPagerKopfbilder,  
        timeout: 7000,
		delay: -1500
    });
	
function onAfterKopfbilder(curr, next, opts) {
    //navigation updaten wenn mehr als 1 img vorhanden:
	 if($('#rotation-container').children('div.cycle-item').length > 1) {
	 	kopfbilderNavi(opts.currSlide+1, $('#rotation-container').children('div.cycle-item').length);
	 }
}
function kopfbilderNavi(akt, total) {
	$('.kopfBilderCounter').html(akt + '&nbsp;/&nbsp;' + total);
}

function onPagerKopfbilder(slideIndex, slideElement) {
		$('#rotation-container').cycle('pause');
		}
} ); 		
