{{if $Results|@count eq 0}}
<center><h3>There are no videos to show for the moment</h3></center>
{{else}}
		{{capture name=jsinclude assign=JavaScriptJQueryIncludeCode}}
				<script type="text/javascript" src="/js/video/jquery.jwplayer.js"></script>

		{{/capture}}
		{{capture name=jscode assign=JavaScriptJQueryCode}}

						
							$(".siteVideo").css({ cursor: 'pointer'});
							$(".siteVideo").each(function(){
							
								$(this).click(function(event){ 
											
									var html 	= '<video src="'+$(this).attr('vsrc')+'" height="'+$(this).attr('vheight')+'" id="o2player" poster="'+$(this).attr('vimg')+'" width="'+$(this).attr('vwidth')+'"></video>';
									
									
									$('#o2player').remove();
									$('#videocontainer').html(html);				

									$('#o2player').jwplayer({
											flashplayer:'/js/video/player.swf',
											skin:'/js/video/five/five.xml'
									  });

									
										 
								}); //end on click	
						});
						
						$('#o2player').jwplayer({
											flashplayer:'/js/video/player.swf',
											skin:'/js/video/five/five.xml'
									  });
										
					
    
		{{/capture}}
		
		<table cellpadding="4" cellspacing="4" border="0" width="100%">
		<tr valign="top">
		{{foreach from=$Results item=v key=k name=n}}  
			{{if $smarty.foreach.n.index eq 0}}{{assign var=SelectedVideo value=$v}}{{/if}}
			{{if $smarty.get.video eq $v.Collection_50_ID}}{{assign var=SelectedVideo value=$v}}{{/if}}
			{{if $smarty.foreach.n.index gt 0 and $smarty.foreach.n.index % 5 eq 0}}</tr><tr valign="top">{{/if}}
			<td align="center"><img class="siteVideo" src="{{$v.Collection_50_5}}" vsrc="{{$v.Collection_50_3}}" vimg="{{$v.Collection_50_4}}" alt="{{$v.Collection_50_1|addslashes}}" vheight="{{$v.Collection_50_4|getHeight}}" vwidth="{{$v.Collection_50_4|getWidth}}" id="siteVideo{{$v.Collection_50_ID}}"/><br/><p align="center"><font size="-2">{{$v.Collection_50_1}}</font></p></td>
		{{/foreach}}
		</tr>
		</table>
		<div id="videocontainer"><video src="{{$SelectedVideo.Collection_50_3}}" height="{{$SelectedVideo.Collection_50_4|getHeight}}" id="o2player" poster="{{$SelectedVideo.Collection_50_4}}" width="{{$SelectedVideo.Collection_50_4|getWidth}}"></video></div>
{{/if}}