<div class="row blocks blocks-large" data-displayswitch="blocksContainer">
@php($i = 0)
@foreach($news as $newsItem) 
  @php($image = isset($newsItem->images) && count($newsItem->images) ? $newsItem->images[0] : null)

  <div class="block block-news col-md-4 col-sm-6 col-xs-12">
    <a href="{{url($newsItem->url)}}" title="{{$image ? $image->title : $newsItem->title}}" alt="{{$image ? $image->title : $newsItem->title}}">
    <figure>
        <div class="image-box">
            @if($newsItem->video) <span class="item-type icon-video"></span> @endif
            <img alt="{{$image ? $image->title : $newsItem->title}}" src="{{ $image ? url( $image->url ) : url( $newsItem->video ? 'images/video.png' : 'images/noimage.png') }}" title="{{ strip_tags($image ? $image->title : $newsItem->title) }}" @if(!$image) class="hidden-xs" @endif>
        </div>
        <figcaption>
            <h3 class="block-title">{{$newsItem->title}}</h3>
                <p class="block-lead hidden-xs">
                {!!Formatter::excerpt($newsItem->content, 250)!!}
                </p>
        </figcaption>
    </figure>
    </a>
  </div>

  @php($i++)
  @if($i % 3 == 0 && $i != count($news) - 1) 
</div>
<div class="row blocks blocks-large" data-displayswitch="blocksContainer">
  @endif
@endforeach

</div>
