$extra_photos = $this->DB->sql2array("SELECT * FROM `portfolio_items2image` WHERE `item` = {$item['id']} ORDER BY `id`");
$extra_photos = array_chunk($extra_photos, count($extra_photos) / 2);
foreach($extra_photos as $i => $arr) {
foreach ($arr as $extra_photos) {
$photo_data = array(
'id' => $extra_photo['id'],
'title' => $item['title'],
'img_prev' => $IMG->src($this->CONF['upload_dir'] . '/portfolio/' . $extra_photo['prev'], 1920, 800),
'img_full' => $this->CONF['upload_dir'] . '/portfolio/' . $extra_photo['full']
);
$this->TPL->insert_loop($this->CONF['base_tpl'] . '.work_part.extra_images_'.$i, array('EXTRA_PHOTO' => $photo_data));
}
}
if ($.cookie('is_shown_popup') != 'yes'){
setTimeout(function(){
$('#popup').modal('show');
$.cookie('is_shown_popup', 'yes', {expires: 1/*1-день*/,path: '/'});
},
45*1000)
}
$resets = $('.downMenu').find('.reset');
$resets.toggleClass('some-class', $resets.length < 4);