<h2>{$data_9.video.upload_title}&nbsp;</h2>
<div align="center" style="margin:0 0%;">
	{if $data_9.video.type eq 'embed'}
		{$data_9.video.url_video}
	{else}
		<a href="{$data_9.video.url_video}" class="player" style="display:block;width:520px;height:330px;" id="player"></a>
		<script type="text/javascript" src="{$server}/flowplayer/flowplayer-3.2.8.min.js"></script>
		<script type="text/javascript" src="{$server}/flowplayer/flowplayer.ipad-3.2.8.js"></script>
		<script type="text/javascript" src="http://flowplayer.org/media/js/site.js"></script>
		<script>
			$f("player", "{$server}/flowplayer/flowplayer-3.2.8.swf").ipad();
		</script>
		
		{*<div class="flowplayer" data-engine="flash" style="display:block;width:520px;height:330px;">
			<video autoplay src="{$data_9.video.url_video}"></video>
		</div>
		{literal}
		<script>
			flowplayer.conf = {
				engine: "flash",
				swf: "{/literal}{$server}{literal}/flowplayer_new/flowplayer.swf",
				debug: true
			};
			$(".flowplayer").flowplayer();
		</script>
		{/literal}*}
	{/if}
</div>
<div id="slides" style="margin-left:4px;">
	<div id="photo_description" style="position: relative;">{$data_9.video.user_comment}&nbsp;</div>
</div>
<div class="hotornot" style="margin: 5px auto; display:none;"></div>

<script type="text/javascript">
	var can_edit = {$can_edit};
	var id_video = {$data_9.video.id}
	var id_album = {$data_9.id_album};
	
	{literal}
	
	GetComments_myprofile(id_video, 1, can_edit);

	if (can_edit){
		edit_descr = '&nbsp;<a style="cursor:pointer;" class="float_right" onClick="ChangeStat('+id_video+'); return false;">{/literal}{$lang.button.edit}{literal}</a>';
		$('#photo_description').append(edit_descr);
	}

	$(document).ready(function(){
		if(typeof($f) != 'undefined'){
			$('#close').click(function() {
				$f().stop();
			});
			$('#mask').click(function() {
				$f().stop();
			});
		}
	});
	
	function ChangeStat(par) {
		$("#photo_description").html("<div><input type='text' id='descr' name='descr' onkeyup=\"BadWords('descr');\" value='"+'{/literal}{$data_9.video.user_comment}{literal}'+"'><a class='small-active-icon' style='padding-top:0px; padding-bottom: 6px;' name='submit' onclick='SaveStat("+par+");'>&nbsp;</a></div><div id=\"bad_div_descr\" class=\"bad_div_left\"></div>");
	}
		
	function SaveStat(par) {
		var value = $("#descr").val();
		var edit_descr = '<a onClick="ChangeStat('+par+'); return false;" class="float_right">{/literal}{$lang.button.edit}{literal}</a>';

		$.post(SEO_SITE_ROOT+"/myprofile.php",{sel:"set_description_photo",id:id_video, text:value},function(data){
			if (data == "send")
				$("#photo_description").html(value+edit_descr);
		});
	}
		
	function VoteUser_myrpofile(estim){
		var destination = $(".active_section");
		var vote = $('#vote').val();
		var upload_type = 'v';
		var ok = '{/literal}{$lang.gallary.voice_submitted}{literal}';
		InitXMLHttpRequest();
		if (req){
					req.onreadystatechange = function() {
							if (req.readyState == 4) {
									destination.innerHTML = req.responseText;
							} else {
									destination.innerHTML = "Loading...";
							}
					}
					req.open('GET', SEO_SITE_ROOT+'/myprofile.php?sel=vote&id_upload=' + id_video + '&vote=' + estim + '&id_category=' + id_album+ '&upload_type=' + upload_type, true);
					req.send(null);
					$(".hotornot").html(ok);
		}
		else{
		   destination.innerHTML = 'Browser unable to create XMLHttp Object';
		}
		return;
	}
</script>
{/literal}