var $j = jQuery.noConflict();
$j(document).ready(function(){    
    if(document.all) { //This means it is IE
        if($j('#teaser').length != 0){
            var first_column = parseInt(document.getElementById('events_block').offsetHeight);
            var second_column = parseInt(document.getElementById('blog_block').offsetHeight);
            var third_column = parseInt(document.getElementById('contrexx_block').offsetHeight);
            var fourth_column = parseInt(document.getElementById('news_block').offsetHeight);
            var maxheight = (first_column>second_column)?((first_column>third_column)?((first_column>fourth_column)?first_column:fourth_column):((third_column>fourth_column)?third_column:fourth_column)):((third_column>second_column)?((third_column>fourth_column)?third_column:fourth_column):((second_column>fourth_column)?second_column:fourth_column));
            maxheight = maxheight + 'px';
            $j('#events_block').css('height',maxheight);
            $j('#blog_block').css('height',maxheight);
            $j('#contrexx_block').css('height',maxheight);
            $j('#news_block').css('height',maxheight);
        }
    }else if($j('#teaser').length != 0){
        first_column = parseInt($j('#events_block').css('height'));        
        second_column = parseInt($j('#blog_block').css('height'));        
        third_column = parseInt($j('#contrexx_block').css('height'));        
        fourth_column = parseInt($j('#news_block').css('height'));                
        maxheight = (first_column>second_column)?((first_column>third_column)?((first_column>fourth_column)?first_column:fourth_column):((third_column>fourth_column)?third_column:fourth_column)):((third_column>second_column)?((third_column>fourth_column)?third_column:fourth_column):((second_column>fourth_column)?second_column:fourth_column));        
        maxheight = maxheight + 'px';

        $j('#events_block').css('height',maxheight);
        $j('#blog_block').css('height',maxheight);
        $j('#contrexx_block').css('height',maxheight);
        $j('#news_block').css('height',maxheight);
    }
});
