$(function() { 
	
// Truncate
	$('body.start .truncate').each(function() {	
		var $cont = $(this);	
		var text = $(this).html();	
		var textKurz = $(this).text();
		var len = 0;

		if(textKurz.length > len) {
			textKurz = textKurz.substring(0, len);
			textKurz = textKurz.replace(/\w+$/, '');
			$(this).text(textKurz+'...');
			$('<a class="togglelink" title="mehr" href="#">&darr; mehr</a>')
				.insertAfter(this)
				.click(function() { 
					$(this).toggleClass('auf');
					if($(this).hasClass('auf')) { 
						$cont.slideUp('slow', function() { 
							$(this).html(text).animate({ opacity: '+=0' }, 50, function() { 
								$(this).slideDown('slow');
							});
						});
						$(this).html('&uarr; weniger').attr({ title: 'weniger' });						
					} else { 
						$cont.slideUp('slow', function() { 
							$(this).text(textKurz+'...').animate({ opacity: '+=0' }, 50, function() { 
								$(this).slideDown('slow');
							});
						});
						$(this).html('&uarr; mehr').attr({ title: 'mehr' });				
					};
					return false;
				});
		}
	}); 
	
	$('body.start #spalte_r .box img').wrap('<div class="breaker"></div>');
	
	
	if($('body').hasClass('pressespiegel')) { 
		$('#inhalt h2.newstitel').each(function() { 
			var $h2 = $(this);
			var $a  = $h2.parent('a');
			$h2.insertBefore($a);
			$a.remove();
		
		});
	};

	
	
});
