
//für alle seiten ausgeführt 
function handleAll(){
	$('#sprachauswahl').selectbox();	
	
	$('#portfolio').innerfade({ 
		animationtype: 'fade', 
		speed: 5000, 
		timeout: '8000', 
		type: 'sequence', 
		containerheight: 'auto',
		runningclass: 'innerfade' 
	});
	
	$('.selectbox-wrapper ul li').click( function(){
		tmp = $(this).attr('id').split("/");
		if(tmp[1] == ""){
			res = $(this).html(); 
			zwei = res.substr(0,2); 
			if(zwei == "Tü")			
				zwei = "tr";
			if(zwei == "Ру")
				zwei = "ru";
			if(zwei == "бъ")
				zwei = "bg"; 
			location.href = "/"+zwei;
		}else{
			location.href = "/"+tmp[1]; 
		}
	});
	
	if(sprache != "bg" && sprache != "ru"){
		//Cufon.replace('#navi2 li, #subnavdiv li', {hover:true, hoverables: { li: true },  fontFamily: 'Optimum'});
		//Cufon.replace('#navigation li', {hover:true, hoverables: { li: true },  fontFamily: 'Optimum', fontWeight: 'bold'});
		//Cufon.replace('#navdreidiv', {fontFamily: 'Optimum'});
	}
	
	$('#suchbutton').click( function(){
		$('#suche').submit(); 
	});
	
}

function handleGallery(){
	//mach die kleinen bilder klickbar 
	$('#galright img.smallgalpic').click( function(){
		tmp = $(this).attr('src').replace("th/", "");
		$('#galright img.biggalpic').attr('src', tmp);
	});
}

function doDivShow(obj){
  dv = $('#div_'+$(obj).attr('id'));
  if($(obj).attr("checked")){
    $(dv).css( 'display', 'block');
  }
  else{
    $(dv).css( 'display', 'none');
  }
}

function show(element){
	element.className += "hover";
}

function hide(element){
	element.className = element.className = "";
}

