// Diese Funktion berechnet die Breiten der Spalten im Col-System dynamisch
// Das Col-System benötigt ein Eltern-Element mit der Klasse .colsystem und n Kind-Elemente 
// mit der Klasse .col. 
// Alle Col-Elemente werden gleichmäßig aufgeteilt.
$.fn.colsystem = function() {
	// Beim ersten und letzen Element werden die Marings angepasst
	$(this).children('.col:first').addClass('alpha');
	$(this).children('.col:last').addClass('omega');
	
	// Ermittel die Anzahl an Spalten
	var items = $(this).children('.col').size();
	
	// Erechne die gesamte Breite aller Marings anhand
	var margins = parseInt($(this).children('.col:first').css('marginRight'));
	margins = margins * 2 * (items - 1);
	
	// Erechne die gesamte Breite aller Paddings
	var paddings = parseInt($(this).children('.col').css('paddingRight')) + parseInt($(this).children('.col').css('paddingLeft'));
	paddings = paddings * items;

	// Erechne korrekte Breite exkl. Margins für Spalten
	var size = ($(this).width() - margins - paddings) / items;
	
	// Setzt alle Spalten auf korrekte Breite (-1 für IE-FIX)
	$(this).children('.col').width(size);
}



$(document).ready(function(){

/*
	$("#er_1").animate({ 
		'left': '-300px',
		'opacity': '1'
	}, 500 )

	$("#wk_1").animate({ 
		'right': '-150px',
		'opacity': '1'
	}, 700 )

	$('#wk_2').animate({ 
		'left': '-100px',
		'opacity': '1'
	}, 800 )

	$("#wk_3").animate({ 
		'left': '-250px',
		'opacity': '1'
	}, 1000 )

*/
          
});
