<?php
    echo '<div id="gallery-wrapper" style="padding:0px;width:505px;">';

        if(isset($content)){
                echo $content;
         }

        if(!empty($images) && count($images) >0)
            {
				echo '<div id="slider">';
                    for($i=0;$i<count($images);$i++)
                    {
                        list($width, $height) = getimagesize('files/img/galleries/'.$images[$i]['idgalleries'].'/'.$images[$i]['path']);
                        echo '<img src="/files/img/galleries/'.$images[$i]['idgalleries'].'/'.$images[$i]['path'].'"  alt=""  width="'.$width.'" height="'.$height.'"/>';
                    }
                echo '</div>';

                echo '<div id="htmlcaption" class="nivo-html-caption">';
                    echo '<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.';
                echo '</div>';
            }
        echo '</div>';
        echo '<br/>';
        echo '<br/>';
	?>
<script type="text/javascript">
$(document).ready(function(){

    showContent();
    function showContent()
    {
        $("#gallery-wrapper").css({ opacity: 0 });
		$("#gallery-wrapper").animate({ opacity: 1 },1000);
    };

    $('#slider').css('width','470px');
    $('#slider').nivoSlider({
        effect:'fade',
        directionNav:true, //Next & Prev
        directionNavHide:true //Only show on hover
    });
    $('#slider').data('nivo:vars').stop = true;
});
</script>