<div class="wrapper1">
    <div class="wrapper2">
        <div class="nav-wrapper">
            <div class="nav-left"></div>
            <div class="nav">
				<ul id="navigation">
					<{foreach item=main from=$block}>
					        <{if $main.level == 0}>
							<li<{if $main.selected}> class="active"<{/if}><{if $main.css}> style="<{$main.css}>"<{/if}>>
                                <a href="<{$main.link}>" target="<{$main.target}>" alt="<{$main.alt_title}>" title="<{$main.alt_title}>">
									<span class="menu-left"></span>
									<span class="menu-mid">
									<{if $main.image}><img src="<{$main.image}>" /><{/if}>
                                    <{$main.title}>
                                    </span>
									<span class="menu-right"></span>
								</a>
													
								<{if $main.hassub}>
									<div class="sub">
										<ul>
											<{foreach item=sub from=$block}>
											<{if $sub.pid == $main.id}>
												<li>
                                                    <a href="<{$sub.link}>" target="<{$sub.target}>" alt="<{$sub.alt_title}>" title="<{$sub.alt_title}>" <{if $sub.css}> style="<{$sub.css}>"<{/if}>>
                                                     <{if $sub.image}><img src="<{$sub.image}>" /><{/if}>
                                                    <{$sub.title}>
                                                    </a>
                                                </li>
                                            <{/if}>
											<{/foreach}>
										</ul>
									<div class="btm-bg"></div>
									</div>	
									
								<{/if}>
							</li>
							<{/if}>
					<{/foreach}>
				</ul>
			</div>
			<div class="nav-right"></div>
		</div>
	</div>
</div>