<?php
			$query = "SELECT * FROM banners ORDER BY banners.id DESC";
			$pics = $engine->DB->QueryToArray($query);
?>

<link rel="stylesheet" id="anythingslider-base-css" href="{$TEMPLATE_URL}/css/anythingslider.css" type="text/css" media="all">
<link rel="stylesheet" id="anythingslider-base-css" href="{$TEMPLATE_URL}/css/theme-minimalist-round.css" type="text/css" media="all">
<script type="text/javascript" src="{$SITE_URL}/libs/jquery/plugins/jquery.anythingslider.js"></script>

<style>
#slider_wrapper {
	margin:0px 0px 0 0px;
	width: 650px;
	height: 192px;
	list-style: none;
	border-radius:0px;
}

#slider { width: 650px; height: 192px; 
border-radius:0px;
overflow:hidden;
}


#slider li { width: 650px; height: 192px;
overflow:hidden;
border-radius:0px;

}
.slider_cont{
		width: 650px;
		overflow:hidden;
		height: 192px;
}

.slider_cont a{
	font-family:Arial;
	font-size:10pt;
	font-weight:bold;
	color:#09F;
	text-decoration:none;
	}


.link-info a{
	font-family:Tahoma, Geneva, sans-serif;
	font-size:12pt;
	font-weight:bold;
	color:#09F;
	text-decoration:none;
	}
</style>

<div id="banner">
    <div id="slider_wrapper">
        <!-- Simple AnythingSlider -->
    
        <ul id="slider">
                <?php if(isset($pics)): $i=1; foreach ($pics as $pic):?>
                
            <li>
                <div class="slider_cont">
                            <? if($pic['link']!=''):?><a href="<?=$pic['link']?>" target="_blank"><? endif; ?>
                                <img src="{$TEMPLATE_URL}/banner/<?=$pic['imagen']?>" />
                            <? if($pic['link']!=''):?></a><? endif; ?>
                </div>
            </li>
                
                <?php $i++; endforeach; endif;?>
        </ul>
        <!-- AnythingSlider initialization -->
        {literal}
		<script>
            // DOM Ready
            $(function(){
                $('#slider').anythingSlider({
                    
                    theme               : 'minimalist-round', 
                    expand              : false,     
                    resizeContents      : false,
                    vertical            : false,      
                    showMultiple        : 1,     
                    easing              : 'swing',   
                    
                    buildArrows         : true,      
                    buildNavigation     : true,      
                    buildStartStop      : false,      
                
                    
                    toggleArrows        : true,     
                    toggleControls      : true,     
                    
                    startText           : 'Iniciar',   
                    stopText            : 'Parar',    
                    forwardText         : '»', 
                    backText            : '«', 
                    tooltipClass        : 'tooltip', 
                    
                    
                    enableArrows        : true,      
                    enableNavigation    : true,      
                    enableStartStop     : false,      
                    enableKeyboard      : true,      
                    
                    
                    startPanel          : '1',         
                    changeBy            : '1',         
                    hashTags            : false,      
                    infiniteSlides      : true,
                    navigationFormatter : 'NULL',      
                    
                    
                    autoPlay            : true,     
                    autoPlayLocked      : false,     
                    autoPlayDelayed     : true,     
                    pauseOnHover        : true,      
                    stopAtEnd           : false,     
                    playRtl             : false,     
                    
                    
                    delay               : 4500,      
                    resumeDelay         : 4500, 
                    animationTime       : 350,
                    delayBeforeAnimate  : 0,       
                    
                    
                    clickForwardArrow   : 'click',         
                    clickBackArrow      : 'click',         
                    clickControls       : 'click focusin', 
                    clickSlideshow      : 'click',        
                    
                    
                    resumeOnVideoEnd    : true,      
                    addWmodeToObject    : 'transparent'
                    
                });
            });
        </script>                        
        {/literal}
        <!-- END AnythingSlider -->            

    </div>
</div>