function mainmenu(){
  $("#menu ul").css({display: "none"}); // Opera Fix
  
  var config = {    
     sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)   
     interval: 1, // number = milliseconds for onMouseOver polling interval    
     over: show, // function = onMouseOver callback (REQUIRED)    
     timeout: 150, // number = milliseconds delay before onMouseOut    
     out: hide // function = onMouseOut callback (REQUIRED)    
  };
 
  $("#menu li").hoverIntent( config )  
}
 
function show(){
  $(this).find('ul:first').css({visibility: "visible",display: "none"}).show(200);
}
 
function hide(){
  $(this).find("ul:first").css({"visibility": "hidden"});
}
 
$(function() {
  $("#news").jMyCarousel({
       visible: '3',
       eltByElt: true,
       mouseWheel: false,
       vertical: false,
       circular: true,
       evtStart: 'mousedown',
       evtStop: 'mouseup'
  });
});
 
$(function() {
       $('a[rel^=lightbox]').lightBox();
});
 
function openNewWindow(a, b, c, d){
  var width = screen.width;
  var height = screen.height;
  var pos_x = (width/2)-(c/2);
  var pos_y = (height/2)-(d/2);
 
  var windowIndex = window.open(a, b,"width="+c+",height="+d+",left="+pos_x+",top="+pos_y+",scrollbars=1,status=0,menubar=0,resizable=1,location=0,toolbar=0");
 
  windowIndex.focus();
}
 
function fenster(a, b, c, d){
  //PopUp Window fuer alte Funktion
  openNewWindow(a, b, c, d);
}
 
function stripHTML(str){
  return str.replace(/<[^>]*>/g, "");
}
 
function trim (str) {
  return str.replace(/[\n\r]/g, '').replace(/ +/g, ' ').replace(/^\s+/g, '').replace(/\s+$/g, '');
}

$(document).ready(function(){
mainmenu();

if ($("#actual").next("table td[bgcolor='#181878']").length > 0 ) {
   var titleTContains = $("#actual").next("table td[bgcolor='#181878']").html();

   titleTContains = stripHTML(titleTContains);
   title = trim(titleTContains);

   $("#actual").next("table[cellpadding='3'][border='0']").find("td[bgcolor='#181878']").andSelf().remove();

   if(navigator.appName == "Microsoft Internet Explorer"){
     $("#page #actual:after").append('<h2 style="font- family:Georgia, \'Times New Roman\', Times, serif;font-size:16px;border-bottom:1px solid #1a3199;width:750px;color:#1a3199;padding-top:15px;">'+title+'</h2>');
   }
   else {
     $("#page #actual:after").append('<h2 style="font- family:Georgia, \'Times New Roman\', Times, serif;font-size:16px;border-bottom:1px solid #1a3199;width:750px;color:#1a3199;margin-left:20px;padding-top:15px;">'+title+'</h2>');
   }
}

});
