<div class="page-margin">
	<div class="row">
		<div class="col-md-2 leftcol"><?php echo Wo_LoadPage("sidebar/left-sidebar"); ?></div>
		<div class="col-md-7 middlecol">
			<?php if ($wo['config']['user_status'] == 1) { ?>
				<div class="user-status-home wow_home_stories">
					<ul class="status-list">
						<?php if ($wo['config']['can_use_story']) { ?>
						<li class="create_new">
							<a href="<?php echo Wo_SeoLink('index.php?link1=create-status'); ?>" data-ajax="?link1=create-status">
								<img src="<?php echo $wo['user']['avatar'];?>" alt="<?php echo $wo['user']['name'];?>">
								<p title="<?php echo $wo['lang']['create_story'] ?>"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /></svg></p>
							</a>
						</li>
					  <?php } ?>
						<?php
							if ($wo['config']['user_status'] == 1) {
								$get_user_status = Wo_GetFriendsStatus(array('limit' => 4));
								if (!empty($get_user_status)) {
						?>
						<?php
							foreach ($get_user_status as $key => $wo['user_status']) {
								echo Wo_LoadPage('home/user-status');
							}
							}
						?>
						<?php } ?>
						<?php if (Wo_CountStories() > 4) { ?>
							<li class="view-more-stories">
								<a href="<?php echo Wo_SeoLink('index.php?link1=more-status'); ?>">
									<div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21.47,4.35L20.13,3.79V12.82L22.56,6.96C22.97,5.94 22.5,4.77 21.47,4.35M1.97,8.05L6.93,20C7.24,20.77 7.97,21.24 8.74,21.26C9,21.26 9.27,21.21 9.53,21.1L16.9,18.05C17.65,17.74 18.11,17 18.13,16.26C18.14,16 18.09,15.71 18,15.45L13,3.5C12.71,2.73 11.97,2.26 11.19,2.25C10.93,2.25 10.67,2.31 10.42,2.4L3.06,5.45C2.04,5.87 1.55,7.04 1.97,8.05M18.12,4.25A2,2 0 0,0 16.12,2.25H14.67L18.12,10.59" /></svg></div>
									<p><?php echo $wo['lang']['see_all'] ?></p>
								</a>
							</li>
						<?php } ?>
					</ul>
				</div>
			<?php
				}
				if (Wo_IsThereAnnouncement() === true) {
				$announcement = Wo_GetHomeAnnouncements();
			?>
			<div class="home-announcement">
				<div class="alert alert-success" style="background-color: white; color: #333;">
					<span class="close announcements-option" data-toggle="tooltip" onclick="Wo_ViewAnnouncement(<?php echo $announcement['id']; ?>);" title="<?php echo $wo['lang']['hide'];?>">
						<i class="fa fa-remove"></i>
					</span>
					<?php echo $announcement['text']; ?>
				</div>
			</div>
			<!-- .home-announcement -->
			<?php
				}
				if($wo['loggedin'] == true) {
						echo Wo_LoadPage('story/publisher-box');
				}
			?>

			<?php if (Wo_IsMobile() == true) { ?>
			<?php if ($wo['config']['order_posts_by'] == 0) { ?>
				<div class="order-by">
					<div class="dropdown">
						<?php echo $wo['lang']['store_posts_by'] ?>: <a class="dropdown-toggle" type="button" data-toggle="dropdown">
						<span class="order-text"><?php echo ($wo['user']['order_posts_by'] == 0) ? $wo['lang']['all'] : $wo['lang']['people_i_follow']; ?></span>
						<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="#" onclick="Wo_StorePosts(0);"><?php echo $wo['lang']['all'] ?></a></li>
							<li><a href="#" onclick="Wo_StorePosts(1);"><?php echo $wo['lang']['people_i_follow'] ?></a></li>
						</ul>
					</div>
				</div>
			<?php } ?>
			<?php } ?>

			<?php if ($wo['config']['afternoon_system'] == 1) { ?>
			<div class="alert alert-dismissible greetalert hidden" role="alert">
				<button type="button" class="close" data-dismiss="alert" aria-label="Close" onclick="setCookie('day_status', '1', 3);"><span aria-hidden="true">&times;</span></button>
				<div id="daynightmsg"></div>
			</div>
			<?php } ?>

			<?php if ($wo['page'] == 'home' && in_array($wo['config']['website_mode'], array('facebook','linkedin'))) { ?>
				<div id="scroll_filter_click"></div>
				<ul class="list-group filterby" id="filterby-post">
					<li class="list-group-item hidden" contenteditable="false">Filter by</li>
					<li class="list-group-item avtive filter-by-li filter_negative_clr" onclick="Wo_FilterPostBy('all');" dir="auto">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M20 22H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1zm-1-2V4H5v16h14zM7 6h4v4H7V6zm0 6h10v2H7v-2zm0 4h10v2H7v-2zm6-9h4v2h-4V7z" fill="currentColor"/></svg>
					</li>
					<li class="list-group-item filter-by-li" onclick="Wo_FilterPostBy('text');" dir="auto" style="color: grey;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z" fill="currentColor"/></svg>
					</li>
					<li class="list-group-item filter-by-li" onclick="Wo_FilterPostBy('photos');" dir="auto" style="color: #4caf50;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11.1l2-2 5.5 5.5 3.5-3.5 3 3V5H5v6.1zm0 2.829V19h3.1l2.986-2.985L7 11.929l-2 2zM10.929 19H19v-2.071l-3-3L10.929 19zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm11.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z" fill="currentColor"/></svg>
					</li>
					<li class="list-group-item filter-by-li"  onclick="Wo_FilterPostBy('video');" dir="auto" style="color: #2396f3;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M17 9.2l5.213-3.65a.5.5 0 0 1 .787.41v12.08a.5.5 0 0 1-.787.41L17 14.8V19a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4.2zm0 3.159l4 2.8V8.84l-4 2.8v.718zM3 6v12h12V6H3zm2 2h2v2H5V8z" fill="currentColor"/></svg>
					</li>
					<li class="list-group-item filter-by-li" onclick="Wo_FilterPostBy('music');" dir="auto" style="color: #cc8317;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M15 4.582V12a3 3 0 1 1-2-2.83V2.05c5.053.501 9 4.765 9 9.95 0 5.523-4.477 10-10 10S2 17.523 2 12c0-5.185 3.947-9.449 9-9.95v2.012A8.001 8.001 0 0 0 12 20a8 8 0 0 0 3-15.418z" fill="currentColor"/></svg>
					</li>
					<?php if ($wo['config']['fileSharing'] == 1) { ?>
					<li class="list-group-item filter-by-li" onclick="Wo_FilterPostBy('files');" dir="auto" style="color: #6b376b;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8l6-5.997zM5.83 8H9V4.83L5.83 8zM11 4v5a1 1 0 0 1-1 1H5v10h14V4h-8z" fill="currentColor"/></svg>
					</li>
					<?php } ?>
					<?php if ($wo['config']['google_map'] == 1 || $wo['config']['yandex_map'] == 1) { ?>
					<li class="list-group-item filter-by-li" onclick="Wo_FilterPostBy('maps');" dir="auto" style="color: #c12056;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 23.728l-6.364-6.364a9 9 0 1 1 12.728 0L12 23.728zm4.95-7.778a7 7 0 1 0-9.9 0L12 20.9l4.95-4.95zM12 13a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" fill="currentColor"/></svg>
					</li>
					<?php } ?>
				</ul>
			<?php } ?>

			<div class="btn btn-main btn-active posts-count" onclick="Wo_GetNewPosts();"></div>
			<div class="posts_load">
				<div id="posts-laoded">
					<div class="wo_loading_post">
						<div class="lightui1-shimmer"> <div class="_2iwr"></div> <div class="_2iws"></div> <div class="_2iwt"></div> <div class="_2iwu"></div> <div class="_2iwv"></div> <div class="_2iww"></div> <div class="_2iwx"></div> <div class="_2iwy"></div> <div class="_2iwz"></div> <div class="_2iw-"></div> <div class="_2iw_"></div> <div class="_2ix0"></div> </div>
					</div>
					<div class="wo_loading_post">
						<div class="lightui1-shimmer"> <div class="_2iwr"></div> <div class="_2iws"></div> <div class="_2iwt"></div> <div class="_2iwu"></div> <div class="_2iwv"></div> <div class="_2iww"></div> <div class="_2iwx"></div> <div class="_2iwy"></div> <div class="_2iwz"></div> <div class="_2iw-"></div> <div class="_2iw_"></div> <div class="_2ix0"></div> </div>
					</div>
				</div>
			</div>
			<!-- #posts -->
		</div>
		<!-- .col-md-8 -->
		<?php echo Wo_LoadPage('sidebar/content'); ?>
	</div>
