<?php if (!empty($news['catWidgets'])) { ?>
	<?php $catpos = 0; foreach ($news['catWidgets'] as $category) { $catpos++; ?>
		
		<div class="cat-widget<?php if ($catpos % 2 != 0) { echo ' addmarginright'; } ?>">
			
			<h3><span class="cattitle"><?php echo get_cat_name($category); ?></span><span class="catfeed"><a href="<?php echo get_category_feed_link($category); ?>" title="<?php echo get_cat_name($category); ?> RSS Feed"></a></span></h3>
			<div class="clear"></div>

			<!-- main posts -->
			<?php $display = new WP_query(); $display->query('showposts='.$news['catpostnum'].'&cat='.$category); global $wp_query; $wp_query->in_the_loop = true; if ($display->have_posts()) : ?>
			<?php while ($display->have_posts()) : $display->the_post(); ?>
			<div class="story">
				<div class="thumbntitle">
					<div class="storythumb"><?php dt_thumb('width=120&height=70&link=image'); ?></div>
					<h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php dt_posttype() ?><?php the_title(); ?></a></h4>
					<div class="reactions"><?php the_time('d.m.Y'); ?> | <?php comments_popup_link(__('0 comments','news'), __('1 comment','news'), __('% comments','news'), '', 'Comments are closed'); ?></div><div class="clear"></div>
				</div>
				<?php dt_excerpt('limit=150'); ?><div class="clear"></div>
				<?php if ($news['homegetauth'] == 1) : ?><div class="show_author"><?php printf(__('Published by <strong>%s</strong>','news'), get_the_author()); ?></div><?php endif; ?>
				<div class="fullarticle"><a href="<?php the_permalink(); ?>" class="rounded-black"><?php _e('Continue <span>&raquo;</span>','news'); ?></a></div><div class="clear"></div>
			</div>
			<?php endwhile; ?>
			<?php endif; ?>
			<!-- main posts -->
			
			<?php $display = new WP_query(); $display->query('showposts='.$news['catmorepostnum'].'&cat='.$category.'&offset='.$news['catpostnum']); global $wp_query; $wp_query->in_the_loop = true; if ($display->have_posts()) : ?>
			<ul class="morestories">
				<?php while ($display->have_posts()) : $display->the_post(); ?>
				<li><a href="#summary" class="item-more"></a><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php dt_posttype() ?><?php the_title(); ?></a>
				<div class="lisummary"><?php dt_excerpt('limit=150&after=...<a href="'.get_permalink($post->ID).'">Continue</a>'); ?></div></li>
				<?php endwhile; ?>
			</ul>
			<?php endif; ?>
			
			<div class="moreincat"><a href="<?php echo get_category_link($category); ?>" class="rounded-orange"><?php printf(__('More in %s <span>&raquo;</span>','news'), get_cat_name($category)); ?></a></div>
		
		</div>
		<?php if ($catpos % 2 == 0) { echo '<div class="clear"></div>'; } ?>
		
	<?php } ?>
<?php } ?>