$(document).ready(function()
{	
	 $("a").each(function(i)
 {
 $(this).attr("title",$(this).children().attr("title"));
 $(this).attr("rel","group");
 });
$(".one_picture a:has(img)").fancybox(); 
  $(".two_pictures a:has(img)").fancybox(); 
//$(".text td  a:has(img)").fancybox(); 
$(".pictures  a:has(img)").fancybox(); 	
	auto_width(".pictures");
});

function auto_width(id)
{ 
	var width_image=0;
	var width_all=0;
	var width_text=0;
	$(id).each(function(i)
	{
		if ($(this).children().hasClass("picture_left"))
		{
			width_all=$(this).width();
			width_image=$(this).children().children().width();
			width_text=width_all-width_image-10;
		
			$(this).children(".picture_left").css("width",width_image);
			$(this).children(".text").css("width",width_text);
		}
 	});

}


function frCreateFile(){
window.open('/cgi-bin/wFilecreator.cgi?path=aktuelles/meldungen/&action=showmaskcreatefile&redirectendedit=reloadOpener', 'wFilecreator', 'width=800,height=640');
}
function frCreateFile2(){
window.open('/cgi-bin/wFilecreator.cgi?path=aktuelles/downloads/&action=showmaskcreatefile&redirectendedit=reloadOpener', 'wFilecreator', 'width=800,height=640');
}
