<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <script>
 	$(document).ready(function(){
 		
 		// LOAD GỢI Ý KẾT BẠN
		$.ajax({
			type: "POST",
			url: "getHintFriends",
			success: function(res){
				var data = $.parseJSON(res);
				if (data.length > 0) {
					for (var i = 0; i < data.length; i++){
						insertRow(data[i].id, data[i].fullname, data[i].country, data[i].avatar);
					}
				} else {
					$(".friend-list-post").append('<div class="friendrequestx-resultx-other">Không tìm thấy gợi ý nào</div>');
				}
			}
		});
 		
		function insertRow(id, name, country, avatar){
			var html = '<div user="' + id + '" style="border-bottom: 1px solid #EEEEEE;" class="searchingx-result-line">';
			html += '<div class="searchingx-result-user-avatar"><img class="bdrad2" src="' + avatar + '"/></div>';
			html += '<div style="width: 130px;" class="searchingx-result-user-info"><b>' + name + '</b><br><span class="otrif">' + country + '</span></div>';
			html += '<div title="Thêm bạn" com="add" class="search-more-box-addfriend">Thêm bạn</div>';
			html += '</div>';
			$(".friend-list-post").append(html);
		}
 	});
 </script>
<div id="member-post">
	<div class="post-left">
    	
        <div class="post-status-commnetaccount"></div>
        <div class="post-view-info"></div>
	    
	    <div id="paging-loading" style=""></div>
	</div>
	<div class="post-right">
	    <div class="content-post-right">
	        <div class="trtitle">Gợi ý kết bạn</div>
	        <div class="friend-list-post">
	        <!--  TEMP 
				<div style="border-bottom: 1px solid #EEEEEE;" class="searchingx-result-line">
					<div class="searchingx-result-user-avatar"><img class="bdrad2" src="images/f-avatar.jpg"/></div>
					<div style="width: 130px;" class="searchingx-result-user-info"><b>Luân Nguyễn</b><br><span class="otrif">Biên Hòa</span></div>
					<div title="Thêm bạn" com="add" class="search-more-box-addfriend">Thêm bạn</div>
				</div>
				<div class="friendrequestx-resultx-other">Không tìm thấy gợi ý nào</div>
				<!-- TEMP END -->
	        </div>
	    </div>
	    <div class="cl"></div>
	</div>
	<div class="cl"></div>
</div>
    
<script>
	/*$(document).ready(function(e) {
         html = '<div class="post-view-info"><div class="post-view-left"><div class="post-view-avatar" style="background: url(images/member/dlduynam.jpg)"></div></div><div class="ii"><div class="load-image ie"> &nbsp; </div><div class="post-view-right"><div class="post-view-header"><div class="post-status-contentaccount" style="width: 100%; min-height: 70px; border: 1px solid rgb(233, 234, 237); background: #FFF;" spellcheck="false" contenteditable="true"></div><div style="text-align:right; margin-top: 5px;"><div class="post-status-account" style="cursor: pointer; float: right; width:67px; height:30px; background: url(images/dangbai.png) no-repeat"></div></div></div><div class="post-view-footer" style="background-color: #F8F8F8;"></div></div></div></div><div class="space">&nbsp;</div>';
		
		$('.post-status-commnetaccount').append(html);
    });*/
</script>