


$(document).ready(function(){
		FLIR.init( { path: '_system/facelift/' } );
		
		$("h2").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'melli' , cSize:'28', mode:'progressive' })); } );
		$("h3:not(.noflir)").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'melli' , cSize:'16', mode:'progressive' })); } );
		$("span.flir2").each( function() { FLIR.replace(this , new FLIRStyle({ cFont:'melli' , cSize:'20', mode:'progressive' })); } );
		$("a.flir").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'melli' , cColor:'ffffff', cSize:'14', mode:'wrap' })); } );
		$("span.flir").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'melli' , cSize:'14', mode:'wrap' })); } );
		$("h4.flir-white").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'melli' , cSize:'16', mode:'wrap' })); } );
		
		if($.cookie('musik') && $.cookie('musik')=="off") {
			$("#container").prepend('<a id="ton-aus" href="javascript:void(0);">Ton an</a>');
			$('div#musikplayer').remove();
			$('a#ton-aus').toggle(
				function(){
					$(this).html("Ton aus");
					$.cookie('musik', 'on'); 
					location.reload();
					return false;
					},
				function(){
					$('div#musikplayer').remove();
					$(this).html("Ton an");
					$.cookie('musik', 'off'); 
					return false;
					}
			
			);
		}
		else {
			$("#container").prepend('<a id="ton-aus" href="javascript:void(0);">Ton aus</a>');
			$('a#ton-aus').toggle(
				function(){
					$('div#musikplayer').remove();
					$(this).html("Ton an");
					$.cookie('musik', 'off'); 
					return false;
					},
				function(){
					$(this).html("Ton aus");
					$.cookie('musik', 'on'); 
					location.reload();
					return false;
					}
			);	
		
		}
		
		
		
		
});

function slide1() {
	var e = document.getElementById('1');
	if (e) {
		e.style.left = e.offsetLeft + 1 + 'px';  
		if (e.offsetLeft<800) {	
			if (e.offsetLeft==0) {
				slide2();
			}	
			window.setTimeout('slide1()',30);  
		}
		else {
			e.style.left = "-1055px";
		}
	}
}

function slide2() {
	var e2 = document.getElementById('2');
	if (e2) {
		e2.style.left = e2.offsetLeft + 1 + 'px';  
		if (e2.offsetLeft<800) {	
			if (e2.offsetLeft==0) {
				slide1();
			}	
			window.setTimeout('slide2()',30); 
		}
		else {
			e2.style.left = "-1055px";
		}
	}
}