</div>
<!-- .page-margin -->
<style>
.post-youtube iframe {height: 277px !important;}
</style>

<?php
if ($wo['user']['social_login'] == 1) {
  echo Wo_LoadPage('modals/create-password');
}
?>

<script type="text/javascript">

$(function() {
    loadposts();
});


// $(document).on('click', '.story-image-wrapper', function(event) {
//   event.preventDefault();
//   $value = $(this).parents(".story-container").attr('data-status-id');
//   $.post(Wo_Ajax_Requests_File() + '?f=story_view', {id: $value}, function(data, textStatus, xhr) {

//   });
// });

/* Standard syntax */
document.addEventListener("fullscreenchange", function() {
  $('video').toggleClass('active-player');
});

/* Firefox */
document.addEventListener("mozfullscreenchange", function() {
  $('video').toggleClass('active-player');
});

/* Chrome, Safari and Opera */
document.addEventListener("webkitfullscreenchange", function() {
  $('video').toggleClass('active-player');
});

/* IE / Edge */
document.addEventListener("msfullscreenchange", function() {
  $('video').toggleClass('active-player');
});


function loadposts() {
	$("#posts-laoded").load(Wo_Ajax_Requests_File() + '?f=load_posts', function enter() {
		Wo_FinishBar();
		window.fbAsyncInit = function() {
		  FB.init({
			appId      : '374255706379985',
			xfbml      : true,
			version    : 'v3.2'
		  });
		};
	  	$(".post-description p, .product-description").each(function(index, el) {
	  		ReadMoreText(this);
	  	});
	  	$(".post-commet-textarea .textarea").triggeredAutocomplete({
	       hidden: '#hidden_inputbox_comment',
	       source: Wo_Ajax_Requests_File() + "?f=mention",
	       trigger: "@"
	    });
	  	$(".comment-reply textarea").triggeredAutocomplete({
	       hidden: '#hidden_inputbox_comment_reply',
	       source: Wo_Ajax_Requests_File() + "?f=mention",
	       trigger: "@"
	    });
	    $('#load-more-posts').show();

	});
}
  <?php if ($wo['user']['social_login'] == 1) { ?>
  $(window).on("load", function (e) {
       $('#create-password').modal('show');
    });
  $(function() {
    var create_password_container = $('#create-password');
    $('form.create-password').ajaxForm({
      url: Wo_Ajax_Requests_File() + '?f=update_new_logged_user_details',
      beforeSend: function() {
        Wo_progressIconLoader($('form.create-password').find('button'));
      },
      success: function(data) {
        if (data.status == 200) {
          create_password_container.find('.error-container').html("<div class='alert alert-success'>" + data.message + "</div>");
           $('#update-username').attr('href', data.url);
           setTimeout(function() {
            $('#create-password').modal('hide');
           }, 1500);
        } else {
          var errors = data.errors.join("<br>");
          create_password_container.find('.error-container').html("<div class='alert alert-danger'>" + errors + "</div>");
        }
        Wo_progressIconLoader($('form.create-password').find('button'));
      }
    });
  });

<?php } ?>

