<?php global $qaleb;?>
<script type="text/javascript">
<!--
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('clock').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
  {
  i="0" + i;
  }
return i;
}
//-->
</script>

<div class="breaking-news">
<span><?php echo $qaleb['news-title']; ?><b></b></span>
<ul>
  <?php
			  
			  if($qaleb['news-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['news-count'],
				);
			  }else if($qaleb['news-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['news-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['news-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['news-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['news-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink()?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
 <?php endwhile; endif;  wp_reset_query(); ?>
</ul>

</div>
<script type="text/javascript">
jQuery(document).ready(function(){
createTicker();
});
</script>