$(window).load(function() {
	$('.slider').nivoSlider({
		effect:'fold', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:800,
		pauseTime:8000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //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
	});
});
$(document).ready(function() { 

//Dropdownmenü
        $('ul.sf-menu').superfish({ 
            hoverClass:    'sfHover',          // the class applied to hovered list items 
		    pathClass:     'openPath', // the class you have applied to list items that lead to the current page 
		    pathLevels:    1,                  // the number of levels of submenus that remain open or are restored using pathClass 
		    delay:         800,                // 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 
		    easing:        'easeInCubic',
		    speed:         '500',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
		    autoArrows:    true,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
		    dropShadows:   true,               // completely disable drop shadows by setting this to false 
		    disableHI:     false,              // set to true to disable hoverIntent detection 
		    onInit:        function(){},       // callback function fires once Superfish is initialised – 'this' is the containing ul 
		    onBeforeShow:  function(){},       // callback function fires just before reveal animation begins – 'this' is the ul about to open 
		    onShow:        function(){},       // callback function fires once reveal animation completed – 'this' is the opened ul 
		    onHide:        function(){}        // callback function fires after a sub-menu has closed – 'this' is the ul that just closed 
});


//Styled <ul>
	function arrowIn() {
		$(this).animate({
			 paddingLeft: '18px',
			 backgroundPosition: '0px center' 	
		},300, 'easeOutQuint');
	}
	function arrowOut() {
		$(this).animate({
			 paddingLeft: '5px',
			  backgroundPosition: '-13px center' 	
		},300);
	}
	$('ul.styled li a').hoverIntent(arrowIn,arrowOut);

$('#scroll').localScroll();


//fancybox
$('a[rel^=lightbox]').fancybox({
		'width'					:	560,
		'height'				:	340,
		'overlayShow'			:	true,
		'overlayOpacity'		:	0.3,
		'overlayColor'			:	'#666',
		'titleShow'				:	true,
		'titlePosition'			:	'inside',	// 'outside', 'inside' or 'over'
		'transitionIn'			:	'fade',	// 'elastic', 'fade' or 'none'
		'transitionOut'			:	'fade',	// 'elastic', 'fade' or 'none'
		'speedIn'				:	300,
		'speedOut'				:	300,
		'changeSpeed'			:	300,
		'changeFade'			:	'fast',
		'easingIn'				:	'swing',
		'easingOut'				:	'swing'
	});
/*archiv animieren*/
$('.archivis .archivis-linklike').css('cursor', 'pointer');
$('.archivis-year ul').hide();
$('.archivis-month ul').hide();
$('.archivis-year .archivis-linklike').click(function(){
    $(this).parent().children("ul").slideToggle("500", "easeInCubic");
});
/*werbung*/
$('#benachrichtigung').delay(2000).slideDown(600);


/*formular ein bzw ausblenden*/
$('#field8').change(function() {
   if($('#field8').val() !== "Bestellen"){
   $('#field11').parents('tr').fadeOut();
   $('#field12').parents('tr').fadeOut();}
   else{
   $('#field11').parents('tr').fadeIn();
   $('#field12').parents('tr').fadeIn();} 
});

});






