<?php if (Wo_IsMobile() == true) { ?>
function Wo_StorePosts(type) {
  if (type > 1) {
     return false;
  }
  if (type == 0) {
    $('.order-text').text('<?php echo $wo['lang']['all'] ?>');
  } else {
    $('.order-text').text('<?php echo $wo['lang']['people_i_follow'] ?>');
  }
  $('#posts-laoded').html('<div class="wo_loading_post"><div class="wo_loading_post_child"></div></div>');
  $.get(Wo_Ajax_Requests_File() + '?f=update_order_by', {type:type}, function (data) {
    if (data.status == 200) {
      loadposts();
    }
  });
}
<?php } ?>

function Wo_ViewAnnouncement(id) {
    var announcement_container = $('.home-announcement');
    $.get(Wo_Ajax_Requests_File() + '?f=update_announcement_views', {id:id}, function (data) {
      if (data.status == 200) {
          announcement_container.slideUp(200, function () {
            $(this).remove();
          });
      }
    });
}

function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*60*60*1000));
    var expires = "expires="+ d;
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function getCookieValue(a) {
    var b = document.cookie.match('(^|;)\\s*' + a + '\\s*=\\s*([^;]+)');
    return b ? b.pop() : '';
}

$(function () {
    var is_day_enabled = getCookieValue('day_status');
    var myDate = new Date();
    var hrs = myDate.getHours();
    var greet;
    var color;
	var quote;
    if (hrs < 12) {
        greet = "<?php echo $wo['lang']['good_morning']?>" + ', <?php echo $wo['user']['name']?> <img src="<?php echo $wo['config']['theme_url'];?>/img/park.png"/>';
        color = '#7FC583';
		quote = "<?php echo $wo['lang']['good_morning_quote']?>";
    } else if (hrs >= 12 && hrs <= 18) {
        greet = "<?php echo $wo['lang']['good_afternoon']?>" + ', <?php echo $wo['user']['name']?> <img src="<?php echo $wo['config']['theme_url'];?>/img/desert.png"/>';
        color = '#ffc107';
		quote = "<?php echo $wo['lang']['good_afternoon_quote']?>";
    } else if (hrs >= 18 && hrs <= 24) {
        greet = "<?php echo $wo['lang']['good_evening']?>"+', <?php echo $wo['user']['name']?> <img src="<?php echo $wo['config']['theme_url'];?>/img/sea.png"/>';
        color = '#FF4F70';
		quote = "<?php echo $wo['lang']['good_evening_quote']?>";
    }
    if (is_day_enabled != 1) {
      setTimeout(function () {
        $('.greetalert').css('border-color', color );
        $('#daynightmsg').html('<div class="small-texts">' + greet + '</div><p>' + quote + '</p>');
        $('.greetalert').removeClass('hidden');
      }, 100);
    }
});
</script>
