{* 
//////
//    @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 video player page.
//////
//    VARIABLES AVAILBLE IN THIS TEMPLATE FILE:                                        
//    -- TO BE ADDED
//////
*}

{include file='header.tpl'}

{if $print_nextprev}
<div style="float:right;padding: 0 0 5px 0; text-align: right;">{$videoplayer->editvideo} {$videoplayer->deletevideo} {$videoplayer->nextprev}</div>
{/if}
<div style="clear:both;"></div>

<div class="hwdmodule-h5">
  <h2>{$videoplayer->title}</h2> 
  <div class="standard"><div class="padding"><center>{$videoplayer->player}</center></div></div>
</div>

{if $print_uservideolist}
	{if $print_relatedlist and $print_categoryvideolist}
	  <div style="width:33%;float:left;padding:0 5px 0 0;" id="usersection">
	{elseif $print_relatedlist or $print_categoryvideolist}
	  <div style="width:50%;float:left;padding:0 5px 0 0;" id="usersection">
	{else}
	  <div> 
	{/if}
		<div class="hwdmodule-h2">
		  <h2>{$smarty.const._HWDVIDS_TITLE_MOREBYUSR} {$videoplayer->uploader}</h2>
		      <div class="list">
			<div class="box">
			  {foreach name=outer item=data from=$userlist}
			  {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>
	  </div>
{/if}

{if $print_relatedlist}
	{if $print_uservideolist and $print_categoryvideolist}
	  <div style="width:33%;float:left;padding:0 5px 0 0;" id="relatedsection">
	{elseif $print_uservideolist or $print_categoryvideolist}
	  <div style="width:50%;float:left;padding:0 0 0 0;" id="relatedsection">
	{else}
	  <div> 
	{/if}
		<div class="hwdmodule-h3">
		  <h2>{$smarty.const._HWDVIDS_RELATED}</h2>
		      <div class="list">
			<div class="box">
			  {foreach name=outer item=data from=$listrelated}
			  {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>
	  </div>
{/if}

{if $print_categoryvideolist}
	{if $print_uservideolist and $print_relatedlist}
	  <div style="width:33%;float:right;padding:0 0 0 0;" id="categorysection">
	{elseif $print_uservideolist or $print_relatedlist}
	  <div style="width:50%;float:left;padding:0 0 0 0;" id="categorysection">
	{else}
	  <div> 
	{/if}
		<div class="hwdmodule-h1">
		  <h2>Category Videos</h2>
		      <div class="list">
			<div class="box">
			  {foreach name=outer item=data from=$categoryvideolist}
			  {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>
	  </div>
{/if}

<div style="clear:both;"></div>
    {if $print_ads}{if $advert3}<div class="hwdadcontainer"><div id="hwdadverts-nopadding">{$advert3}</div></div>{/if}{/if}
<div style="clear:both;"></div>

{if $print_comments}
  <div style="width:50%;float:left;padding:0 5px 0 0;" id="datasection"> 
{else}
  <div> 
{/if}

<div class="hwdmodule-h5">

	<div class="standard">
		<div class="padding">
			{include file='video_details.tpl'}
		</div>
	</div>

</div>

</div>

{if $print_comments}
<div style="width:50%;float:left;" id="commentssection">
<div class="hwdmodule-h1">
  <h2>{$smarty.const._HWDVIDS_TITLE_VIDCOMMS}</h2>
  <div class="standard"><div class="padding"><center>{$videoplayer->comments}</center></div></div>
</div>
</div>
{/if}

<div style="clear:both;"></div>



	{if $print_uservideolist and $print_relatedlist and $print_categoryvideolist}

{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var userWidth = document.getElementById("usersection").offsetWidth;
	var relaWidth = document.getElementById("relatedsection").offsetWidth;
	var sideWidth = fullWidth - userWidth - relaWidth - 2;
	document.getElementById("categorysection").style.width = sideWidth + "px";
</script>
{/literal}

	{elseif $print_relatedlist and $print_categoryvideolist}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var relaWidth = document.getElementById("relatedsection").offsetWidth;
	var sideWidth = fullWidth - relaWidth - 1;
	document.getElementById("categorysection").style.width = sideWidth + "px";
</script>
{/literal}

	{elseif $print_uservideolist and $print_relatedlist}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var userWidth = document.getElementById("usersection").offsetWidth;
	var sideWidth = fullWidth - userWidth - 1;
	document.getElementById("relatedsection").style.width = sideWidth + "px";
</script>
{/literal}

	{elseif $print_uservideolist and $print_categoryvideolist}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var userWidth = document.getElementById("usersection").offsetWidth;
	var sideWidth = fullWidth - userWidth - 1;
	document.getElementById("categorysection").style.width = sideWidth + "px";
</script>
{/literal}

	{/if}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var dataWidth = document.getElementById("datasection").offsetWidth;
	var commWidth = fullWidth - dataWidth - 1;
	document.getElementById("commentssection").style.width = commWidth + "px";
</script>
{/literal}	


{include file='footer.tpl'}
