<script type="text/javascript">
    var switchTo5x=true;
    var url = "http://w.sharethis.com/button/buttons.js";
    $.getScript( url, function() {
        stLight.options({publisher: "14ee463c-2587-4a82-9bf6-73dad7fc1c93", doNotHash: false, doNotCopy: false, hashAddressBar: false});
    });
</script>
<?php 
$main_news = $post->row_array();
$main_news_url = post_detail_url($main_news);
$source_name = get_source_title_by_id($main_news['source_id'])
?>
<div class="page-heading-two">
    <div class="container">
        <h2><?php echo $main_news['title'];?></h2>        
        <div class="clearfix"></div>
    </div>
</div>

<div class="container real-estate">

    <!-- Actual content -->
    <div class="rs-property">
        <!-- Block heading two -->
        
        <div class="row">
            <div class="col-md-9 col-sm-12 col-xs-12">

                <article itemtype="http://schema.org/Article" itemscope="">
                    

                    <a class="image-link" title="<?php echo $main_news['title'];?>" href="http://theme-sphere.com/smart-mag/double-sundance-win-for-whiplash/">
                        <img title="<?php echo $main_news['title'];?>" alt="<?php echo $main_news['title'];?>" class="img-responsive main-news-image" src="<?php echo $main_news['media'];?>">                      
                    </a>
                    
                    <div class="main-news-meta">
                        <span class="news-by">
                            <span class="news-by-title">
                                <?php echo lang_key('news_by');?>:
                            </span>
                            <span class="news-by-body">
                                <a href="<?php echo $main_news_url;?>"><?php echo $source_name;?></a>
                            </span>
                        </span>

                        <span class="news-by">
                            <span class="news-by-title">
                                <?php echo lang_key('on');?>:
                            </span>
                            <span class="news-by-body">
                                <a href="<?php echo $main_news_url;?>"><?php echo translateable_date($main_news['publish_time'])?></a>
                            </span>
                        </span>
                                                            
                        <span class="comments news-by">
                            <span class="news-by-title">
                                <?php echo lang_key('seen_by');?>:
                            </span>
                            <span class="news-by-body">
                                <a href="<?php echo $main_news_url;?>"><i class="fa fa-eye"></i> <?php echo $main_news['total_view'];?></a>
                            </span>
                        </span>                 
                    </div>
                    
                    <h2 class="main-news-big-title"><a title="<?php echo $main_news['title'];?>" href="#"><?php echo $main_news['title'];?></a></h2>
                    
                    <div class="excerpt">
                        <p class="detail">
                        <?php echo $main_news['description'];?>
                        </p>
                        <p>
                            <?php 
                            if($main_news['tags']!=''){
                                ?>
                                <div style="font-weight:bold"><?php echo lang_key('tags');?>:</div>
                                <?php
                                $tags = explode(',', $main_news['tags']);
                                foreach ($tags as $tag) {
                                    $tag_url = site_url('show/searchnews/plainkey='.$tag.'|');
                                ?>
                                <a href="<?php echo $tag_url;?>">#<?php echo $tag;?></a>&nbsp;
                                <?php
                                }
                            }
                            ?>
                        </p>
                    </div>
                
                    <?php if($main_news['manual_creation']!=1){?>
                    <a href="<?php echo $main_news['link'];?>" target="_blank" class="btn btn-blue" style="width:100%"><?php echo lang_key('read_this_on');?> <?php echo $source_name;?></a>
                    <?php }?>
                    
                    <div class="share-links">
                        <span class='st_sharethis_hcount'></span>
                        <span class='st_facebook_hcount'></span>
                        <span class='st_twitter_hcount'></span>
                        <span class='st_linkedin_hcount'></span>
                        <span class='st_pinterest_hcount'></span>
                        <span class='st_email_hcount'></span>
                    </div>

                    <?php render_widgets('detail_page');?>

                    <?php

                                $comment_settings = get_settings('global_settings', 'enable_comment', 'No');
                                if($comment_settings == 'Disqus Comment')
                                { 
                                    $disqus_shortname = get_settings('global_settings', 'disqus_shortname', 'webhelios');

                                ?>
                                <div id="disqus_thread"></div>
                                <script type="text/javascript">
                                    var disqus_shortname = '<?php echo $disqus_shortname; ?>'; // required: replace example with your forum shortname

                                    (function() {
                                        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
                                        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
                                        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
                                    })();
                                </script>
                                <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
                                <div class="clearfix"></div>
                                
                                <?php 
                                } 
                                ?>

                                <?php 

                                if($comment_settings == 'Facebook Comment')
                                { 
                                    $fb_app_id = get_settings('global_settings', 'fb_comment_app_id', ''); ?>
                                    <style>
                                        .fb-comments, .fb-comments iframe[style] {width: 100% !important;}
                                    </style>
                                    <div id="fb-root"></div>
                                    <script>
                                        var fb_app_id = '<?php echo $fb_app_id; ?>';

                                        (function(d, s, id) {
                                            var js, fjs = d.getElementsByTagName(s)[0];
                                            if (d.getElementById(id)) return;
                                            js = d.createElement(s); js.id = id;
                                            js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=" + fb_app_id + "&version=v2.0";
                                            fjs.parentNode.insertBefore(js, fjs);
                                        }(document, 'script', 'facebook-jssdk'));
                                    </script>

                                    <div style="clear:both;margin-top:10px;"></div>
                                    <div class="fb-comments" data-href=" <?php echo current_url();?>" data-numposts="10" data-colorscheme="light"></div>

                                <?php 
                                } 
                                ?>

                </article>

            </div>
            <div class="col-md-3 col-sm-12 col-xs-12">
                

                    <?php render_widgets('right_bar_detail');?>
               
            </div>
        </div>
    </div>
</div>



<script type="text/javascript">
jQuery(document).ready(function(){
});

</script>