// JavaScript Document








function moveico(boxname,art){

	if(art=='auf'){

		$("#"+boxname+" img").css({'margin-top':'0px'});	

	}

	if(art=='zu'){

		$("#"+boxname+" img").css({'margin-top':'20px'});	

	}

}

function auf(boxname,richtung){
   var ho=$("#pbox"+boxname+" h1").height();

   $("#pbox"+boxname).stop().animate({ 
	height:($("#inh"+boxname ).height()+48+ho)+"px"
    }, 500 );

    $("#pbox"+boxname+" h1 a").attr("style",'background:url("fileadmin/templates/img/bg_offen.jpg") no-repeat scroll 0 0px transparent');
    $("#pbox"+boxname+" h1 a").attr("href","Javascript:zu('"+boxname+"');");

}

function zu(boxname){
     var ho=$("#pbox"+boxname+" h1").height();
     $("#pbox"+boxname).stop().animate({ 
	height:ho+"px"
    }, 500 );

    $("#pbox"+boxname+" h1 a").attr("style",'background:url("fileadmin/templates/img/bg_zu.jpg") no-repeat scroll 0 0px transparent');
    $("#pbox"+boxname+" h1 a").attr("href","Javascript:auf('"+boxname+"','1');");

	
}
function hheight(boxname){
	
     var ho=$("#"+boxname+" h1").height();
     $("#"+boxname).attr("style","height: "+ho+"px;");
}
function callp(wert){
	location.replace("/"+wert);
}
function callp2(wert){
	location.replace(""+wert);
}

$(document).ready(function(){
    //$(document).bind("contextmenu",function(e){
    //    return false;
    //});
   $("#INHALT area").each(function(index){
		
		$(this).attr("title",$(this).attr("alt"));
	});
  $("div.tooltip").each(function(){
		l=parseInt($(this).find("span").css("left"));
		$(this).find("span").css("left",(l+800)+"px")
	});
   $("div.tooltip").mouseover(function(){
	
	l=parseInt($(this).find("span").css("left"));
	$(this).find("span").css("left",(l-800)+"px")
   });
   $("div.tooltip").mouseout(function(){
	l=parseInt($(this).find("span").css("left"));
	$(this).find("span").css("left",(l+800)+"px")
   });
   $("#captchabild").click(function(){
	$("#captchabild").removeAttr("src").attr("src", "/typo3conf/ext/captcha/captcha/captcha.php?t="+ new Date().getTime());
   });

     

});
