    
jQuery(document).ready(function(){
    
	jQuery('.sf-menu').superfish({ 
		delay:       500,                           	// one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                         	// faster animation speed 
		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 
	}); 
		
	jQuery('#controller').jFlow({
		slides: "#slides",
		controller: ".jFlowControl", // must be class, use . sign
		slideWrapper : "#jFlowSlide", // must be id, use # sign
		selectedWrapper: "jFlowSelected",  // just pure text, no sign
		auto: true,     //auto change slide, default true
		width: "585px",
		height: "220px",
		duration: 500,
		prev: ".jFlowPrev", // must be class, use . sign
		next: ".jFlowNext" // must be class, use . sign
	});
	
	// smooth scrolling
	jQuery("a.scrollPage").click(function() {
		var elementClicked = jQuery(this).attr("href");
		var destination = jQuery(elementClicked).offset().top;
		jQuery("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 1000 );
		return false;
	});
	
	// open links with rel=external in a new window
	jQuery('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});


	// superbox settings and activation
	jQuery.superbox.settings = {
		boxId: "superbox", // Id attribute of the "superbox" element
		boxClasses: "", // Class of the "superbox" element
		overlayOpacity: .7, // Background opaqueness
		boxWidth: "600", // Default width of the box
		boxHeight: "400", // Default height of the box
		loadTxt: "Loading...", // Loading text
		closeTxt: "schliessen", // "Close" button text
		prevTxt: "Previous", // "Previous" button text
		nextTxt: "Next" // "Next" button text
	};
	jQuery.superbox();
	
	// allen Links der galerie ein rel="superbox" hinzufuegen
	jQuery(".gallery-icon a").attr("rel","superbox[gallery][thePostGallery]")

});






