/* wrap with function($), so it works! */
jQuery(document).ready(function($) {
	
	$('#ausstellung_artist').cycle({
		fx: 'scrollHorz', // name of transition effect (or comma separated names, ex: fade,scrollUp,shuffle)
		speed : 300, // speed of the transition (any valid fx speed value)
		timeout : 8000, // milliseconds between slide transitions (0 to disable auto advance)
		// easing:			'easeinout',
		next : '#cyclenext', // selector for element to use as click trigger for next slide
		prev : '#cycleprev', // selector for element to use as click trigger for previous slide
		prevNextEvent : 'click.cycle', // event which drives the manual transition to the previous or next slide
		sync : 1, // true if in/out transitions should occur simultaneously
		// random:			1,						// true for random, false for sequence (not applicable to shuffle fx)
		pause : 1, // true to enable "pause on hover"
		cleartype : 1						// enable cleartype corrections
	});

	// Hide the prev and next Buttons
	$('.cyclebuttonprev').hide();
	$('.cyclebuttonnext').hide();

	var numArtist = $('.cycleArtist').length;

	// Einblenden Buttons, nur wenn mehrere Künstler
	if(numArtist > 1) {
		$('#cycle_Wrapper').mouseover(function() {
			$('.cyclebuttonprev').show();
			$('.cyclebuttonnext').show();
		});
	}

	// Ausblenden Buttons
	$('#cycle_Wrapper').mouseout(function() {
		$('.cyclebuttonprev').hide();
		$('.cyclebuttonnext').hide();
	});
});

