<?php get_header(); ?>
<div id="content-full">
<div id="content" class="col-full">

<?php if(is_home()) { include('slider.php'); } ?>


<div id="main-content">

<?php
//start of latest posts section
	if($_COOKIE['betontrendlanguage'] == "hungarian") {
	$posts_selector = 'posts-hun';
	$no_posts = "Hamarossan!";
	} elseif($_COOKIE['betontrendlanguage'] == "english") {
	$posts_selector = 'posts-eng';
	$no_posts = "Coming soon!";
	} else {
	$posts_selector = 'posts-srb';
	$no_posts = "Uskoro!";
	}
	$args = array(
		'post_type' => $posts_selector,
	);

	$latest_posts = new WP_Query( $args );
	if( $latest_posts->have_posts() ) {
		while( $latest_posts->have_posts() ) {
			$latest_posts->the_post();
?>

<div id="general-posts">
<?php
if( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
<div class="thumbnail">

<?php

$img = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'general-posts');
$img = $img[0];
$permalink = get_permalink($post->ID);

echo "<a href=\"" . $permalink . "\"><img src=\"" . $img . "\"></a>";

?>

</div>
<div class="rightside">
<h1><a href="<?php echo $permalink; ?>"><?php the_title(); ?></a></h1>

<?php the_content(); ?>
</div>

<?php } else { ?>

<div class="no-thumbnail">
<?php $permalink = get_permalink($post->ID); ?>
<h1><a href="<?php echo $permalink; ?>"><?php the_title(); ?></a></h1>

<?php the_content(); ?>
</div>

<?php } ?>
</div>

<?php
		}
	}
	else {
		echo $no_posts;
	}
?>


</div>

	
	<?php get_sidebar(); ?>
	
</div><!-- #END content -->
</div>
<?php get_footer(); ?>
	
