
function show(element){
	//element.className += "hover";
	$(this).addClass('hover');
}
function hide(element){
	//element.className = element.className = "";
	$(this).removeClass('hover');
}



function disableActiveItem() {
	//$('#primNavBox > li a.active').css('height', '20px');
	//$('#primNavBox > li a.active').css('border-color', '#fff');
}
function enableActiveItem() {
	$('#primNavBox > li a.active').css('height', '');
	$('#primNavBox > li a.active').css('border-color', '');
	//if($('#primNavBox > li').hasClass('active')) {$('#primNavBox > li.active').toggleClass('active');}
}
$(document).ready(function(){


	//Bei Seitenaufruf öffnen, wenn toggleKlasse gesetzt ist
	$('div.toggle-open').next('div.content').slideToggle('slow', function() {
		var targetOffset = $('div.toggle-open').offset().top;
		$('html,body').animate({scrollTop: targetOffset}, 1000);
	});
	
	// toggle für Unternehmensbereich
    $('div.toggler').click(function() {
      $(this).next('div.content').slideToggle('slow');
      if($(this).children('span').html() == '-') { $(this).children('span').html('+'); } else { $(this).children('span').html('-');}
    });

	// bildergallerie
	$.init_slide('imgstore','showhere',2000);
	
	// Historie
	$('.historie-timetable div').mouseover(function() {
		$(this).addClass('hover');
	});
	$('.historie-timetable div').mouseout(function() {
		$(this).removeClass('hover');
	});
	$('.historie-timetable div').click(function() {
		var btn_id = $(this).attr('id');
		var id = btn_id.substr(5, btn_id.length);	
	
		$('.historie-timetable > div').removeClass('active');
		$(this).addClass('active');
		
		$('.historie-timetable-content-container > div').removeClass('show');
		$('#content_' + id).addClass('show');
		
	});

	
	// Kontaktformular
	$('#kontaktform #location').change(function () {
      if ($(this).val()=='hamburg@augprien.de') {
		$('#kontaktform div.division').show();
	  } else {
		$('#kontaktform div.division').hide();
	  }
    });	
	
	// Tabelle aus Projektdetailseite
	$(".additional-info table tr:even").css("background-color", "#fff");
	$(".additional-info table tr:odd").css("background-color", "#F4F6F9");

	$("a#single_map").fancybox();
});