bp_the_blog();
        ?>

			<li>
				<div class="item-avatar">
					<a href="<?php 
        bp_blog_permalink();
        ?>
"><?php 
        bp_blog_avatar('type=thumb');
        ?>
</a>
				</div>
				<div class="item">
					<div class="item-title"><a href="<?php 
        bp_blog_permalink();
        ?>
"><?php 
        bp_blog_name();
        ?>
</a></div>
					<div class="item-meta"><span class="activity"><?php 
        bp_blog_last_active();
        ?>
</span></div>
					<?php 
        do_action('bp_directory_blogs_item');
        ?>
				</div>

				<div class="action">
    /**
     * load widget
     *
     * @name    widget
     * @author  Fabiano Rangel Cidade- <*****@*****.**>
     * @since   2012-05-29
     * @updated 2012-05-29
     * @param   array $args - widget structure
     * @param   array $instance - widget data
     * @return  void
     */
    function widget($args, $instance)
    {
        ?>
				
	<ul class="tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
		<li class="9 ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-focus"><a href="#ultimas-blogadas">Últimas Blogadas na rede</a></li>
	</ul>

		
			<div class="activity">
			
				<div class="blogsTop">
					
						
						
						<?php 
        if (bp_has_blogs(bp_ajax_querystring('blogs') . 'max=10&per_page=10')) {
            ?>
				
						<ul>
						
						<?php 
            while (bp_blogs()) {
                bp_the_blog();
                ?>
						
							<li>
							
							<div class="avatarBlog2">
							<a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                bp_blog_avatar('type=medium&width=55&height=55');
                ?>
</a></div>
							
							<div class="infoBlog">
								<span class="nomeBlog"><a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                limit_chars(bp_get_blog_name(), 36);
                ?>
</a></span>
								<br /><span class="tituloPostBlog2"><a href="<?php 
                bp_blog_permalink();
                ?>
" title="">
						<?php 
                bp_blog_latest_post();
                ?>
</a></span>
							</div>
							
							</li>
						
						<?php 
            }
            ?>
						
						</ul>
						
						<?php 
        }
        ?>
						
						
											
				</div>
			</div>	
	
	


<br clear="all" />


		<?php 
    }
    function x_buddypress_blogs_list_item_header()
    {
        ?>

    <div class="x-list-item-header">
      <div class="x-list-item-avatar-wrap item-avatar">
        <a href="<?php 
        bp_blog_permalink();
        ?>
"><?php 
        bp_blog_avatar('type=thumb');
        ?>
</a>
      </div>
      <div class="x-list-item-header-info">
        <p>
          <a href="<?php 
        bp_blog_permalink();
        ?>
"><?php 
        bp_blog_name();
        ?>
</a>
          <span class="activity"><?php 
        bp_blog_last_active();
        ?>
</span>
        </p>
      </div>
    </div>

  <?php 
    }
    function widget($args, $instance)
    {
        if (!function_exists('bp_is_active')) {
            return false;
        }
        extract($args);
        $blog_url = get_bloginfo('url');
        $title = apply_filters('widget_title', empty($instance['title']) ? 'Blogs Principais' : $instance['title']);
        $blogsIds = empty($instance['blogsIds']) ? '' : $instance['blogsIds'];
        $queryString = '&include_blog_ids=' . $blogsIds;
        $queryString .= '&max=30';
        $queryString .= '&type=active';
        print $before_widget;
        if (!empty($instance['title'])) {
            print $before_head;
            print $before_title . "<a href='{$blog_url}/blogs' title='ver todos os blogs'> " . $title . "</a>" . $after_title;
            print $after_head;
        }
        ?>
		<div id="principais-blogs">
			<div class="navigation">
			</div>

   			<?php 
        print $before_body;
        ?>
	

				<?php 
        do_action('bp_before_blogs_loop');
        ?>

				<?php 
        if (bp_has_blogs(bp_ajax_querystring('blogs') . $queryString)) {
            ?>
			
				    <div id="blogs-dir-list" class="blogs dir-list carousel-blogs">

						<?php 
            do_action('bp_before_directory_blogs_list');
            ?>

						<ul id="blogs-list" class="item-list slides" role="main">

							<?php 
            while (bp_blogs()) {
                bp_the_blog();
                ?>

								<li class="item">
									<div class="item-avatar">
										<a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                bp_blog_avatar('type=full');
                ?>
</a>
									</div>

									<div class="item-caption">
										<div class="item-title"><a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                bp_blog_name();
                ?>
</a></div>
										<!-- <div class="item-meta"><span class="activity"><?php 
                bp_blog_last_active(array('active_format' => false));
                ?>
</span></div> -->

										<?php 
                do_action('bp_directory_blogs_item');
                ?>
									

										<div class="action">

											<?php 
                // do_action( 'bp_directory_blogs_actions' );
                ?>
										
										</div>

										<div class="meta">

											<a href="<?php 
                bp_blog_latest_post_permalink();
                ?>
" title="<?php 
                print bp_get_blog_latest_post_title();
                ?>
">
												<?php 
                echo limit_chars(bp_get_blog_latest_post_title(), 90);
                ?>
											</a>
										
										</div>
										
									</div>

									<div class="clear"></div>
								</li>

							<?php 
            }
            ?>

						</ul>

					</div>
				<?php 
        }
        ?>

		    <?php 
        print $after_body;
        ?>

		</div>

		<?php 
        print $after_widget;
    }