<script type="text/javascript" src="<?=base_url()?>js/jquery.form.js"></script>				
				
				<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" id="theme">
				<link rel="stylesheet" href="<?php echo base_url() ?>css/jquery.fileupload-ui.css">
				
				
				<!--<p style="margin-bottom: 10px;"><?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/icon_arrow.png" align="baseline" style=" position:relative; top:4px;" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				echo '<img src="'.base_url().'images/icon_arrow.png" align="baseline" style=" position:relative; top:4px;" /><a href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.$module->modules_name; ?></a> </p>
				
				
				<div id="navigationContener">
				<p ><img src="<?php echo base_url(); ?>images/navigation_head_icon.png" align="absmiddle" style="" /> <?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				 echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.$module->modules_name.'</a>';
				?> </p>
                </div>-->
                
                <div class="breadcrumb ui-corner-tl ui-corner-tr">
                <div style="float:left; position:relative;"><img class="breadcrumbIcon" align="absmiddle"  src="<?php echo base_url();?>images/homePage.png" /><a href="<?php echo base_url(); ?>">Strona WWW</a><img src="<?php echo base_url(); ?>images/breadcrumbSeparator.png" align="absmiddle" style="" /></div>
                <?php
				$counter = count($parents);
				$count = 1;
				$lastNode = null;
				 foreach($parents as $node){
					 
					echo '<div class="contenerNodeBreadcrumb"><img src='.base_url().'images/newspaper.png align="absmiddle" class="breadcrumbIcon"><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.truncate($node->nodeData['name']).'</a>';
				//	if($counter==$count) echo '<img style="position:absolute; left:40%; top:32px;" src='.base_url().'images/pointer_breadcrumb.png /> ';
				
					echo '</div><img src="'.base_url().'images/breadcrumbSeparator.png"  align="absmiddle"  class="separatorBreadcrumb" />'; 
				 $count++;
				 $lastNode = $node; 
				 } 
				 echo '<div class="contenerNodeBreadcrumb"><img src="'.base_url().'images/brick_mini.png" align="absmiddle" class="breadcrumbIcon" /><a  href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.truncate($module->modules_name).'</a> <img class="pointerBreadcrumb" src='.base_url().'images/pointer_breadcrumb.png /></div>';
				?>
                <a href="<?php echo base_url()?>admin/wyswietl/<?php echo $lastNode->id ?>"><img src="<?=base_url(); ?>images/back_cms_main.png" border="0" style="float:right;"></a>
                </div>
                
				<br/>
				
				
				<script type="text/javascript">
					function successFunc(data)  { 
						//alert(data);
						$('#ajax-loader').html("");
						var base_url = "<?php echo base_url(); ?>";
						var i = Math.floor(Math.random()*100000);
			            
						$("#uploadform input[name=uploaded_movie_name]").attr("val", data);
			        	var base_url = "<?php echo base_url(); ?>";
			        	$.post(base_url+'admin/addvideo/'+data,$("#uploadform").serialize()+"&uploaded_movie_name="+data,function(info){
							//window.location.reload();
			        		window.location.href="<?=base_url()?>admin/module/<?=$this->uri->segment(3)?>";
						});
			            
	
			            
					}
					$(document).ready(function(){
						$('form.upload input[name=file]').change(function(){
							var options = { 
							        target:        '',   // target element(s) to be updated with server response 
							        dataType:	'html', 
							        success:	successFunc  // post-submit callback 
							 		//,
							 		//url: '<?=base_url()?>index.php/strona/tmp_logo'
							    }; 
							$("form.upload").ajaxSubmit(options);
		                    					                
							$('#ajax-loader').html("<img src='<?=base_url()?>images/ajax-loader.gif' />");
						});
					});
				</script>
				
				<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
				
				<form action="<?php echo base_url(); ?>admin/addvideo" method="post" enctype="multipart/form-data" id="uploadform" >
				
					<tr><th>Nowy film: </th></tr>
					<tr>
						<th valign="top">Nagłówek:</th>
						<td><table><tr id="input-header">
							<td><input type="text" class="inp-form" name="header" /></td>
							<td class="error-td">
							
							</td>
						</tr></table></td>
					</tr>
					<tr>
					<th valign="top">Opis:</th>
						<td><input type="text" class="inp-form" name="description" /></td>
						<td></td>
					</tr>
					
					<tr>
					<th valign="top">Typ filmu:</th>
					<td>	
					<select name="videotype" class=" ___styledselect_form_1">
						<option value="">Wybierz typ filmu</option>
						<option value="file">Plik z dysku</option>
						<option value="outsidelink">Film z serwisu zewnętrznego</option>
					</select>
					</td>
					<td></td>
					</tr>
					
					<tr class="zewnetrzny">
					<th valign="top">Zewnętrzny obiekt wideo:</th>
						
						<td><table><tr id="input-name">
							<td><input type="text" class="inp-form" name="name" /></td>
							<td class="error-td">
							
							</td>
						</tr></table></td>
						<!--<a  class="submit button buttonBlack "><img src="<?php echo base_url(); ?>images/buttons/disc.png" />Zapisz</a>
						-->
						<td><table><tr id="input-name">
							<td><input type="submit" value="Zapisz" /></td>
							<td class="error-td">
							
							</td>
						</tr></table></td>
						
					</tr>
					<input type="hidden" name="module_id" value="<?php echo $this->uri->segment(3); ?>" />
					<input id="uploaded_movie_name" type="hidden" name="uploade d_movie_name" />
								
					<!--<input type="submit" value="Zapisz" style="width: 200px;"/>-->
					<!--
					--></form>
					
					
					<tr class="zdysku">
					
					
					
					<th>Wybierz plik:</th>
					
						<!--<td><input type="FILE" class="fil_1" name="Filedata" id="upload" /></td>-->
						<td>
						<form class="upload" action="<?php echo base_url() ?>admin/uploadfile/<?=$this->uri->segment(3)?>" method="POST" enctype="multipart/form-data">
					    	<input type="file" name="file">
					    	<!--<button>Upload</button>
					    	<div>Dodaj pliki</div>
						-->
						</form>
						<table class="upload_files"></table>
						<table class="download_files"></table>
						</td>
						<td>
						<!--<div class="bubble-left"></div>
						<div class="bubble-inner">JPEG, GIF 5MB max per image</div>
						<div class="bubble-right"></div>-->
						</td>
					</tr>
					<!--
					<tr  class="zdysku"><th>Rozmiar wideo na stronie:</th></tr>
					<tr  class="zdysku">
					<th valign="top">Wysokość (px):</th>
						
						<td><table><tr>
							<td><input type="text" class="inp-form-error" name="x" value="<?php echo $rozmiar->x; ?>"/></td>
							<td>
							<div class="error-left"></div>
						<div class="error-inner">Pole wymagane</div>
							</td>
						</tr></table></td>
					</tr>
					<tr  class="zdysku">
					<th valign="top">Szerokość (px):</th>
						
						<td><table><tr>
							<td><input type="text" class="inp-form-error" name="y" value="<?php echo $rozmiar->y; ?>"/></td>
							<td>
							<div class="error-left"></div>
						<div class="error-inner">Pole wymagane</div>
							</td>
						</tr></table></td>
					</tr>
					-->
					<tr><td>
					
					</td></tr>
				</table>
					
				<!--</form>-->
				<br/><br/>
				
				<script type="text/javascript">
				$(document).ready(function(){
					
					$("#edytujVideo").dialog({ 
						autoOpen: false,
						//modal: true,
						width: 600,
						//position: [500,100],
						close: function(event, ui) {
							$(".ui-overlay").attr("style", "display:none;");
						},
						buttons:{
							"Anuluj": function(){
								$(this).dialog("close");
								$(".ui-overlay").attr("style","display:none;");
							},
							"Zapisz": function(){
								$(this).find("form input[type=submit]").click();
							}
						}
					});

					$("button.edytujvideo").live('click', function(){
						//alert($(this).attr("id"));
						$("div#edytujVideo form input[name=video_id]").attr("value", $(this).attr("id"));
						//alert($(this).attr("id"));
						$.getJSON("<?php echo base_url(); ?>admin/getvideodata/"
								+$(this).attr('id'),
							function(data){
								$("div#edytujVideo form input[name=header]").attr("value", data.header);
								$("div#edytujVideo form input[name=desc]").attr("value", data.desc);
																

								$(".ui-overlay").attr("style", "display:block;");
								$("#edytujVideo").dialog("open");
							}
						);
					});
				});
				</script>
				
				<div id="edytujVideo" title="Edytuj opis filmu" >
					<h2><strong>Edytuj opis filmu</strong></h2>
					<form action="<?php echo base_url(); ?>admin/edytujvideo" method="post">
						<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
						<tr>
							<th valign="top">Nagłówek:</th>
							<td><table><tr id="input-header">
								<td><input type="text" class="inp-form" name="header" /></td>
								<td class="">
								
								</td>
							</tr></table></td>
						</tr>
						<tr>
							<th valign="top">Opis:</th>
							<td><table><tr id="input-desc">
								<td><input type="text" class="inp-form" name="desc" /></td>
								<td class="">
								
								</td>
							</tr></table></td>
						</tr>
						
						</table>
						<input type="hidden" name="video_id" value="" />
						<input type="hidden" name="module_id" value="<?= $this->uri->segment(3) ?>" />
						<input style="display: none;" type="submit" value="Edytuj" />
					</form>
				</div>
				
				
				
				<script type="text/javascript" src="<?php echo base_url(); ?>js/submitDelete.js"></script>
				
				
				<?php if($movies && $movies->num_rows()>0) { ?>
				<ul id="sortableVideos">
					<?php foreach ($movies->result() as $video) { ?>
						<li class="ui-state-default" id="video_<?php echo $video->ID_videos; ?>">
							<?php if($video->videos_type == "outsidelink") echo $video->videos_name;
									else if($video->videos_type == "file") { ?>
										<?php if(file_exists('video/'.$video->videos_name)) { ?>
									
											<!--<a class="video_link" href="<?php echo $video->videos_name; ?>" >asd</a>-->
											
											
											<object id="MediaPlayer1"
												width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
												classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
												codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
												standby="Loading Microsoft® Windows® Media Player components..."
												type="application/x-oleobject">		
												<param name="FileName" value="<?php echo base_url().'video/'.$video->videos_name; ?>" />
												<param name="animationatStart" value="true" />
												<param name="transparentatStart" value="true" />
												<param name="autoStart" value="false" />
												<param name="showControls" value="true" />
												<param name="Volume" value="0" />
												<embed type="application/x-mplayer2"
													pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
													src="<?php echo base_url().'video/'.$video->videos_name; ?>"
													name="MediaPlayer1"
													width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
													autostart="false">
													
												</embed>
											</object>
										<?php } else { ?>
											
											<object id="MediaPlayer1"
												width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
												classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
												codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
												standby="Loading Microsoft® Windows® Media Player components..."
												type="application/x-oleobject">		
												<param name="FileName" value="<?php echo reduce_double_slashes(prep_url($adres).'/video/'.$video->videos_name); ?>" />
												<param name="animationatStart" value="true" />
												<param name="transparentatStart" value="true" />
												<param name="autoStart" value="false" />
												<param name="showControls" value="true" />
												<param name="Volume" value="0" />
												<embed type="application/x-mplayer2"
													pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
													src="<?php echo reduce_double_slashes(prep_url($adres).'/video/'.$video->videos_name); ?>"
													name="MediaPlayer1"
													width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
													autostart="false">
													
												</embed>
											</object>
										<?php } ?>	
									<?php }
							?>
							
							
							<p class="videoHeader"><?php echo $video->videos_header; ?></p>
							<p class="videoHeader"><?php echo $video->videos_description; ?></p>
							<button title="Edytuj opis"  class="edytujvideo button buttonLightGrey tooltip" id="<?php echo $video->ID_videos; ?>" ><img style="margin-right:0px;" src="<?php echo base_url(); ?>images/pencil.png" /></button>
							<form class="usunwideo" style="margin-top: 10px;" action="<?php echo base_url(); ?>admin/removevideo" method="post">
								<input type="hidden" name="id" value="<?php echo $video->ID_videos; ?>" />
								<?php if($video->videos_type == "file") { ?>
								<input type="hidden" name="name" value="<?php echo $video->videos_name; ?>" />
								<?php } else { ?>	
								<input type="hidden" name="name" value="" />
								<?php } ?>

								<input type="hidden" name="type" value="<?php echo $video->videos_type; ?>" />

								<input type="hidden" name="module_id" value="<?php echo $video->videos_module_id; ?>" />
								<input type="submit" value="Usuń" />
							</form>
						</li>
					<?php } ?>
				</ul>
				<div class="clear"></div>
				<br/>
				
				<?php } ?>
			
			
				
	<?php /*
				echo '{"name":"'.$nazwa_pliku.'","type":"'.$plik['type'].'","size":"'.$plik['size'].'"}';
				echo $nazwa_pliku;
					
				<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" id="theme">
				<link rel="stylesheet" href="<?php echo base_url() ?>css/jquery.fileupload-ui.css">
				
				
				<!--<p style="margin-bottom: 10px;"><?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/icon_arrow.png" align="baseline" style=" position:relative; top:4px;" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				echo '<img src="'.base_url().'images/icon_arrow.png" align="baseline" style=" position:relative; top:4px;" /><a href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.$module->modules_name; ?></a> </p>
				
				
				<div id="navigationContener">
				<p ><img src="<?php echo base_url(); ?>images/navigation_head_icon.png" align="absmiddle" style="" /> <?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				 echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.$module->modules_name.'</a>';
				?> </p>
                </div>-->
                
                <div class="breadcrumb ui-corner-tl ui-corner-tr">
                <div style="float:left; position:relative;"><img class="breadcrumbIcon" align="absmiddle"  src="<?php echo base_url();?>images/homePage.png" /><a href="<?php echo base_url(); ?>">Strona WWW</a><img src="<?php echo base_url(); ?>images/breadcrumbSeparator.png" align="absmiddle" style="" /></div>
                <?php
				$counter = count($parents);
				$count = 1;
				$lastNode = null;
				 foreach($parents as $node){
					 
					echo '<div class="contenerNodeBreadcrumb"><img src='.base_url().'images/newspaper.png align="absmiddle" class="breadcrumbIcon"><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.truncate($node->nodeData['name']).'</a>';
				//	if($counter==$count) echo '<img style="position:absolute; left:40%; top:32px;" src='.base_url().'images/pointer_breadcrumb.png /> ';
				
					echo '</div><img src="'.base_url().'images/breadcrumbSeparator.png"  align="absmiddle"  class="separatorBreadcrumb" />'; 
				 $count++;
				 $lastNode = $node; 
				 } 
				 echo '<div class="contenerNodeBreadcrumb"><img src="'.base_url().'images/brick_mini.png" align="absmiddle" class="breadcrumbIcon" /><a  href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.truncate($module->modules_name).'</a> <img class="pointerBreadcrumb" src='.base_url().'images/pointer_breadcrumb.png /></div>';
				?>
                <a href="<?php echo base_url()?>admin/wyswietl/<?php echo $lastNode->id ?>"><img src="<?=base_url(); ?>images/back_cms_main.png" border="0" style="float:right;"></a>
                </div>
                
				<br/>
				
				<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
				
				<form action="<?php echo base_url(); ?>admin/addvideo" method="post" enctype="multipart/form-data" id="uploadform" >
				
					<tr><th>Nowy film: </th></tr>
					<tr>
						<th valign="top">Nagłówek:</th>
						<td><table><tr id="input-header">
							<td><input type="text" class="inp-form" name="header" /></td>
							<td class="error-td">
							
							</td>
						</tr></table></td>
					</tr>
					<tr>
					<th valign="top">Opis:</th>
						<td><input type="text" class="inp-form" name="description" /></td>
						<td></td>
					</tr>
					
					<tr>
					<th valign="top">Typ filmu:</th>
					<td>	
					<select name="videotype" class=" ___styledselect_form_1">
						<option value="">Wybierz typ filmu</option>
						<option value="file">Plik z dysku</option>
						<option value="outsidelink">Film z serwisu zewnętrznego</option>
					</select>
					</td>
					<td></td>
					</tr>
					
					<tr class="zewnetrzny">
					<th valign="top">Zewnętrzny obiekt wideo:</th>
						
						<td><table><tr id="input-name">
							<td><input type="text" class="inp-form" name="name" /></td>
							<td class="error-td">
							
							</td>
						</tr></table></td>
						<!--<a  class="submit button buttonBlack "><img src="<?php echo base_url(); ?>images/buttons/disc.png" />Zapisz</a>
						-->
						<td><table><tr id="input-name">
							<td><input type="submit" value="Zapisz" /></td>
							<td class="error-td">
							
							</td>
						</tr></table></td>
						
					</tr>
					<input type="hidden" name="module_id" value="<?php echo $this->uri->segment(3); ?>" />
					<input id="uploaded_movie_name" type="hidden" name="uploade d_movie_name" />
								
					<!--<input type="submit" value="Zapisz" style="width: 200px;"/>-->
					<!--
					--></form>
					
					
					<tr class="zdysku">
					
					
					
					<th>Wybierz plik:</th>
					
						<!--<td><input type="FILE" class="fil_1" name="Filedata" id="upload" /></td>-->
						<td>
						<form class="upload" action="<?php echo base_url() ?>admin/uploadfile/<?=$this->uri->segment(3)?>" method="POST" enctype="multipart/form-data">
					    	<input type="file" name="file">
					    	<button>Upload</button>
					    	<div>Dodaj pliki</div>
						</form>
						<table class="upload_files"></table>
						<table class="download_files"></table>
						</td>
						<td>
						<!--<div class="bubble-left"></div>
						<div class="bubble-inner">JPEG, GIF 5MB max per image</div>
						<div class="bubble-right"></div>-->
						</td>
					</tr>
					<!--
					<tr  class="zdysku"><th>Rozmiar wideo na stronie:</th></tr>
					<tr  class="zdysku">
					<th valign="top">Wysokość (px):</th>
						
						<td><table><tr>
							<td><input type="text" class="inp-form-error" name="x" value="<?php echo $rozmiar->x; ?>"/></td>
							<td>
							<div class="error-left"></div>
						<div class="error-inner">Pole wymagane</div>
							</td>
						</tr></table></td>
					</tr>
					<tr  class="zdysku">
					<th valign="top">Szerokość (px):</th>
						
						<td><table><tr>
							<td><input type="text" class="inp-form-error" name="y" value="<?php echo $rozmiar->y; ?>"/></td>
							<td>
							<div class="error-left"></div>
						<div class="error-inner">Pole wymagane</div>
							</td>
						</tr></table></td>
					</tr>
					-->
					<tr><td>
					
					</td></tr>
				</table>
					
				<!--</form>-->
				<br/><br/>
				
				<script type="text/javascript">
				$(document).ready(function(){
					
					$("#edytujVideo").dialog({ 
						autoOpen: false,
						//modal: true,
						width: 600,
						//position: [500,100],
						close: function(event, ui) {
							$(".ui-overlay").attr("style", "display:none;");
						},
						buttons:{
							"Anuluj": function(){
								$(this).dialog("close");
								$(".ui-overlay").attr("style","display:none;");
							},
							"Zapisz": function(){
								$(this).find("form input[type=submit]").click();
							}
						}
					});

					$("button.edytujvideo").live('click', function(){
						//alert($(this).attr("id"));
						$("div#edytujVideo form input[name=video_id]").attr("value", $(this).attr("id"));
						//alert($(this).attr("id"));
						$.getJSON("<?php echo base_url(); ?>admin/getvideodata/"
								+$(this).attr('id'),
							function(data){
								$("div#edytujVideo form input[name=header]").attr("value", data.header);
								$("div#edytujVideo form input[name=desc]").attr("value", data.desc);
																

								$(".ui-overlay").attr("style", "display:block;");
								$("#edytujVideo").dialog("open");
							}
						);
					});
				});
				</script>
				
				<div id="edytujVideo" title="Edytuj opis filmu" >
					<h2><strong>Edytuj opis filmu</strong></h2>
					<form action="<?php echo base_url(); ?>admin/edytujvideo" method="post">
						<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
						<tr>
							<th valign="top">Nagłówek:</th>
							<td><table><tr id="input-header">
								<td><input type="text" class="inp-form" name="header" /></td>
								<td class="">
								
								</td>
							</tr></table></td>
						</tr>
						<tr>
							<th valign="top">Opis:</th>
							<td><table><tr id="input-desc">
								<td><input type="text" class="inp-form" name="desc" /></td>
								<td class="">
								
								</td>
							</tr></table></td>
						</tr>
						
						</table>
						<input type="hidden" name="video_id" value="" />
						<input type="hidden" name="module_id" value="<?= $this->uri->segment(3) ?>" />
						<input style="display: none;" type="submit" value="Edytuj" />
					</form>
				</div>
				
				
				
				<script type="text/javascript" src="<?php echo base_url(); ?>js/submitDelete.js"></script>
				
				
				<?php if($movies && $movies->num_rows()>0) { ?>
				<ul id="sortableVideos">
					<?php foreach ($movies->result() as $video) { ?>
						<li class="ui-state-default" id="video_<?php echo $video->ID_videos; ?>">
							<?php if($video->videos_type == "outsidelink") echo $video->videos_name;
									else if($video->videos_type == "file") { ?>
										<?php if(file_exists('video/'.$video->videos_name)) { ?>
									
											<!--<a class="video_link" href="<?php echo $video->videos_name; ?>" >asd</a>-->
											
											
											<object id="MediaPlayer1"
												width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
												classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
												codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
												standby="Loading Microsoft® Windows® Media Player components..."
												type="application/x-oleobject">		
												<param name="FileName" value="<?php echo base_url().'video/'.$video->videos_name; ?>" />
												<param name="animationatStart" value="true" />
												<param name="transparentatStart" value="true" />
												<param name="autoStart" value="false" />
												<param name="showControls" value="true" />
												<param name="Volume" value="0" />
												<embed type="application/x-mplayer2"
													pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
													src="<?php echo base_url().'video/'.$video->videos_name; ?>"
													name="MediaPlayer1"
													width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
													autostart="false">
													
												</embed>
											</object>
										<?php } else { ?>
											
											<object id="MediaPlayer1"
												width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
												classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
												codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
												standby="Loading Microsoft® Windows® Media Player components..."
												type="application/x-oleobject">		
												<param name="FileName" value="<?php echo reduce_double_slashes(prep_url($adres).'/video/'.$video->videos_name); ?>" />
												<param name="animationatStart" value="true" />
												<param name="transparentatStart" value="true" />
												<param name="autoStart" value="false" />
												<param name="showControls" value="true" />
												<param name="Volume" value="0" />
												<embed type="application/x-mplayer2"
													pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
													src="<?php echo reduce_double_slashes(prep_url($adres).'/video/'.$video->videos_name); ?>"
													name="MediaPlayer1"
													width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
													autostart="false">
													
												</embed>
											</object>
										<?php } ?>	
									<?php }
							?>
							
							
							<p class="videoHeader"><?php echo $video->videos_header; ?></p>
							<p class="videoHeader"><?php echo $video->videos_description; ?></p>
							<button title="Edytuj opis"  class="edytujvideo button buttonLightGrey tooltip" id="<?php echo $video->ID_videos; ?>" ><img style="margin-right:0px;" src="<?php echo base_url(); ?>images/pencil.png" /></button>
							<form class="usunwideo" style="margin-top: 10px;" action="<?php echo base_url(); ?>admin/removevideo" method="post">
								<input type="hidden" name="id" value="<?php echo $video->ID_videos; ?>" />
								<?php if($video->videos_type == "file") { ?>
								<input type="hidden" name="name" value="<?php echo $video->videos_name; ?>" />
								<?php } else { ?>	
								<input type="hidden" name="name" value="" />
								<?php } ?>

								<input type="hidden" name="type" value="<?php echo $video->videos_type; ?>" />

								<input type="hidden" name="module_id" value="<?php echo $video->videos_module_id; ?>" />
								<input type="submit" value="Usuń" />
							</form>
						</li>
					<?php } ?>
				</ul>
				<div class="clear"></div>
				<br/>
				
				<?php } ?>
			
			
				<script src="<?php echo base_url()?>js/jquery.fileupload.js"></script>
				<script src="<?php echo base_url()?>js/jquery.fileupload-ui.js"></script>
				<script>
				$(function () {
							    			        
								
				    $('.upload').fileUploadUI({
				        uploadTable: $('.upload_files'),
				        downloadTable: $('.download_files'),
				        buildUploadRow: function (files, index) {
				            var file = files[index];
				            return $(
				                '<tr>' +
				                '<td>' + file.name + '<\/td>' +
				                '<td class="file_upload_progress"><div><\/div><\/td>' +
				                '<td class="file_upload_cancel">' +
				                '<div class="ui-state-default ui-corner-all ui-state-hover" title="Anuluj">' +
				                '<span class="ui-icon ui-icon-cancel">Anuluj<\/span>' +
				                '<\/div>' +
				                '<\/td>' +
				                '<\/tr>'
				            );
				        },
				        buildDownloadRow: function (file) {
					        //var base_url = "<?php echo base_url(); ?>";
					        //var modId = "<?php echo $this->uri->segment(3); ?>";
					        
					        //load(base_url+"admin/module/"+modId+" div#dodane_pliki_content");
				        	//return $(   '<tr><td>' + file.name + '<\/td><\/tr>'   );
				            //<td>'+file.type+'<\/td><td>'+file.size+'<\/td>
				        	$("#uploadform input[name=uploaded_movie_name]").attr("val", file.name);
				        	var base_url = "<?php echo base_url(); ?>";
				        	$.post(base_url+'admin/addvideo/'+file.name,$("#uploadform").serialize()+"&uploaded_movie_name="+file.name,function(info){
								window.location.reload();
							});
				        }
				        
				        
								        
								        
				    });
				});
				</script>
						
						
				
				
	
	*/?>					
						
				
				