function dom_init() {

  //$('a.lightbox').lightBox();

}

$(document).ready(function(){
	$('ul#banner').innerfade({
	animationtype: 'fade',
	speed: 3000,
	timeout: 7000,
	type: 'random_start',
	containerheight: '164px'
	});
	
	$('ul#werbung').innerfade({
	animationtype: 'fade',
	speed: 3000,
	timeout: 3500,
	type: 'random_start',
	containerheight: '150px'
	});
	
	$('.zwanzig').flash(
	{
		swf: '/fileadmin/templates/relaunch/flash/IMM_20Jahre-Banner.swf',
		width: 195,
		height: 162,
		
		flashvars: {
				clickTag: 'http://www.imm-mainz.de/index.php?id=tag_der_offenen_tr'
		}
	});
	
	$("a#tuev").colorbox();
});

function goforit(element)
{
	var show;
	
	if(element == "all")
	{
		$('#listele_'+ element).toggleClass("kat_1_akt", "addOrRemove");
				
		if($('#formval_'+ element).val() != 0)
		{
			$('#formval_'+ element).val(0);
			$('.katval').val(0);
			$('.kat_3').removeClass("kat_3_akt");
		}
		else
		{
			$('#formval_'+ element).val(1);
			$('.kat_3').addClass("kat_3_akt");
			
			$('.katval_2').each(function(index)
			{
				show = $(this).val();
				$('#formval_'+ show).val(show);
			});
		}

		$('.teaserbox img').hide()
		
													
			$('.katval').each(function(index)
			{
				show = $(this).val();
				
				$('.kategorie_'+show).show();
			});
	}
	else
	{
	
		$('#listele_'+ element).toggleClass("kat_3_akt", "addOrRemove");
		
		if($('#formval_'+ element).val() != 0)
		{
			$('#formval_'+ element).val(0);
		}
		else
		{
			$('#formval_'+ element).val(element);
		}
		
		$('.teaserbox img').hide()
		
													
			$('.katval').each(function(index)
			{
				show = $(this).val();
				
				$('.kategorie_'+show).show();
			});	
	}
}

function pointit(element)
{
	$('#objekt_'+ element).toggleClass("teaserbox_hover", "addOrRemove");
}

function getdetail(element)
{
	$(".detail_box_content").fadeTo("slow",0.1,function() {
	
		$.ajax({
		  url: "/fileadmin/templates/scripte/getteaserinfo.php",
		  cache: false,
		  data: "obj="+element,
		  success: function(html){
			$(".detail_box_content").html(html);
			$(".detail_box_content").fadeTo("slow",1.0);
		  }
		});
	});
}

function getdetail_en(element)
{
	$(".detail_box_content").fadeTo("slow",0.1,function() {
	
		$.ajax({
		  url: "/fileadmin/templates/scripte/getteaserinfo_en.php",
		  cache: false,
		  data: "obj="+element,
		  success: function(html){
			$(".detail_box_content").html(html);
			$(".detail_box_content").fadeTo("slow",1.0);
		  }
		});
	});
}


