<div class="form form-profile aif" style='width:auto;'>
    <form action="?portfolio" method="post">
        <div class="row-item clearfix" style="text-align:left; padding-bottom:10px;">
            <label class="lbl" for="txt_name1"
			style="text-align:left; padding-bottom:7px; width:100%; display:block;">Upload Images</label>
			<div class="val" style="margin-left:0px;">
                <div>
                    <div class="fileUpload" rel="/portfolio/upload">
                        <span>Upload</span>
                        <input type="file" class="upload" data-type="image" />
                    </div>
                    <span class="maxsize">(max size: 10MB*)</span>
                    <div style="clear:both"></div>
                </div>
                <p class="rs description-input"></p>
            </div>
        </div>

        <p class="wrap-btn-submit rs ta-l" style="padding-top:0px;">
			<button class="btn btn-blue btn-submit-all">Save Pictures</button>
		</p>

        <h3>Preview of your Portfolio Gallery</h3>
        <?php
        foreach ($portfolio_entries as $entry) {
            echo "<div style='width:160px; height:130px; margin:0 22px 10px 0; text-align:center; display:inline-block; float:left;'><a href='/{$entry['image']}' class='loginpop' rel='group'><img src='/{$entry['image']}' style='margin:5px 0; margin-right:8px; width:160px' /></a><a href='?portfolioDeleteFile={$entry['upload_id']}'>delete</a></div>";
        }
        ?>
		<div class="clear"></div>
    </form>
	
	<style type="text/css">
	.fancybox-overlay {
		/*z-index: 8010;*/
		z-index: 999999999999999;
	}
	.fancybox-wrap, .fancybox-opened { overflow-y: hidden !important; }
	.fancybox-close {
		position: absolute;
		top: -18px;
		right: 0px;
		width: 36px;
		height: 36px;
		cursor: pointer;
		z-index: 8040;
	}
	 .fancybox-next span {
	  left: auto;
	  right: 20px;
	 }
	 .fancybox-prev span {
	  left: 20px;
	 }
	</style>
	
	<br /><br /><br />
</div>