function werbung(id,secs)
{
  if (secs==null)
  {
    secs = 3;
  }
  idName3 = '#wlt'+id;
  var ichdarf = false;
  if ($(idName3).css('display')=='none')                                             
  {
			$( "a" ).click(	function( event ){
        if ( ! ichdarf)
        {
          var clink = $(this).attr('href');
          found = clink.search(/jgs_portal.php/i);
          if (found == -1)             
          {
        	  event.preventDefault(); 
        	}  
      	}  
			});
      idName1 = '#wl'+id;
      idName2 = '#wlc'+id;
      $(idName2).css("z-index","1000");
      $(idName3).css("z-index","1001");
      $(idName1).show("slow");
      $(idName3).show("slow");
      $(idName2).delay(secs*1000).show("slow");
      $(idName2).click( function(){
        ichdarf = true;
        $(idName2).hide("slow");
        $(idName3).hide("slow");
        $(idName1).hide("slow");
      });
      $(idName2).mouseover( function(){
        $(idName2).css("cursor","pointer");
      });
      $(idName2).mouseout( function(){
        $(idName2).css("cursor","default");
      });

  }
}

function sonderwerbung()
{
  $("#sonderwerbung").css("z-index","999");
			$("#sonderwerbung").hoverIntent({
				over: funcIn2, 
				timeout: 2000, 
				out: funcOut2
			});
		function funcOut2(){ 
                                          }

		function funcIn2(){ 
    $(this).css("cursor","pointer");
    if ($(this).css("width")=='10px')
    {
	    $(this).animate({
      width : '160px'
    }, 1000, function() {
      // Animation complete.
    });
    }
  }

  $("#sonderwerbung").mouseout( function(){
    $(this).css("cursor","default");
    if ($(this).css("width")=='160px')
    {
	    $(this).animate({
      width : '10px'
    }, 1000, function() {
      // Animation complete.
    });
    }
  });
}


