

function slideSwitch() {

    var $active = $('#header img.active');
    if ( $active.length == 0 ) $active = $('#header img:last');
    var $next =  $active.next().length ? $active.next()
        : $('#header img:first');
    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 2000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 3000 );
/*
	if($('.c3a').length>0) {
		var max = $('.c3a').height();
		if($('.c3b').height()>max) max = $('.c3b').height();
		if($('.c3c').height()>max) max = $('.c3c').height();
		
		$('.c3a').css('minHeight',max)
		$('.c3b').css('minHeight',max)
		$('.c3c').css('minHeight',max)
	}
	if($('.c4').length>0) {
		var max = 0;
		$('.c4').each(function()  {
			if($(this).height()>max) max = $(this).height();
		})
		$('.c4').css('minHeight',max)
	}*/
});
