function show_portfolio_recently_viewed()
    {
        global $post;
        $result_html = '';
        $current_lang = '';
        if (class_exists('SitePress')) {
            $current_lang = ICL_LANGUAGE_CODE;
        }
        do_action('a3_portfolio_before_recently_widget');
        if (isset($_COOKIE['portfolio_recentviews' . $current_lang]) && is_array(json_decode($_COOKIE['portfolio_recentviews' . $current_lang])) && count(json_decode($_COOKIE['portfolio_recentviews' . $current_lang])) > 0) {
            $result_html .= '<div class="portfolio_recently_viewed_container">
			<div class="blockui-waiting"></div>
			<ul class="portfolio_recently_viewed">';
            $portfolio_recently_viewed = array_reverse(json_decode($_COOKIE['portfolio_recentviews' . $current_lang]));
            foreach ($portfolio_recently_viewed as $portfolio_id) {
                $_blank = a3_portfolio_get_image_blank();
                $portfolio_gallery = a3_portfolio_get_gallery($portfolio_id);
                if ($portfolio_gallery) {
                    $thumb = wp_get_attachment_image_src($portfolio_gallery[0], 'thumbnail', true);
                    $img = '<img class="a3_porfolio_thumb_widget_lazy thumbnail" src="' . $_blank . '" data-original="' . $thumb[0] . '" />';
                } else {
                    $thumb = a3_portfolio_no_image();
                    $img = '<img class="a3_porfolio_thumb_widget_lazy thumbnail" src="' . $_blank . '" data-original="' . $thumb . '" />';
                }
                $result_html .= '<li class="portfolio_recently_item portfolio_recently_item_' . $portfolio_id . '"><a href="' . get_permalink($portfolio_id) . '">' . $img . '</a><div class="portfolio_name"><a href="' . get_permalink($portfolio_id) . '">' . get_the_title($portfolio_id) . '</a></div><span class="remove_portfolio_item" data-id="' . $portfolio_id . '"><i class="a3-portfolio-icon-close"></i></span></li>';
            }
            $result_html .= '</ul>';
            $result_html .= '<div style="clear:both"></div><div class="portfolio_recently_button_container"><a href="#" class="clear_all_portfolio_recently">' . a3_portfolio_ei_ict_t__('Recently Widget - Clear All', __('Clear All', 'a3_portfolios')) . '</a></div><div style="clear:both"></div>';
            $result_html .= '</div>';
        } else {
            $result_html = '<div class="portfolio_recently_viewed_container">' . a3_portfolio_ei_ict_t__('Recently Widget - No Portfolio', __('No Portfolio Recently Viewed !', 'a3_portfolios')) . '</div>';
        }
        do_action('a3_portfolio_after_recently_widget');
        return $result_html;
    }
/**
 * a3_portfolio_get_gallery_thumbs()
 *
 * @return void
 */
function a3_portfolio_get_gallery_thumbs($portfolio_id = 0, $gallery)
{
    if ($portfolio_id < 1) {
        $portfolio_id = get_the_ID();
    }
    $image_blank = a3_portfolio_get_image_blank();
    a3_portfolio_get_template('expander/gallery-thumbs.php', array('portfolio_id' => $portfolio_id, 'gallery' => $gallery, 'image_blank' => $image_blank));
}