<?php 
$query = $wo['story']['id'];
$image = Wo_GetMedia($wo['story']['postFile']);
if (strpos($wo['story']['postFile'],',') !== false) {
    $explode = @explode(',', $wo['story']['postFile']);
    $image = Wo_GetMedia($explode[0]);
}
?>
<div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div>
<div class="lightbox-content post" id="post-<?php echo $wo['story']['id'];?>" data-post-id="<?php echo $wo['story']['id'];?>">
  <div class="story-img">
      <span class="changer previous-btn" onclick="Wo_PreviousPicture(<?php echo $query;?>);">
      <i class="fa fa-arrow-left"></i>
      </span>
      <span class="changer next-btn" onclick="Wo_NextPicture(<?php echo $query;?>);">
      <i class="fa fa-arrow-right"></i>
      </span>
      <img src="<?php echo $image;?>" alt="media">
  </div>
  <div class="comment-section">
      <div class="<?php echo Wo_RightToLeft('pull-right');?> close-lightbox" onclick="Wo_CloseLightbox();">
        <i class="fa fa-remove"></i>
      </div>
      <div class="user-avatar <?php echo Wo_RightToLeft('pull-left');?>">
          <img src="<?php echo $wo['story']['publisher']['avatar'];?>" alt="">
      </div>
      <div class="user-name h5">
          <span class="user-popover" data-type="<?php echo $wo['story']['publisher']['type']; ?>" data-id="<?php echo $wo['story']['publisher']['id']; ?>">
          <a href="<?php echo $wo['story']['publisher']['url'];?>"><?php echo $wo['story']['publisher']['name'];?></a>
          </span>
      </div>
      <h6>
          <div class="time" style="color:#9197a3">
            <i class="fa fa-clock-o"></i>
            <span class="ajax-time" title="<?php echo date('c',$wo['story']['time']); ?>">
            <?php echo Wo_Time_Elapsed_String($wo['story']['time']); ?> 
            </span>
          </div>
      </h6>
      <div class="clear"></div>
      <div class="post-info">
           <div class="post-text">
              <p><?php echo $wo['story']['postText'];?> </p>
           </div>
      </div>
       <div class="stats buttons">
            <?php if (Wo_IsLogged() === true) { echo Wo_LoadPage('buttons/like-wonder');}?>
       </div>
       <div class="lightbox-post-footer post-comments" id="post-comments-<?php echo $wo['story']['id'];?>">
            <div class="input-group col-lg-12">
              <input class="form-control textarea" placeholder="Write a comment and press enter" type="text" onkeyup="Wo_RegisterComment(this.value,<?php echo $wo['story']['id']; ?>,<?php echo $wo['story']['publisher']['user_id']; ?>, event, <?php echo (!empty($wo['story']['publisher']['page_id'])) ? $wo['story']['publisher']['page_id'] : '0'; ?>)" dir="auto">
              <div class="input-group-addon comment-btn">
            <span><i class="fa fa-edit progress-icon" data-icon="edit"></i></span>  
          </div>
            </div>
          <div class="comments-list">
            <span class="comment-container"></span>
             <?php 
            foreach($wo['story']['get_post_comments'] as $wo['comment']) {
              echo Wo_LoadPage('comment/lightbox-content');
            }
            ?>
          </div>
      </div>
      <div class="clear"></div>
  </div>
</div>
<script>
$( ".story-img" ).mouseover(function() {
  $( ".changer" ).fadeIn(200);
});
$( ".story-img" ).mouseleave(function() {
  $( ".changer" ).fadeOut(200);
});
$(document).keydown(function(e) {
    if (e.keyCode == 27) {
        Wo_CloseLightbox();
    }   
});
</script>
