{*
 * 2007-2012 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 *         DISCLAIMER   * 
 * *************************************** *
 * Do not edit or add to this file if you wish to upgrade Prestashop to newer
 * versions in the future.
 * ****************************************************
 * @category   Belvg
 * @package    Belvg_Background
 * @author    Alexander Simonchik <support@belvg.com>
 * @site    http://module-presta.com
 * @copyright  Copyright (c) 2010 - 2012 BelVG LLC. (http://www.belvg.com)
 * @license    http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
*}


<!--MODULE BelVG_BackgroundPages-->
{literal}
<script type="text/javascript">
	var specific_img = '{/literal}{$belvg_bg_settings.specific_img}{literal}'
	var default_pattern = '{/literal}{$belvg_bg_settings.preselected_pattern}{literal}'
	var page_name = '{/literal}{$page_name}{literal}'
	var content_only = '{/literal}{$content_only}{literal}'
</script>
{/literal}

{if !$content_only && !$belvg_bg_settings.specific_img && $belvg_bg_settings.allow_colorchanger}
    <div class="bg_controller" {if $page_name != "index"}style="left:-182px"{/if}>	
        <span class="bg_heading">{l s='Theme settings' mod='belvg_backgroundpages'}</span>
        <div id="switch" {if $page_name == "index"}class="opened"{else}class="closed"{/if}></div>
        <div class="bg_inner_container">
            <span class="title_underline"></span>
            <div class="bg_block">
                <label for="bg-label" class="bg-label">{l s='Patterns' mod='belvg_backgroundpages'}</label>
                <div class="section">
                    <div id="scrollbar1">
                        <div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
                        <div class="sect viewport" id="patterns">
                            <div class="overview">
                                <div id="del_bg" class="non-var{if $belvg_bg_settings.empty_bg} active {/if}">
                                </div>
                                {foreach from=$belvg_bg_settings.patterns_collection key=key item=value name=patt_collection}
                                    <div id="back_{$smarty.foreach.patt_collection.index}" class="var{if $value.url == $belvg_bg_settings.active_bg} active{/if} {if ($smarty.foreach.patt_collection.iteration+1)%3==0} last{/if}">
                                        <img src="{$value.url}" style="width:30px;height:30px;" />
                                    </div>
                                {/foreach}                    
                                <div class="clearfix"></div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <div class="clearfix">
                <button id="reset_cookie" type="button" title="{l s='Reset custom styles' mod='belvg_backgroundpages'}">{l s='Reset' mod='belvg_backgroundpages'}</button>
            </div>
        </div>
    </div>
{/if}