<?php
if(count($videos) > 0){
    $module_action = $sf_request->getParameter('module') . '_' . $sf_request->getParameter('action');
    if($module_action == 'product_show'){
        echo '<div class="product_section product__video">';
        echo '<div class="caption"><a class="green_link" href="/' . $culture . '/video/?tag_id=' . $tag_id . '"> ' . __('Видео') . '</a></div>';
        echo '<div class="max_width">';
    }
    foreach ($videos as $key => $video){
        $code = Video::getYoutubeCode($video['vid']);
        if($code != ''){
            $pos_class = '';
            if(($key % 3) != 1){
                $pos_class = ' video_item_' . (($key % 3) == 0 ? 'left' : 'right');
            }
            echo '<div class="video_item' . $pos_class . '">';
            echo '<div class="video" data-src="https://www.youtube.com/embed/' . $code . '?ecver=2&autoplay=1&list=PLBLtydguylgB-9FPU63TY_vtsj0xYt5li" style="background-image: url(/u/i/' . Page::replaceImageSize($video['cover'], 'M') . ');" onclick="video.open(this);"></div>';
            echo '<div class="video_title">' . $video['Translation'][$culture]['title'] . '</div>';
            //var_dump($culture);
            echo '</div>';
        }
    }
    if($module_action == 'product_show'){
        echo '</div>';
        echo '</div>';
    }

}
if ($die)
{
    die();
}

if ($sf_request->getParameter('module') == 'product')
{
    echo '<i class="br30 mobile_hide"></i>';
}
