

<div class="ticker_box">
<div class="inner">
	
	<div class="ticker1 modern-ticker mt-square">
	<div class="mt-body">
	<div class="mt-label"><?php echo (get_option('op_ticker_text')) ?></div>
	<div class="mt-news">
	<ul>
	
	<?php 
    $featucat = get_option('op_ticker_cat');
	$slides = get_option('op_ticker_slides');
    if (get_option('op_recent_news_ticker') == 'Recent posts') {
	$my_query = new WP_Query('showposts='. $slides .'');	
	} else {
    $my_query = new WP_Query('showposts='. $slides .'&category_name='. $featucat .'');	
	}
	
    if ($my_query->have_posts()) :
    ?>					
		
    <?php while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?>	
	
	<li>
	<?php 
        $category = get_the_category(); 
        if($category[0]){
		$category_term = $category[0]->slug;
        echo '<a class="custom_cat_class '. $category_term .'" href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
        }
    ?>				
	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
	</li>
	
	<?php endwhile; wp_reset_query(); ?> 
    <?php endif; ?>   
	
	</ul>
	</div>
	<div class="mt-controls"><div class="mt-prev"></div><div class="mt-play"></div><div class="mt-next"></div></div>
	</div>
	</div>
	
</div>
</div>

<div class="clear"></div>	


<?php wp_enqueue_script('newsticker', BASE_URL . 'js/jquery.modern-ticker.min.js', false, '', true); ?>

<script type="text/javascript">
jQuery(document).ready(function($){  
$(".ticker1").modernTicker({
effect:"scroll",
scrollType:"continuous",
scrollStart:"inside",
scrollInterval:20,
transitionTime:500,
autoplay:true
});
});
</script>



	
