/*-------------------------------------------------------------------------------------
	*
	*	@copyright:_________2008, Kundenname
	*	@link:______________http://www.kundenwebseite.de
	*	@author:____________Jung v. Matt/Neckar
	*	@function:__________fire functions if doc is loaded
	*
	*	@version:___________1.0
	* 	@revision:__________$Revision: 51 $
	* 	@lastmodified:______$Date: 2008-06-05 10:55:13 +0200 (Do, 05 Jun 2008) $
	*
-------------------------------------------------------------------------------------*/

/*------------------------------------------------
	*	load event
--------------------------------------------------*/

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  /*------------------------------------------------
	*	Subnavigation
	--------------------------------------------------*/
	
/*	$("#snCont ul li a").hover(
		function ()
			{
				alert($(this).filter("ul").id);
			$(this).filter("ul").css("display","block");
			}, 
		function ()
			{
			$(this).filter("ul").css("display","none");
			}
		);*/

  /*------------------------------------------------
	*	Box-Opener
	--------------------------------------------------*/
    
    $(".people li a").click(
        function ()
            {
            if ($(".box:eq("+$(".people li a").index(this)+")").hasClass("on")) {}
                else
                {
                $(".box:visible").fadeOut(1000).removeClass("on");
                $(".people li a").css("font-weight","normal");
                $(this).css("font-weight","bold");
                $(".box:eq("+$(".people li a").index(this)+")").fadeIn(1000).addClass("on");
                }
            return false;
            }
        );
        
    $("h2 a").click(
        function ()
            {
            if ($(".box:eq("+$(".people li a").length+")").hasClass("on")) {}
                else
                {
                $(".box:visible").fadeOut(1000).removeClass("on");
                $(".people li a").css("font-weight","normal");
                $(".box:eq("+$(".people li a").length+")").fadeIn(1000).addClass("on");
                }
            return false;
            }
        );        


	
});


