// JavaScript Document

$(document).ready(function(){
	$('ul#nav').superfish({ 
		delay:       1000,
		animation:   {opacity:'show',height:'show'},
		speed:       'fast',
		autoArrows:  false,
		dropShadows: false
	});
	$("a[rel=fancyimage]").fancybox({		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Bild ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		},
			'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});
	$('ul#nav li li a').css({opacity: 0.85});
	$('ul#nav li.more').each(function(i){
		var parentWidth = $(this).width();
		var PositionLeft = (parentWidth-198)/2;
		$(this).children("ul:eq(0)").css({'left':PositionLeft+'px'});
	});
	$('#slider').nivoSlider({
        effect:'random',
        animSpeed:500,
        pauseTime: 4000,
        startSlide:0,
		directionNav:false
    });
	$('.hidden').remove();
});

