// usage: pnc_openWin('popup.html','name',780,450,'no',0,0);	pos: links/oben 
// usage: pnc_openWin('popup.html','name',780,450,'no','no',0);	pos: mittig/oben
// usage: pnc_openWin('popup.html','name',780,450,'no');	pos: zentriert

// begin update 08-02-11
WinAppearance="toolbar=no,location=no,directories=no,status=no,resizable=yes,copyhistory=no";
// end update 08-02-11

function pnc_openWin(url,name,popWidth,popHeight,scroll,popLeft,popTop)
{ 
    leftPos=!isNaN(popLeft) ? popLeft : screen.width ? (screen.width-popWidth)/2 : 20;
    topPos=!isNaN(popTop) ? popTop : screen.height ? (screen.height-popHeight)/2 : 20;
    eval("pnc_"+name+"=window.open('"+url+"','"+name+"','"+WinAppearance+",scrollbars="+scroll+",width="+popWidth+",height="+popHeight+",left="+leftPos+",top="+topPos+"');");
    eval("pnc_"+name+".focus()");
    return false;
}



$(document).ready
(
	function()
	{
    	actSubArr = $( "#navigation .active" );

      $( '#navigation > li:has(ul)' ).hover
      (
  			function()
  			{
  				actSubArr.attr("class","active_tmp");
  			},
  			function()
  			{
  				actSubArr.attr("class","active");
  			}
  		);
      
      $("#font-size-switch a").click( function () 
       {
        $("#wrapper").attr("class", "fs_"+$(this).attr("class"));
        $(this).blur();
        }
      );
      
	}
);

function loadTeaser(teaserIndex)
{
  $.ajax({
    data: "&pos="+teaserIndex,
    url: "_inc/ajax_teaser.php",
    type: "GET",
    cache: false,
    success: function(html){
      $("#teaser_switch").html(html);
      $("a").focus(function(){
        $(this).blur();
      });
    }
  });
}