
// funkce pro srovnání výšek boxů

function adjustHeights()
{
	$('.article-list').each(function(){
		var height = 0;			
		$('h2', this).each(function(){
			$(this).css('height', 'auto');
			height = this.offsetHeight > height ? this.offsetHeight : height;			
		}).each(function(){
			$(this).css('height', height + 'px');
		});	
	});	
	$('.article-list').each(function(){
		var height = 0;			
		$('p:not(".more")', this).each(function(){
			$(this).css('height', 'auto');
			height = this.offsetHeight > height ? this.offsetHeight : height;			
		}).each(function(){
			$(this).css('height', height + 'px');
		});		
	});	
};
function fontSizeListener()
{
	this.el = 0;
	this.h = 0;
	this.listen = function()
	{    			
		this.el = document.getElementById('content');
		if(this.el.offsetHeight != this.h){
			this.h = parseInt(this.el.offsetHeight);
			adjustHeights();					
		}
	};
	
	this.fontSizeInterval = setInterval(this.listen, 200);			
 };

$(document).ready(function()
{	
	adjustHeights();
	new fontSizeListener();
});

