<style>
#right_column{
	float:left;
	width:207px;
	height:420px;
	background-color:#edecec;}

#right_column ul li{
	list-style:none;
	float:left;
	width:197px;
	height:130px;
	margin:5px;
	background:#FFF;
	}
</style>

<?php
			$query = "SELECT 
					  galerias.id,
					  galerias.imagen,
					  galerias.descripcion,
					  galerias.tipo,
					  galerias.link,
					  galerias.video
					FROM
					 galerias
					WHERE
					galerias.tipo = '2' ORDER BY galerias.id DESC";
		
			$pics = $engine->DB->QueryToArray($query);
			        
?>



						<?php if(isset($pics)): $i=1; foreach ($pics as $pic):?>
                        
                            <li>
                               <?php
							   		if($pic['imagen']!=''):
										echo '<a href="'.$pic['link'].'" target="_blank"><img src="{$SITE_URL}/media/publicidad/thumbs/'.$pic['imagen'].'" alt="'.$pic['descripcion'].'"></a>';									
									else:
										echo '<iframe width="200" height="130" src="http://www.youtube.com/embed/'.get_youtube($pic['video']).'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';									
									endif;                              
							   ?>
                            </li>
                        
                        <?php $i++; endforeach; endif;?>
