
$(document).ready(function(){
    $(".mainnav img").hover(
    function(){
      this.src = this.src.replace("_grau","_blau");
    },
    function(){
      this.src = this.src.replace("_blau","_grau");
    });
    
/******************* referenzen ************************************/
  $('.rgslideshow').css('width','523px');
    
/************* Stellenangebote ************************************/
    /******** wenn hover über textmenü, auch punkte aktiv ****/
    $(".joboffers li a").hover(
    function(){
      //alert($(this).attr('class'));
      $("#map ."+$(this).attr('class')).addClass('hover');
    },
    function(){
      $("#map ."+$(this).attr('class')).removeClass('hover');
    });
    
    
    /******** wenn hover über punkte, auch text aktiv ****/
    $("#map a").hover(
    function(){
      //alert($(this).attr('class'));
      $(".joboffers ."+$(this).attr('class')).addClass('hover');
    },
    function(){
      $(".joboffers ."+$(this).attr('class')).removeClass('hover');
    });
    
    /******** bei kllick das href aus liste holen ****
    $("#map a").click(
      function(){
        alert($(this).attr('class'));
        var link = $(".joboffers ."+$(this).attr('class')).attr('href');
        //alert(link);
        //var link = $(this).attr("link");
        //window.location = link;
      }
    );
    */


/************* Standorte ************************************/
    /******** wenn hover über textmenü, auch punkte aktiv ***/
    $("#sub-navi li a").hover(
    function(){
      //alert($(this).attr('class'));
      $("#map-standorte ."+$(this).attr('class')).addClass('hover');
    },
    function(){
      $("#map-standorte ."+$(this).attr('class')).removeClass('hover');
    });
    
    
    /******** wenn hover über punkte, auch text aktiv ***/
    $("#map-standorte a").hover(
    function(){
      //alert($(this).attr('class'));
      $("#sub-navi ."+$(this).attr('class')).addClass('active');
    },
    function(){
      $("#sub-navi ."+$(this).attr('class')).removeClass('active');
    });
    
    $('.link-detail-standorte').toggle(function() {
      $(this).html('Deutschlandkarte');
      //$(this).addClass('active-standorte');
      $('.image-map').css('display','none');
      $('.image-map-detail').css('display','block');
    }, function() {
      //$(this).removeClass('active-standorte');
      $(this).html('Detailkarte');
      $('.image-map').css('display','block');
      $('.image-map-detail').css('display','none');
    });
    
});
