/* DIE FUNKTIONEN :) */


/* FANCYBOX */

jQuery(document).ready(function() {

		$("a.dates").fancybox({
		'hideOnContentClick': true,
		'width'				: 400,
		'padding'			: 10,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'type'				: 'iframe'
	});
});

			$(function() {
			$("a.animatedimage").fancybox({'hideOnContentClick': true});

			$("a.frame").fancybox({
			'width'				: '95%',
			'height'			: '95%',
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});

			}	);



/* TOP MOVING BG */

var scrollSpeed = 50; // speed in milliseconds
var current = 0; // set the default position
var direction = 'h'; // set the direction
function bgscroll(){
	current -= 1;
	$('div#top').css("backgroundPosition", (direction == 'h') ? current+"px 0" : "0 " + current+"px");
}
 setInterval("bgscroll()", scrollSpeed);


/* NIVO SLIDER */

$(document).ready(function() {
	$('#slider').nivoSlider({
		pauseTime: 5500,
		effect: 'boxRain',
		});
});


/* ACCORDION JQUERY UI */

$(document).ready(function() {
  $("#accordion").accordion({
		  collapsible:true,
		  autoHeight:false,
		  active: '.selected'
		  });
});

/* ACCORDION JQUERY UI Sprung */
function scrollgroup ()
{
 	$(window).scrollTop( $(".termine_tabelle tbody tr.aktiv").offset().top - 60   );
}

/* DATES */

$(document).ready(function() {
	$('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});

