$(document).ready(function() {
	$(document).pngFix();
	
	$('.mediumBeschriftung').each(function() {
		$(this).parent().prev('a').attr('title', $(this).text());
	});
	
	var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

	if(!ie6)
	{
		$('div:not(.fotogalerie) .mediumright, div:not(.fotogalerie) .mediumleft, div:not(.fotogalerie) .mediumcenter').each(function() {
			var newString = '<span class="x1"><span class="x1a"></span></span><span class="x2"><span class="x2a"></span></span><div class="mod-content">' + $(this).html() + '</div>';
			
			$(this).addClass('mod').html(newString).css('margin', '1em 1em 1em 2em').width($(this).width() + 2);
		});
	}
	
	// FancyBox starten
	$("div.text a[rel='lytebox[group]']").fancybox();
	$("a[rel='fancybox']").fancybox();
});
