{literal}
<script src="/templates/_default_/js/nyromodal.js" type="text/javascript"></script>
<link href="/templates/_default_/css/nyromodal.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
    $(function () {
        $('.cnNyro').nyroModal();
    });
</script>
<script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script>
{/literal}
{if !$is_ajax}
<div id="module_ajax_{$module_id}">{/if}
    <table width="100%">
    {assign var='j' value=1}
    {foreach key=aid item=article from=$articles}

        {if $cfg.chered}
            {if $j%2==0 }
                {assign var='i' value='#ddd'}
                {assign var='t' value='#fff'}
                {else}
                {assign var='i' value='#fff'}
                {assign var='t' value='#aaa'}
            {/if}
            {else}
            {assign var='i' value='#fff'}
            {assign var='t' value='#aaa'}
        {/if}
        <div class="mod_latest_entry">
            <tr style="display:block;background-color:{$i};padding:3px;">


                <td style="border-right:2px solid #ccc;height:40px;width:44px;">
                    <div style="position:relative;display:block;height:50px;">
                        {if $cfg.showday}<span
                                style="position:absolute;font-size:22px;color:{$t};top:15%;">{$article.pubdate.2}</span>{/if}
                        {if $cfg.showmonth}<span
                                style="position:absolute;top:2px;right:2px;font-size:14px;color:{$t};">{$article.pubdate.1}</span>{/if}
                        {if $cfg.showyear}<span
                                style="position:absolute;bottom:2px;right:2px;font-size:14px;color:{$t};">{$article.pubdate.0}</span>{/if}
                    </div>
                </td>
                <td valign=middle>
                    {if $cfg.showimg}
                        {if $article.image}
                            <img style="border:1px solid grey;margin-right:10px;margin-left:5px;"
                                 src="/images/photos/small/{$article.image}" border="1" height="{$cfg.height}"
                                 alt="{$article.title|escape:'html'}"/>
                            {else}
                            {if $cfg.imgsrc}<img style="border:1px solid grey;margin-right:10px;margin-left:5px;"
                                                 src="/images/photos/small/no_image.png" border="1"
                                                 height="{$cfg.height}" alt="{$article.title|escape:'html'}"/>{/if}
                        {/if}
                    {/if}
                </td>
                <td>
                    <div style="display:block;font-size:10px;">
                        {if $cfg.showavtor}<a href="{profile_url login=$article.user_login}"
                                              style="color:#aaa;">{$article.author}</a>{/if}{if $cfg.showcom} | <span
                            style="color:#aaa;">комментариев:{$article.comments}</span> {/if}{if $cfg.showhits}| <span
                            style="color:#aaa;">просмотров: {$article.hits}</span>{/if}
                    </div>

                    <a href="#articleCN{$article.id}" class="cnNyro"><b>{$article.title}</b></a>

                    {if $cfg.showdesc}
                        <div class="mod_latest_desc" style="overflow:hidden;color:grey;">
                            {$article.description|strip_tags|truncate:200}
                        </div>
                    {/if}
                </td>
            </tr>


            <div id="articleCN{$article.id}" style="display: none; width:700px;max-height:500px;overlow:auto;margin:80px;">

                {if $article.image}
                    <div class="mod_latest_image">
                        <img src="/images/photos/medium/{$article.image}" border="0" width="200"
                             alt="{$article.title|escape:'html'}"/>
                    </div>
                {/if}

                <div style="padding-bottom:25px;text-align:justify;">{$article.content}</div>
                <div style="vertical-align:middle;position:absolute;display:block;width:100%;height:27px;background-color:#38618D;bottom:0px;left:0px;">

                    <p align="left" style="display:inline-block;">
                        {literal}
                        <script type="text/javascript">
                        var YaShareInstanсe = new Ya.share({
                            element:'ya_share' +{/literal}{$article.id}{literal},
                    onready: function(instance) {
                        var parent = $(this).parent();
                            instance.updateShareLink(
                    {link:"{/literal}http://{php}echo $_SERVER['HTTP_HOST'];{/php}{$article.url}{literal}",
                    title:"{/literal}{$article.title}{literal}"}
                    );
                    }
                    });
                    YaShareInstanсe.updateShareLink('http://api.yandex.ru', 'API');
                    </script>
                    {/literal}
                    <div id="ya_share{$article.id}"></div>
                    </p>
                    <p align="right" style="margin-top:-22px;margin-right:10px;">
                        <a href="{$article.url}" style="color:white;align:right;text-decoration:none">Комментировать
                            статью</a>
                    </p>
                </div>

            </div>
        </div>
        <!--{$j++}-->
    {/foreach}
    </table>



{if $cfg.showrss}
    <div class="mod_latest_rss">
        <a href="/rss/content/{if $cfg.cat_id}{$cfg.cat_id}{else}all{/if}/feed.rss">{$LANG.LATEST_RSS}</a>
    </div>
{/if}

{if !$is_ajax}</div>{/if}