
$(document).ready(function()
{
   $("div.info").css('visibility', 'visible');

   $("div.info").hide();

   $("a.info").mouseenter(function(e)
		   {
		      url = this.href;
		      
		      pos = url.lastIndexOf("=") + 1;
		      
		      id = '#' + url.substring(pos, url.length);
		      
		      if(e.pageX < 900)
		      {
	          $(id).css('left', e.pageX + 15);

	          $(id).css('top', e.pageY - 30);
          }
          else
		      {
	          $(id).css('left', e.pageX - 170);

	          $(id).css('top', e.pageY + 20);
          }

          $(id).css('opacity', '0.8');

          $(id).fadeIn();
			 }
		   );

   $("a.info").mouseout(function()
		   {
		      url = this.href;

		      pos = url.lastIndexOf("=") + 1;

		      id = '#' + url.substring(pos, url.length);

          $(id).fadeOut();
			 }
		   );
		   
		if($('#programmierung').is(':visible'))
		{
		  var height_programmierung = $('#programmierung').css('height');

		  var height_administration = $('#administration').css('height');

		  var height_seminare = $('#seminare').css('height');

      height_programmierung = height_programmierung.replace(/px/, '');

      height_administration = height_administration.replace(/px/, '');

      height_seminare = height_seminare.replace(/px/, '');
      
			var height_max = height_programmierung;
			
			if(height_administration > height_programmierung)
			  height_max = height_administration;

			if(height_seminare > height_max)
			  height_max = height_seminare;
			  
      $('#programmierung').css('height', height_max + 'px');

      $('#administration').css('height', height_max + 'px');

      $('#seminare').css('height', height_max + 'px');
		}
		
		if($('#k1h3').is(':visible'))
		{
			$('#k2p').html(contact());
		}
});

