$.fn.cycle.defaults.timeout = 10000;
	$(function() {
		$('#header-slideshow').cycle({
			fx:     'fade',
			speed:  1000,
			timeout: 10000,
			pause: 1,
			//after:   onAfter,
			pager:  '#header-slideshow-nav',
			pagerAnchorBuilder: function(idx, slide) {
				return '#header-slideshow-nav li:eq(' + idx + ') a';
			}
		});

		$('#header-slideshow-nav a').click(function() {
			this.blur();
		});
	});

	
	$(function() {
		$('#refslideshow-slideshow').cycle({
			fx:     'scrollHorz',
			speed:  1000,
			timeout: 10000,
			pause: 1,			
			pager:  '#refslideshow-nav',
			pagerAnchorBuilder: function(idx, slide) {
				return '#refslideshow-nav li:eq(' + idx + ') a';
			}
		});

		$('#refslideshow-nav a').click(function() {
			this.blur();
		});
		
		
  	$("a[rel=refgroup]").fancybox({
  		'transitionIn'		: 'none',
  		'transitionOut'		: 'none',
  		'titlePosition' 	: 'over',
  		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
  			return '<span id="fancybox-title-over">Affisch ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
  		}
  	});		
  
  	$("a[rel=refgroup2]").fancybox({
  		'transitionIn'		: 'none',
  		'transitionOut'		: 'none',
  		'titlePosition' 	: 'over',
  		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
  			return '<span id="fancybox-title-over">Bild ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
  		}
  	});		
			
	});

