    // Menü-Schrift ersetzen
    Cufon.replace('#menu ul li a',
    {
    	fontFamily : 'Myriad Pro',
    	textShadow: '#670714 -1px -1px',
    	fontWeight: 700
    });

    // Überschriften ersetzen
    Cufon.replace('h1, h2, h3',
    {
    	fontFamily : 'Myriad Pro',
    	fontWeight: 700
    });

    Cufon.replace('#servicemitte',
    {
    	fontFamily : 'Myriad Pro'
    });

    Cufon.replace('.angebot-voransicht strong',
    {
    	fontFamily : 'Myriad Pro',
    	fontWeight: 700
    });

    // Funktion zum Anhängen des Hover-Pfeils im Menü
    attach_arrow = function(element)
    {
      detach_arrow();
      var position = $(element).position();
      if (position)
      {
        var offset_x = position.left + $(element).width() + parseInt($(element).css('padding-left'), 10);
        var offset_y = position.top;
        $(element).append('<div id="active_element_arrow"></div>');
        $('#active_element_arrow').css(
          {
            'top': offset_y + 'px',
            'left': offset_x + 'px',
            display: 'none'
          }
        ).fadeIn('slow');
      }
    }


    // Funktion zum Abhängen des Hover-Pfeils im Menü
    detach_arrow = function()
    {
      $('#active_element_arrow').remove();
    }


    $(document).ready(function()
    {

      // Pfeil an den Link des aktiven Bereichs anhängen
      attach_arrow($('#menu ul li a.active'));

			// wiederhole das ganze bei einem Window-Resize
	    $(window).resize(function(){
			  attach_arrow($('#menu ul li a.active'));
			});


      // Hover-Funktion Menü
      $('#menu ul li a').hover(
        function()
        {
          attach_arrow($(this));
        },
        function()
        {
          detach_arrow();
          // Pfeil an den Link des aktiven Bereichs anhängen
          attach_arrow($('#menu ul li a.active'));
        }
      );

      $('.popup-link').click(function()
      {
        var href = $(this).attr('href');
        var width = 950;
        var height = 700;
        var l = (screen.availWidth - width) / 2;
        var t = (screen.availHeight - height) / 2;
        window.open(href,'popup','width=' + width + ',height=' + height + ',toolbar="no",scrollbars="no",menubar="no",left=' + l + ',top=' + t + '');
        return false;
      })

      $('.popup-info').click(function()
      {
        var href = $(this).attr('href');
        var width = 800;
        var height = 600;
        var l = (screen.availWidth - width) / 2;
        var t = (screen.availHeight - height) / 2;
        window.open(href,'popup','width=' + width + ',height=' + height + ',toolbar="no",scrollbars="no",menubar="no",left=' + l + ',top=' + t + '');
        return false;
      })

    });

// input blur 		(c) Daniel Sokoll
function setfocus(obj)
{
  if(!obj.origsearchphrase)
  {
    obj.origsearchphrase = obj.value;
  }
  if(obj.value == obj.origsearchphrase)
  {
    obj.value = '';
  }
}

function leavefocus(obj)
{
  if(obj.value == '')
  {
    obj.value = obj.origsearchphrase;
  }
}
