// JavaScript Document

		function focusoff() {
			$('a').focus(function(){
				$(this).blur();
				$(this).attr("hideFocus", "hidefocus");
			});
		}

//menulinks --> fadein / fadeout

		function menuon(status) {
			if (status == 0) {
				$('#startnavi').hide();
				$('#startnavi').fadeIn(5000);
				$('#slogan').hide();
				$('#slogan').fadeIn(5000);
				$('#linkblock').hide();
				$('#linkblock').fadeIn(5000);
			}else 
			if (status == 1) {
				$('#startnavi').hide();
				$('#startnavi').fadeIn(1000);
				$('#slogan').hide();
				$('#slogan').fadeIn(5000);
			}
		}		
		
//menulinks --> Frau verschieben
		
		function clickding(hlink) {
			if (hlink == "index.php?menu=1") {
			$('#content').hide();
			$('#frau').animate({"left": 280 },1000,"swing",function(){
					location.href = hlink;
				});
			}
			
			$('#startnavi').hide();
			$('#frau').animate({"left": 490 },1000,"swing",function(){
					location.href = hlink;
				});
		}

//pageinhalt --> ein/ausfaden
		
		function fadeout(hlink) {
			$('#hauptblock').fadeTo(500,0,function(){
				location.href = hlink;
			});		
		}
		
		function fadein() {
			$('#hauptblock').fadeTo(0,0,function(){
				$('#hauptblock').fadeTo(500,1);
			});		
		}
			
		
//kategorien --> öffnen und schliessen

		function ausblenden() {
			$('.block').removeClass("linie");
			$('.block div').hide();
			$('.block p').hide();
		}
		
		var blockoffen = 0;
		
		function einblenden(blockid) {

			if (blockoffen != 0) {
					var tbid = "#block" + blockoffen;
					var tbidd = "#block" + blockoffen + " div";
					var tbidp = "#block" + blockoffen + " p";
					
					$(tbid).removeClass("linie");
					$(tbidd).hide();
					$(tbidp).hide();	
			} 
				
			var bid = "#block" + blockid;
			var bidd = "#block" + blockid + " div";
			var bidp = "#block" + blockid + " p";
			
			$(bid).addClass("linie");
			$(bidd).show();
			$(bidp).show();
			
			if (blockid != blockoffen) {
				blockoffen = blockid;
				blockid = 0;
			}
			
			if (blockoffen == blockid) {
					var ttbid = "#block" + blockoffen;
					var ttbidd = "#block" + blockoffen + " div";
					var ttbidp = "#block" + blockoffen + " p";
					
					$(ttbid).removeClass("linie");
					$(ttbidd).hide();
					$(ttbidp).hide();
					
					blockoffen = 0;
			}
		}
		
//studio --> scrollen links/rechts	bildload

var tposition = 0;
var meinInterval;

		function pfeil(richtung){
			
			
			var t = $('#bilder');
			var position = t.position();
			tposition = position.left;
		
			if(richtung == 'rechts'){
			scrollrechts();
			}else 
			if(richtung == 'links'){
			scrolllinks();
			}
		}
		
		/*function ausloesen(richtung){
			
			
			var t = $('#bilder');
			var position = t.position();
			tposition = position.left;
		
			if(richtung == 'rechts'){
			meinInterval = setInterval("scrollrechts()",25);
			}else 
			if(richtung == 'links'){
			meinInterval = setInterval("scrolllinks()",25);
			}
		}*/
		
		function scrollrechts() {
			if (tposition != -1968) {
			tposition = tposition -492;
						
			$('#bilder').animate({"left": tposition},500);
			}
		}
		
		function scrolllinks() {
			if (tposition != 0) {
			tposition = tposition +492;
						
			$('#bilder').animate({"left": tposition},500);
			}

		}
		
		/*function stoppen() {
			$('#bilder').css({"left": tposition});
			clearInterval(meinInterval);
		}*/
		
//lightbox 
		
		function bildload(wer) {
			$('#lbox').css('display','block');
			$('#lboxbg').css('display','block');
			$('#lboxbg').css('opacity' , 0.9);
			$('#divmitte').css('opacity' , 'none');
			$('#bildtitel h1').html(wer);
			$('#bildgross').css("background-image" , "url(pictures/" +wer+ ".jpg)");
		}
		
		function bildclose(wer) {
			$('#lbox').css({"display" : "none"});
			$('#lboxbg').css({"display" : "none"});
		}

//team --> portrait umstellen

		function portrait(wo) {
			$('#textuntertitel2 a').css({"font-weight" : "normal"});
			$('#portraitdiv').animate({"left" : wo},500);
			$('#' + wo).css({"font-weight" : "bold"}); 
		}

//INTRESSEN öffnen/schliessen

		function intressoff(oid) {
			if (oid == 0) {
				$('#intressblock').css({"top" : -180});
			}else {
				$('#intressblock').css({"top" : 0});
			}
		}
		
		function openintressblock(menuid) {
			if (menuid != 0) {
				$('#intressblock').animate({"top" : 0}, 1200);
				einblenden(menuid);
			}
		}
