﻿// JScript-Datei
$(function() {
  //Wird für den ersten Seitenaufruf gebraucht; alle Bilder weg nur das mit Class='an' anzeigen 
//  $('#s1 img').hide();
////  $($('div.tabs ul.tabNavigation a').addClass('an').attr('href')).fadeIn();

//  $('.slogan').hide()
//  //.filter($('.selected').attr('href').replace('#','.')).show();

  //Wird für den ersten Seitenaufruf gebraucht; alle Inhalte Links weg     
//  var contextContainers = $('div.context > div');
//  contextContainers.hide();

//  //Wir für den ersten Seitenaufruf gebraucht; den Tab mit class='selected' aktiv setzen     
  var tabContainers = $('div.tabs > div');
  tabContainers.hide().filter($('.selected').attr('s')).show();
//  $('.selected').css("color", "#000");


  //Tab Klick        
  $('div.tabs ul.tabNavigation a').click(function() {
    $('#s1 img').hide();
    $('.slogan').fadeOut()
    contextContainers.hide();
    tabContainers.hide().filter(this.hash).show();

    $('div.tabs ul.tabNavigation a').removeClass('selected').css("color", "#666");
    $(this).addClass('selected').css("color", "#000");

    $('div.tabs ul.tabNavigation a').removeClass('an')
    $($(this).addClass('an').attr('href')).show();

    return false;
  });

  $('.tabNavigation a').mouseover(function() {
    $('#s1 img').hide();
    contextContainers.hide();

    $($('.selected').attr('href')).show();

    $('.slogan').hide().filter($(this).attr('href').replace('#', '.')).fadeIn();
    //$('.sloganTitel').show().stop(); 
  }).mouseout(function() {
    $('.slogan').fadeOut(3000);
  });

  $('.untermenu a').mouseover(function() {
    if ($(this).attr('class') != "aus") {
      $('.slogan').hide();
      $('.sloganTitel').hide()
      $('#s1 img').hide();

      var dasBild = $(this).attr('rel');

      $('#' + dasBild).fadeIn();
      contextContainers.hide().filter('.' + dasBild).show();
    }

    return false;
  });

  //  swapValues = $('.suchfeld').val();

  $('.suchfeld').focus(function() {
    $(this).val("");
  });
  //  .blur(function(){
  //    $(this).val(swapValues);
  //  });

  //Bringt langes Bild zum Vorschein
  //  $('.showText').mouseover(function () {
  //    $('#s1 img').hide();
  //    contextContainers.hide();
  //    
  //    $($('.an').attr('href')).show();
  //    
  //	  return false;
  //  });

  //Für Texte die versteckt sind, zum auf- und zuklappen
  $('.hideMe').hide();

  $('.showHim').click(function() {
    $('.hideMe').show();
  });


});
