{* 
//////
//    @version [ Wainuiomata ]
//    @package hwdVideoShare
//    @copyright (C) 2007 - 2009 Highwood Design
//    @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
//////
//    hwdVideoShare Template System:::This template system uses the Smarty Template Engine. 
//    For full documentation, including syntax usage please refer to http://www.smarty.net 
//    or our website at http://www.hwdmediashare.co.uk   
//////
//    This file generates the display for the hwdVideoShare component homepage.
//////
//    VARIABLES AVAILBLE IN THIS TEMPLATE FILE:                                        
//    -- $print_nowlist........Only set if any videos are being watched now
//    -- $print_featured.......Only set if any videos are featured
//    -- $print_ads............Only set if hwdRevenueManager is installed   
//    -- $print_videolist......Only set if there are any videos
//    -- $list.................Array containing main video list data  
//    -- $pageNavigation.......Page navigation code 
//    -- $print_mostviewed.....Only set if there are any "most viewed" videos
//    -- $mostviewedlist.......Array containing main "most viewed" list data  
//    -- $print_mostfavoured...Only set if there are any "most favoured" videos
//    -- $mostfavouredlist.....Array containing main "most favoured" list data  
//    -- $print_mostpopular....Only set if there are any "most popular" videos
//    -- $mostpopularlist......Array containing main "most popular" list data  
//////
*}

{include file="header.tpl"}

  {if $print_search or $print_mostviewed or $print_mostfavoured or $print_mostpopular}
   <div class="rightColContainer">
        {if $print_search}
	<!-- Search -->
	<div class="cModule searchbox">
		<form name="search" id="cFormSearch" method="post" action="{$form_search}">

			<fieldset class="fieldset">

			<div class="input_wrap clrfix">
				<a href="javascript:void(0);" onclick="jQuery('#cFormSearch').submit();" class="search_button"><span>{$smarty.const._HWDVIDS_SEARCHBAR}</span></a>
				{$searchinput}
			</div>

			</fieldset>

		</form>
	</div>
	<!-- Search -->
        {/if}			

	{if $print_ads}{if $advert4}<div id="hwdadverts-padding">{$advert4}</div>{/if}{/if}

	    {if $print_mostviewed}
	    <div class="cModule" style="overflow: hidden;">
	      <h3 class="frontTitle">{$title_mostviewed}</h3>
	      <div class="list">
		<div class="box">
		  {foreach name=outer item=data from=$mostviewedlist}
		  {if $smarty.foreach.outer.index % 2-1 == 0}
		    <div style="width: 48%; float:right;">
		  {else}
		    <div style="width: 48%; float:left;">
		  {/if}
		  {include file="video_list_simple.tpl"}
		  </div>
		  {if $smarty.foreach.outer.last}
		     <div style="clear:both;"></div>
		  {elseif $smarty.foreach.outer.index % 2-1 == 0}
		     <div style="clear:both;"></div></div><div class="box">
		  {/if}
		  {/foreach}
		</div>
	      </div>  
	    </div>
	    {/if}

	    {if $print_mostfavoured}
	    <div class="cModule" style="overflow: hidden;">
	      <h3 class="frontTitle">{$title_mostfavoured}</h3>
	      <div class="list">
		<div class="box">
		  {foreach name=outer item=data from=$mostfavouredlist}
		  {if $smarty.foreach.outer.index % 2-1 == 0}
		    <div style="width: 48%; float:right;">
		  {else}
		    <div style="width: 48%; float:left;">
		  {/if}
		  {include file="video_list_simple.tpl"}
		  </div>
		  {if $smarty.foreach.outer.last}
		     <div style="clear:both;"></div>
		  {elseif $smarty.foreach.outer.index % 2-1 == 0}
		     <div style="clear:both;"></div></div><div class="box">
		  {/if}
		  {/foreach}
		</div>
	      </div>  
	    </div>
	    {/if}

	    {if $print_mostpopular}
	    <div class="cModule" style="overflow: hidden;">
	      <h3 class="frontTitle">{$title_mostpopular}</h3>
	      <div class="list">
		<div class="box">
		  {foreach name=outer item=data from=$mostpopularlist}
		  {if $smarty.foreach.outer.index % 2-1 == 0}
		    <div style="width: 48%; float:right;">
		  {else}
		    <div style="width: 48%; float:left;">
		  {/if}
		  {include file="video_list_simple.tpl"}
		  </div>
		  {if $smarty.foreach.outer.last}
		     <div style="clear:both;"></div>
		  {elseif $smarty.foreach.outer.index % 2-1 == 0}
		     <div style="clear:both;"></div></div><div class="box">
		  {/if}
		  {/foreach}
		</div>
	      </div>  
	    </div>
	    {/if}
		
    </div>

    <div class="leftColContainer">
  {/if}			

	{if $print_nowlist}
	    {include file="video_beingwatched.tpl"}
	{/if}
	
        {if $print_featured}
            {if $print_featured_player}
                {include file="featured_videos_01.tpl"}
            {else}
                {include file="featured_videos_02.tpl"}
            {/if}
        {/if}
	{if $print_ads}{if $advert3}<div id="hwdadverts-padding">{$advert3}</div>{/if}{/if}

	
	<div id="recent-activities" class="app-box">
	<div class="app-box-header">
	<div class="app-box-header">
<div style="float:right;padding:5px 0;">
{include file='navigation_selects.tpl'}
</div>
			<h2 class="expand app-box-title">{$title}</h2>
	</div>
	</div>
			{if $print_videolist}

			<div class="box">

          {foreach name=outer item=data from=$list}
          <div class="videoBox">
	  {include file="video_list.tpl"}
	  </div>
	  {if $smarty.foreach.outer.last}
	     <div style="clear:both;"></div>
	  {elseif $smarty.foreach.outer.index % $vpr-($vpr-1) == 0}
	     <div style="clear:both;"></div>
	  {/if}
          {/foreach}

			</div>

			{else}
			<div class="padding">{$smarty.const._HWDVIDS_INFO_NRV}</div>
			{/if}
			{$pageNavigation}
	</div>
  
  {if $print_search or $print_mostviewed or $print_mostfavoured or $print_mostpopular}
	
    </div>
    
  {/if}
    
    <div style="clear:both;"></div>

{include file="footer.tpl"}
