var jQ = jQuery.noConflict();

/*jQ.fn.delay = function(time, callback){
	// Empty function:
	jQuery.fx.step.delay = function(){};
	// Return meaningless animation, (will be added to queue)
	return this.animate({delay:1}, time, callback);
}
*/
function laden() {
	jQ('.totop').click(function(){
	     jQ('html, body').animate({scrollTop: '0px'}, 300);
	     return false;
	});
	jQ('.ajaxify').ajaxify({
		animateOut:{opacity:'0'},
		animateOutSpeed:'normal',
		animateIn:{opacity:'1'},
		animateInSpeed:'normal',
		target:false,
		tagToload:{
			'.topnavi':'#navigation',
			'.accordion':'#subNavigation',
			'#contentInner':'#contentOuter',
			'#contentFunctions ':'#contentFunctionsOuter'
		},
		onComplete:function(){
			laden();
		}
	});
	
	jQ('.subajaxify').delay(300).ajaxify({
		animateOut:{opacity:'0'},
		animateOutSpeed:'normal',
		animateIn:{opacity:'1'},
		animateInSpeed:'normal',
		tagToload:{
			'.topnavi':'#navigation',
			'.accordion':'#subNavigation',
			'#contentInner':'#contentOuter',
			'#contentFunctions ':'#contentFunctionsOuter'
		},
		onComplete:function(){
			laden();
		}
	});
	

	jQ('.accordion').accordion({
		event: 'mouseover',
		autoHeight: false,
		navigation: true, 
		collapsible: false,
		active: '.active'
	});
}

jQ(document).ready(function(){
	

/*	
	// initialise plugins
	jQuery(function(){
		jQuery('ul.accordion').superfish({
				pathClass: 'akkaktiv',
				autoArrows:  false,
				dropShadows: false, 
			});
		});
*/	

	jQ("#flash").flash({
		src: 'fileadmin/_flash/header.swf',
		wmode: 'opaque',
		width: 960,
		height: 800 },
		{
			version: 6
		}
	);


	jQ("#contentpage #flash")
		.animate({height: 110, top: 60 }, 0
	);

	jQ("#contentpage #container")
	.fadeIn(0);

	jQ('.accordion').accordion({
		event: 'mouseover',
		autoHeight: false,
		navigation: true, 
		collapsible: false,
		active: '.active'
	});

	jQ('.totop').click(function(){
	     jQ('html, body').animate({scrollTop: '0px'}, 300);
	     return false;
	});


});