<?php if($articles) : ?>
<div class="box wrapper_block">
    <div class="blog-widget parallax fullwidth-block">
        <div class="container">
            <div class="sixteen columns">


            <div class="wrapper">
                <h3 class="pull-left title">
                    <?php echo $heading_title;?>
                </h3>
            </div>

            <div class="from-blog carouFredSel">
                <?php if($articles) { ?>
                <div class="carouFredSel-controls">
                    <div class="carouFredSel-buttons">
                        <a id="blog-carousel-prev" class="prev"></a>
                        <a id="blog-carousel-next" class="next"></a>
                    </div>
                </div>

                <div class="carousel">
                    <ul class="slides">
                        <?php foreach ($articles as $article) : ?>
                            <li>
                                <?php if ($article['image']): ?>
                                <div class="image">
                                    <a href="<?php echo $article['href'];?>">
                                        <img src="<?php echo $article['image']; ?>" alt="<?php echo $article['article_title']; ?>">
                                    </a>
                                </div>
                                <?php endif; ?>
                                <div class="text">
                                    <h5>
                                        <a href="<?php echo $article['href']; ?>"><?php echo $article['article_title']; ?></a>
                                    </h5>
                                    <div class="date">
                                        <?php echo $article['date_added'];?>&nbsp;
                                        <?php if ($article['author_name']) : ?>
                                        |   &nbsp;<?php echo $article['total_comment'];?>
                                        <?php endif; ?>
                                    </div>
                                    <?php if ($article['description']) : ?>
                                    <?php echo $article['description'];?>...
                                    <?php endif; ?>
                                </div>

                            </li>
                        <?php endforeach; ?>
                    </ul>
                </div>

                <?php } else { ?>
                    <div class="buttons">
                        <div class="center"><?php echo $text_no_found; ?></div>
                    </div>
                <?php } ?>

        	    		
            </div>

            </div>
        </div>
    </div>

</div>

<script type="text/javascript">
    jQuery(function() {
        var blogCarousel = jQuery(".from-blog .carousel ul");
        var blogCarouselMax = 2;

        blogCarousel.carouFredSel({
            responsive: true,
            width: '100%',
            scroll: 1,
            prev: '#blog-carousel-prev',
            next: '#blog-carousel-next',
            items: {
                width: 400,
                visible: {
                    min: 1,
                    max: blogCarouselMax
                }
            }
        });

    });
</script>
<?php endif; ?>