$(document).ready(function() {

//$.cookie("context_localisation", "at", { expires: 7 });

$('#animation').cycle({ 
    fx:    'fade', 
    speed:  4000 
 });

//if($("#um").html() != ""){ $("#um").show(); $("#navigation_main").animate({ height: '90' }); }


$(".tabs_content_2").hide(); $(".tabs_content_3").hide(); $(".tabs_content_4").hide();
if($(".tabs_titel_2").html() != ""){}else{ $(".tabs_titel_2").hide(); }
if($(".tabs_titel_3").html() != ""){}else{ $(".tabs_titel_3").hide(); }
if($(".tabs_titel_4").html() != ""){ $(".tabs_titel_4").show(); }else{}


$(".tabs_titel_1").removeClass("active");
if ($.getURLParam("tab")==2) {
$(".tabs_content_2").show();
$(".tabs_titel_2").addClass("active");
}else if ($.getURLParam("tab")==3) {
$(".tabs_content_3").show();
$(".tabs_titel_3").addClass("active");
}else if ($.getURLParam("tab")==4) {
$(".tabs_content_4").show();
$(".tabs_titel_4").addClass("active");
}else if(!$.getURLParam("tab") || $.getURLParam("tab")==1){
$(".tabs_content_1").show();
$(".tabs_titel_1").addClass("active");
}

$(".tabs_titel_1").click(function() {
  $(".tabs_titel_1").addClass("active");
  $(".tabs_titel_2").removeClass("active");
  $(".tabs_titel_3").removeClass("active");
  $(".tabs_titel_4").removeClass("active");
  
  $(".tabs_content_2").slideUp('slow', function() {  
  $(".tabs_content_3").slideUp('slow', function() {  
  $(".tabs_content_4").slideUp('slow', function() {  $(".tabs_content_1").slideDown('slow'); }); }); });
});

$(".tabs_titel_2").click(function() {
  $(".tabs_titel_1").removeClass("active");
  $(".tabs_titel_2").addClass("active");
  $(".tabs_titel_3").removeClass("active");
  $(".tabs_titel_4").removeClass("active");
  
  $(".tabs_content_1").slideUp('slow', function() {
  $(".tabs_content_3").slideUp('slow', function() {  
  $(".tabs_content_4").slideUp('slow', function() {  $(".tabs_content_2").slideDown('slow'); }); }); });
});

$(".tabs_titel_3").click(function() {
  $(".tabs_titel_1").removeClass("active");
  $(".tabs_titel_2").removeClass("active");
  $(".tabs_titel_3").addClass("active");
  $(".tabs_titel_4").removeClass("active");
  
  $(".tabs_content_1").slideUp('slow', function() {
  $(".tabs_content_2").slideUp('slow', function() {    
  $(".tabs_content_4").slideUp('slow', function() {  $(".tabs_content_3").slideDown('slow'); }); }); }); 
});

$(".tabs_titel_4").click(function() {
  $(".tabs_titel_1").removeClass("active");
  $(".tabs_titel_2").removeClass("active");
  $(".tabs_titel_3").removeClass("active");
  $(".tabs_titel_4").addClass("active");
  
  $(".tabs_content_1").slideUp('slow', function() {
  $(".tabs_content_2").slideUp('slow', function() {  
  $(".tabs_content_3").slideUp('slow', function() {   $(".tabs_content_4").slideDown('slow'); }); }); }); 
});

$(".accordeon_header h2 a").addClass("passive");

$(".accordeon_header h2 a").click(function() {
    if($(this).hasClass("passive")){
	 $(this).parent().parent().parent().find(".accordeon_content").slideDown('slow');
	 $(this).removeClass("passive");
	 $(this).addClass("active");
    }else{
	 $(this).parent().parent().parent().find(".accordeon_content").slideUp('slow');
	 $(this).removeClass("active");
	 $(this).addClass("passive");
    }
});

});

$(document).ready(function() {
$('.addthis').append('<!-- AddThis Button BEGIN --><div class="addthis_toolbox addthis_default_style "><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_xing"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a></div><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e69291b6b48b367"></script><!-- AddThis Button END -->');
});
