$(document).ready(function(){
	externalLinks();
	initSifr();
});

function sfeerCycle() {
	$('.cycle').cycle({
		fx: 'fade',
    	next: 'a#next',
		prev: 'a#prev',
		after: function(curr,next,opts) {
			initSifr();	
		}
		/*before: onBefore*/
	});
	$('a#pauze').toggle(
		function(){
			$('.cycle').cycle('pause');
			$(this).addClass('play');
		},
		function(){
			$('.cycle').cycle('resume');
			$(this).removeClass('play');
		}
	);
	/*function onBefore(){
		$('nav h1').html(this.alt);
	}*/	
}
function externalLinks() {  
	if (!document.getElementsByTagName) return;  
		var anchors = document.getElementsByTagName("a");  
 		for (var i=0; i<anchors.length; i++) {  
   			var anchor = anchors[i];  
   			if (anchor.getAttribute("href") &&  
       		anchor.getAttribute("rel") == "external")  
     		anchor.target = "_blank";  
		}
}

function initSifr(){
sIFR.replace(sifr,{selector:'h1.titel',css:['.sIFR-root{color:#ffffff;font-style:normal;font-size:50px;}'],wmode:'transparent'});
}
