{strip}
{* Display current path *}
<div class="path">
{if $path|@count > 1}
	{assign var="current_path" value=""}
	{foreach from=$path item=cat name=path}
	   {assign var="current_path" value="`$current_path``$cat.TITLE_URL`/"}
	   {if !$smarty.foreach.path.first} {l}&raquo;{/l} {/if}
	   {if !$smarty.foreach.path.last}
	      <a href="{if $smarty.const.ENABLE_REWRITE}{$current_path}{else}index.php?c={$cat.ID}{/if}" {if $smarty.foreach.path.first}style="font-weight: bold;"{/if}>{$cat.TITLE|escape|trim}</a>
	   {else}
	      {$cat.TITLE|escape|trim}
	   {/if}
	{/foreach}
{/if}
</div>


<div class="center1">

	{*include file="left_side.tpl"*}
<div id="fullMainContainer">
	<div class="centerContainer">
		<div class="centerMiddleContainer">
		<ul id="main_container" style="list-style-type: none; padding: 0px; margin: 0;">
		<li>
		
		{if !$uid & !$search & empty($category.ID) & !$list & $scriptname == "index"}
		{foreach from=$widgets.MAIN_ON_HOMEPAGE.TOP item=v}
			{if $v.SETTINGS.DISPLAY_IN_BOX eq 'Yes'}
			{include file="widget_central_top.tpl" TITLE=$v.SETTINGS.TITLE}
			{/if}
			{$v.CONTENT}
			{if $v.SETTINGS.DISPLAY_IN_BOX eq 'Yes'}
			{include file="widget_central_bot.tpl"}
			{/if}
		{/foreach}
		{else}
		{foreach from=$widgets.MAIN_NOT_ON_HOMEPAGE.TOP item=v}
			{if $v.SETTINGS.DISPLAY_IN_BOX eq 'Yes'}
			{include file="widget_vertical_top.tpl"}
			{/if}
			{$v.CONTENT}
			{if $v.SETTINGS.DISPLAY_IN_BOX eq 'Yes'}
			{include file="widget_vertical_bot.tpl"}
			{/if}
		{/foreach}
		{/if}
		</li>
 </ul>
{/strip}

{if $uLevel eq 1}
 {literal}
 <style type="text/css">
     .placeholder {
         border: 1px solid #FCEFA1;
         background: #FDFADF; 
         color: #363636;
         width: 187px;
         height: 60px;
         margin: 14px;
     }
     
     .placeholder_central {
         border: 1px solid #FCEFA1;
         background: #FDFADF; 
         color: #363636;
         width: 496px;
         height: 60px;
         margin: 16px;
     }
 </style>
 
 <script type="text/javascript">
 
 jQuery(function($) {
 
         $("#sortable_left").sortable({
             placeholder: "placeholder",
             connectWith: "#sortable_right",
             opacity: 0.6,
             cursor: "move",
             stop: function() {
                 var left_hash = '';
                 var right_hash = '';
                 $('#sortable_left li').each(function(i){
                     if ($(this).attr('id'))
                     left_hash += $(this).attr('id') + ',';
                 });
                 $('#sortable_right li').each(function(i){
                     if ($(this).attr('id'))
                     right_hash += $(this).attr('id') + ',';
                 });
                 $.ajax({
                     url: "{/literal}{$smarty.const.DOC_ROOT}{literal}/admin/frontend_edit_widget.php",
                     cache: false,
                     data: {
                         action: "ORDER",
                         left_hash: left_hash,
                         right_hash: right_hash,
                         zone: "left"
                     },
                 });
             }
         });
         
         $("#sortable_right").sortable({
             placeholder: "placeholder",
             connectWith: "#sortable_left",
             opacity: 0.6,
             cursor: "move",
             stop: function() {
                 var left_hash = '';
                 var right_hash = '';
                 $('#sortable_left li').each(function(i){
                     if ($(this).attr('id'))
                     left_hash += $(this).attr('id') + ',';
                 });
                 $('#sortable_right li').each(function(i){
                     if ($(this).attr('id'))
                     right_hash += $(this).attr('id') + ',';
                 });
                 $.ajax({
                     url: "{/literal}{$smarty.const.DOC_ROOT}{literal}/admin/frontend_edit_widget.php",
                     cache: false,
                     data: {
                         action: "ORDER",
                         left_hash: left_hash,
                         right_hash: right_hash,
                         zone: "left"
                     },
                 });
             }
         });
         
         $("#sortable_central").sortable({
             placeholder: "placeholder_central",
             connectWith: "#main_container",
             opacity: 0.6,
             cursor: "move",
             stop: function() {
                 var central_hash = '';
                 $('#sortable_central li').each(function(i){
                     if ($(this).attr('id'))
                     central_hash += $(this).attr('id') + ',';
                 });
                 $.ajax({
                     url: "{/literal}{$smarty.const.DOC_ROOT}{literal}/admin/frontend_edit_widget.php",
                     cache: false,
                     data: {
                         action: "ORDER",
                         central_hash: central_hash
                     },
                 });
             }
         }); 
 
 });
 
 </script>
 {/literal}
 
 {/if}