// jQuery START -->
jQuery.noConflict();
jQuery(document).ready(function($) {

$(function() {		
		
	// initialize scrollable with mousewheel support
	$(".scrollable").scrollable({ vertical: true, mousewheel: true, keyboard: true, circular: true }).autoscroll({ autoplay: true });	
	
});

$("a[rel]").overlay();
// $("#navitabs").tabs("#navipanes > div", { history: true });
});
// jQuery ENDE -->





// Mootools START -->
window.addEvent('domready',function() { // window.addEvent('domready' START

Hyphenator.config({displaytogglebox : false,minwordlength : 4});
Hyphenator.run();


// Initialisieren
new SmoothScroll	({duration:500});
// new LazyLoad		({onLoad: function(img) {img.setStyle('opacity',0).fade(1);}});
scroll_zutop();


// externe Links
$$('a').each(function(link) {
if(link.hostname != window.location.host && link.id != "top" && link.get('class') != "jumplink") {
	link.addClass('externer_link');
}
});



}); // window.addEvent('domready' ENDE
// Mootools ENDE -->


function scroll_zutop() {
// ScrollSpy & SmoothScroll -->
$('zutop').set('opacity','0').setStyle('display','block');
  
	var ss = new ScrollSpy({
		min: 100,
		onEnter: function(position,state,enters) {
			$('zutop').fade(1.0);
		},
		onLeave: function(position,state,leaves) {
			$('zutop').fade('out');
		},
		container: window
	});
};


function an(element_id,opacity) {
	var element_id 	= element_id;
	var opacity 	= (opacity != '') ? opacity : '1';
	// $(element_id).style.display = "inline";
	$(element_id).set('tween', {duration: 100});
	$(element_id).tween('opacity', opacity);
};


function aus(element_id,opacity) {
	var element_id = element_id;
	var opacity 	= (opacity != '') ? opacity : '0';
	// $(element_id).style.display = "none";
	$(element_id).set('tween', {duration: 500});
	$(element_id).tween('opacity', opacity);
};
