<div class="art_content">
	<h2 style="margin-left: 20px;">Galerie</h2>
	<?php
		//print_r($articles);
		echo '<table class="galleries_table" cellspacing="10">';
		$i=0;
		foreach($articles as $article){
			if($i == 0){
				echo '<tr>';
			}
				echo '<td class="imagediv">';
					if(isset($article['photo'])){
						echo '<a href="/'.strtolower($site['lang']['skrot']).'/'.$site['linki_do_sitemapy']['galeria'].'-'.$article['idgalleries'].'.html">';
							echo '<img src="/files/img/galleries/'.$article['photo']['idgalleries'].'/min/'.$article['photo']['path'].'" alt="'.$article['photo']['title'].'" class="gallery_image"/>';
						echo '</a>';
					}
						
						echo '<h2><a href="/'.strtolower($site['lang']['skrot']).'/'.$site['linki_do_sitemapy']['galeria'].'-'.$article['idgalleries'].'.html">'.$article['title'].'</a></h2>';
				echo '</td>';
				$i++;
			if($i == 4){
				echo '</tr>';
				$i = 0;
			}
		}
		if($i != 4){
			echo '</tr>';
			$i = 0;
		}
		echo '</table>';
	?>
</div>