<div id="content">
    <div class="left span-755">
        <div class="box">
            
            <div class="bmenu">
                <div class="bmenul"><h2>{$title|upper} BLOGS</h2></div>
                <div class="clear"></div>
				{literal}
                <script type="text/javascript">
                $(document).ready(function(){
              		$("select[id='order_timeline']").change(function() {
                  		$('#orderBlogs').submit();
                    });
                });
                </script>
                {/literal}
            </div>
            <div class="bsubmenu">
                <div class="bsubmenul">
                    {if $order == 'mr'}Most Recent{else}<a href="{url base='blogs' strip='o' value='mr'}">Most Recent</a>{/if} <strong>&middot;</strong>
                    {if $order == 'mv'}Most Viewed{else}<a href="{url base='blogs' strip='o' value='mv'}">Most Viewed</a>{/if} <strong>&middot;</strong>
                    {if $order == 'md'}Most Commented{else}<a href="{url base='blogs' strip='o' value='md'}">Most Commented</a>{/if}                                                                                    
                </div>
				<div class="bsubmenur">
					 <form name="orderBlogs" id="orderBlogs" method="get" action="{$relative}/blogs">
				     <div id="timeline_form">
                        <span>Timeline: </span>
						<input name="o" type="hidden" value="{$order}" />
                        <select name="t" id="order_timeline">
                            <option value="t"{if $timeframe == 't'} selected="selected"{/if}>Today</option>
                            <option value="w"{if $timeframe == 'w'} selected="selected"{/if}>This Week</option>
                            <option value="m"{if $timeframe == 'm'} selected="selected"{/if}>This Month</option>
                            <option value="a"{if $timeframe == 'a'} selected="selected"{/if}>All</option>
                        </select>
                    </div>
                    </form>
				</div>
                <div class="clear"></div>
            </div>
            <div class="blinkpnodot">
                <div class="blinkcl">Showing <span>{$start_num}</span> to <span>{$end_num}</span> of <span>{$blogs_total}</span> blog articles.</div>
                <div class="blinkcr"><a href="{$relative}/blog/add">Create New Blog Entry</a></div>
                <div class="clear"></div>
            </div>
        </div>    
        {if $blogs}
        {section name=i loop=$blogs}
        <div class="box">            
            <div class="btitle"><h2><a href="{$relative}/user/{$blogs[i].username}">{$blogs[i].username}'s Blog</a></h2></div>
            <div class="blog_header">
                <h5><a href="{$relative}/blog/{$blogs[i].BID}/{$blogs[i].title|clean}">{$blogs[i].title|escape:'html'}</a></h5>
                {insert name=time_range assign=addtime time=$blogs[i].addtime}
                <span class="smallest grey"> Views: {$blogs[i].total_views} <strong>&middot;</strong> Posted: {$addtime}</span>
            </div>
            <div class="blog_content">
                {$blogs[i].content|nl2br}
            </div>
            <div class="blog_links">
                <a href="{$relative}/blog/{$blogs[i].BID}/{$blogs[i].title|clean}">{$blogs[i].total_comments} comments</a> <strong>&middot;</strong>
                <a href="{$relative}/blog/{$blogs[i].BID}/{$blogs[i].title|clean}">Post Comment</a>                                
            </div>
        </div>
        {/section}
        <div class="pagination"><ul>{$page_link}</ul></div>
        {else}
        <p>No blogs found!</p>
        {/if}
        <div class="box">
			
			<div class="btitle"><h2>SPONSORS</h2></div>
        {insert name=adv assign=adv group='blogs_bottom'}
        {if $adv}<br /><div class="ads">{$adv}</div><br />{/if}
        </div>
    </div>
    <div class="right span-200">
        <div class="box">
            
            <div class="btitle"><h2>SPONSORS</h2></div>
            {insert name=adv assign=adv group='blogs_right'}
            {if $adv}<br /><div class="ads">{$adv}</div><br />{/if}
        </div>
    </div>
    <div class="clear"></div>
</div>
