function content_55db8bdb79d546_98717403($_smarty_tpl)
    {
        if (!is_callable('smarty_block_scripts')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.scripts.php';
        }
        if (!is_callable('smarty_function_script')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.script.php';
        }
        if (!is_callable('smarty_block_inline_script')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        fn_preload_lang_vars(array('cannot_buy', 'no_products_selected', 'error_no_items_selected', 'delete_confirmation', 'text_out_of_stock', 'items', 'text_required_group_product', 'save', 'close', 'loading', 'notice', 'warning', 'error', 'text_are_you_sure_to_proceed', 'text_invalid_url', 'error_validator_email', 'error_validator_phone', 'error_validator_integer', 'error_validator_multiple', 'error_validator_password', 'error_validator_required', 'error_validator_zipcode', 'error_validator_message', 'error_validator_color', 'text_page_loading', 'error_ajax', 'text_changes_not_saved', 'text_data_changed', 'text_block_trial_notice', 'text_expired_license', 'file_browser', 'editing_block', 'editing_grid', 'editing_container', 'adding_grid', 'adding_block_to_grid', 'manage_blocks', 'editing_block', 'add_block', 'text_position_updating', 'more', 'browse', 'enter_new_lang_code', 'no_image'));
        $_smarty_tpl->smarty->_tag_stack[] = array('scripts', array());
        $_block_repeat = true;
        echo smarty_block_scripts(array(), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>


<?php 
            echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js"), $_smarty_tpl);
            ?>

<?php 
            echo smarty_function_script(array('src' => "js/tygh/core.js"), $_smarty_tpl);
            ?>

<?php 
            echo smarty_function_script(array('src' => "js/tygh/history.js"), $_smarty_tpl);
            ?>


<?php 
            echo smarty_function_script(array('src' => "js/lib/twitterbootstrap/bootstrap.min.js"), $_smarty_tpl);
            ?>

<?php 
            echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js"), $_smarty_tpl);
            ?>

<?php 
            echo smarty_function_script(array('src' => "js/lib/autonumeric/autoNumeric.js"), $_smarty_tpl);
            ?>

<?php 
            echo smarty_function_script(array('src' => "js/lib/appear/jquery.appear-1.1.1.js"), $_smarty_tpl);
            ?>

<?php 
            echo smarty_function_script(array('src' => "js/lib/tools/tooltip.min.js"), $_smarty_tpl);
            ?>


<?php 
            echo smarty_function_script(array('src' => "js/tygh/editors/" . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'] . ".editor.js"), $_smarty_tpl);
            ?>


<?php 
            echo smarty_function_script(array('src' => "js/tygh/ajax.js"), $_smarty_tpl);
            ?>


<?php 
            echo smarty_function_script(array('src' => "js/tygh/quick_menu.js"), $_smarty_tpl);
            ?>


<?php 
            if ($_smarty_tpl->tpl_vars['settings']->value['General']['feedback_type'] == "auto") {
                ?>
    <?php 
                echo $_smarty_tpl->getSubTemplate("common/analytics.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("promo_data", null, null);
            ob_start();
            ?>
    <div class="commercial-promotion-text">
        <p><?php 
            echo $_smarty_tpl->tpl_vars['addon_permissions_text']->value['text'];
            ?>
</p>
    <div>
<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
            $_block_repeat = true;
            echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                echo '<script';
                ?>
 type="text/javascript">
(function(_, $) {
    _.tr({
        cannot_buy: '<?php 
                echo strtr($_smarty_tpl->__("cannot_buy"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        no_products_selected: '<?php 
                echo strtr($_smarty_tpl->__("no_products_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_no_items_selected: '<?php 
                echo strtr($_smarty_tpl->__("error_no_items_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        delete_confirmation: '<?php 
                echo strtr($_smarty_tpl->__("delete_confirmation"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_out_of_stock: '<?php 
                echo strtr($_smarty_tpl->__("text_out_of_stock"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        items: '<?php 
                echo strtr($_smarty_tpl->__("items"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_required_group_product: '<?php 
                echo strtr($_smarty_tpl->__("text_required_group_product"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        save: '<?php 
                echo strtr($_smarty_tpl->__("save"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        close: '<?php 
                echo strtr($_smarty_tpl->__("close"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        loading: '<?php 
                echo strtr($_smarty_tpl->__("loading"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        notice: '<?php 
                echo strtr($_smarty_tpl->__("notice"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        warning: '<?php 
                echo strtr($_smarty_tpl->__("warning"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error: '<?php 
                echo strtr($_smarty_tpl->__("error"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_are_you_sure_to_proceed: '<?php 
                echo strtr($_smarty_tpl->__("text_are_you_sure_to_proceed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_invalid_url: '<?php 
                echo strtr($_smarty_tpl->__("text_invalid_url"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_email: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_email"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_phone: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_phone"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_integer: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_integer"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_multiple: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_multiple"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_password: '******'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_required: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_required"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_zipcode: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_zipcode"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_message: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_message"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_color: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_color"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_page_loading: '<?php 
                echo strtr($_smarty_tpl->__("text_page_loading"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_ajax: '<?php 
                echo strtr($_smarty_tpl->__("error_ajax"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_changes_not_saved: '<?php 
                echo strtr($_smarty_tpl->__("text_changes_not_saved"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_data_changed: '<?php 
                echo strtr($_smarty_tpl->__("text_data_changed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        trial_notice: '<?php 
                echo strtr($_smarty_tpl->__("text_block_trial_notice", array("[href]" => $_smarty_tpl->tpl_vars['config']->value['resources']['license_url'])), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        expired_license: '<?php 
                echo strtr($_smarty_tpl->__("text_expired_license", array("[product]" => @constant('PRODUCT_NAME'))), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        file_browser: '<?php 
                echo strtr($_smarty_tpl->__("file_browser"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        editing_block: '<?php 
                echo strtr($_smarty_tpl->__("editing_block"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        editing_grid: '<?php 
                echo strtr($_smarty_tpl->__("editing_grid"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        editing_container: '<?php 
                echo strtr($_smarty_tpl->__("editing_container"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        adding_grid: '<?php 
                echo strtr($_smarty_tpl->__("adding_grid"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        adding_block_to_grid: '<?php 
                echo strtr($_smarty_tpl->__("adding_block_to_grid"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        manage_blocks: '<?php 
                echo strtr($_smarty_tpl->__("manage_blocks"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        editing_block: '<?php 
                echo strtr($_smarty_tpl->__("editing_block"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        add_block: '<?php 
                echo strtr($_smarty_tpl->__("add_block"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_position_updating: '<?php 
                echo strtr($_smarty_tpl->__("text_position_updating"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        more: '<?php 
                echo strtr($_smarty_tpl->__("more"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        browse: '<?php 
                echo strtr($_smarty_tpl->__("browse"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        enter_new_lang_code: '<?php 
                echo strtr($_smarty_tpl->__("enter_new_lang_code"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        no_image: '<?php 
                echo strtr($_smarty_tpl->__("no_image"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
    });

    $.extend(_, {
        index_script: '<?php 
                if ($_smarty_tpl->tpl_vars['user_info']->value['user_type'] == 'V') {
                    echo strtr($_smarty_tpl->tpl_vars['config']->value['vendor_index'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                } else {
                    echo strtr($_smarty_tpl->tpl_vars['config']->value['admin_index'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                }
                ?>
',
        changes_warning: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['Appearance']['changes_warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        currencies: {
            'primary': {
                'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
            },
            'secondary': {
                'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'coefficient': '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['coefficient'], ENT_QUOTES, 'UTF-8');
                ?>
'
            }
        },
        default_editor: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'], ENT_QUOTES, 'UTF-8');
                ?>
',
        default_previewer: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_image_previewer'], ENT_QUOTES, 'UTF-8');
                ?>
',
        current_path: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_path'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        current_location: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_location'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        images_dir: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                ?>
',
        notice_displaying_time: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time'], ENT_QUOTES, 'UTF-8');
                } else {
                    ?>
0<?php 
                }
                ?>
,
        cart_language: '<?php 
                echo htmlspecialchars(@constant('CART_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
        default_language: '<?php 
                echo htmlspecialchars(@constant('DEFAULT_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
        cart_prices_w_taxes: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['cart_prices_w_taxes'] == 'Y') {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
        theme_name: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['theme_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        current_url: '<?php 
                echo strtr(fn_url($_smarty_tpl->tpl_vars['config']->value['current_url']), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        <?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['anti_csrf']) {
                    ?>
        security_hash: '<?php 
                    echo htmlspecialchars(fn_generate_security_hash(''), ENT_QUOTES, 'UTF-8');
                    ?>
', // CSRF form protection key
        <?php 
                }
                ?>
        promo_data: {
            title: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['addon_permissions_text']->value['title'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text: '<?php 
                echo strtr(Smarty::$_smarty_vars['capture']['promo_data'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
        }
    });

    $(document).ready(function(){
        $.runCart('A');
    });
}(Tygh, Tygh.$));
<?php 
                echo '</script';
                ?>
><?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>


<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:scripts"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "index:scripts"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "index:scripts"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>



<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_scripts(array(), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

<?php 
    }
 /**
  * Output filter: adds unique field to all forms to protect from CSRF attacks
  * @param  string                    $content  template content
  * @param  \Smarty_Internal_Template $template template instance
  * @return string                    template content
  */
 public static function outputSecurityHash($content, \Smarty_Internal_Template $template)
 {
     $content = preg_replace('/<input type="hidden" name="security_hash".*?>/i', '', $content);
     $content = str_replace('</form>', '<input type="hidden" name="security_hash" class="cm-no-hide-input" value="' . fn_generate_security_hash() . '" /></form>', $content);
     return $content;
 }
Exemple #3
0
/**
 * Prepare all settings, wich should be passed to js
 */
function fn_twg_get_all_settings()
{
    $settings = fn_twg_get_boot_settings();
    $addon_settings = TwigmoSettings::get();
    $settings['access_id'] = $addon_settings['access_id'];
    $settings['currency'] = Registry::get('currencies.' . CART_SECONDARY_CURRENCY);
    $settings['primaryCurrency'] = Registry::get('currencies.' . CART_PRIMARY_CURRENCY);
    $settings['url_for_facebook'] = isset($addon_settings['url_for_facebook']) ? fn_twg_get_external_info_url($addon_settings['url_for_facebook']) : '';
    $settings['url_for_twitter'] = isset($addon_settings['url_for_twitter']) ? fn_twg_get_external_info_url($addon_settings['url_for_twitter']) : '';
    $settings['lang'] = array_merge(fn_twg_get_default_customer_langvars(), Lang::getCustomerLangVars());
    // Countries/states
    list($countries) = fn_get_countries(array('only_avail' => true));
    $settings = array_merge($settings, Api::getAsList('countries', $countries));
    $settings['states'] = fn_twg_get_states();
    // Info pages
    $pages_location = $addon_settings['home_page_content'] == 'tw_home_page_blocks' ? 'twigmo.post' : 'index.index';
    $pages = TwigmoBlock::getBlocksForLocation($pages_location, array('pages'));
    $settings['info_pages'] = array();
    foreach ($pages as $page) {
        $settings['info_pages'] = array_merge($settings['info_pages'], $page['pages']['page']);
    }
    // If page link begin with # then interpret this link as twigmo page
    foreach ($settings['info_pages'] as $k => $page) {
        if (preg_match('/^\\#.*$/', $page['link'])) {
            $settings['info_pages'][$k]['twigmo_page'] = substr($page['link'], 1);
        }
    }
    // Only required profile fields
    $only_required = isset($addon_settings['only_req_profile_fields']) ? $addon_settings['only_req_profile_fields'] : 'N';
    $settings['profileFields'] = fn_twg_prepare_profile_fields(fn_get_profile_fields(), $only_required);
    $settings['profileFieldsCheckout'] = fn_twg_prepare_profile_fields(fn_get_profile_fields('O'), $only_required);
    $settings['show_product_code'] = isset($addon_settings['show_product_code']) ? $addon_settings['show_product_code'] : 'N';
    $settings['titles'] = array();
    $settings['profile'] = fn_twg_get_user_info($_SESSION['auth']['user_id']);
    $settings['cart'] = fn_twg_api_get_session_cart($_SESSION['cart']);
    $settings['sortings'] = fn_twg_get_sortings();
    $settings['security_hash'] = fn_generate_security_hash();
    $settings['productType'] = PRODUCT_EDITION;
    $settings['languages'] = array_values(Lang::getLanguages());
    $settings['cart_language'] = CART_LANGUAGE;
    $settings['cart_prices_w_taxes'] = Registry::get('settings.Appearance.cart_prices_w_taxes');
    $settings['show_prices_taxed_clean'] = Registry::get('settings.Appearance.show_prices_taxed_clean');
    $settings['no_image_path'] = Registry::get('config.no_image_path');
    // Suppliers
    $settings['suppliers_vendor'] = Registry::get('settings.Suppliers.apply_for_vendor');
    $settings['display_supplier'] = Registry::get('settings.Suppliers.display_supplier') === 'Y' || Registry::get('settings.Vendors.display_vendor') === 'Y';
    $settings['display_supplier'] = $settings['display_supplier'] ? 'Y' : 'N';
    // General section
    $fields = array('use_email_as_login', 'min_order_amount', 'min_order_amount_type', 'allow_negative_amount', 'inventory_tracking', 'allow_anonymous_shopping', 'tax_calculation');
    foreach ($fields as $field) {
        $settings[$field] = Registry::get('settings.General.' . $field);
    }
    $settings = array_merge($settings, fn_twg_get_checkout_settings());
    if (version_compare(PRODUCT_VERSION, '4.0.2', '>=')) {
        $anonymous_shopping_settings_map = array('allow_shopping' => 'Y', 'hide_price_and_add_to_cart' => 'P', 'hide_add_to_cart' => 'B');
        $settings['allow_anonymous_shopping'] = $anonymous_shopping_settings_map[$settings['allow_anonymous_shopping']];
    }
    $settings['default_location'] = array('country' => Registry::get('settings.General.default_country'), 'state' => Registry::get('settings.General.default_state'));
    $settings['show_modifiers'] = Registry::get('settings.General.display_options_modifiers');
    $settings['SEOEnabled'] = Registry::get('addons.seo.status') == 'A';
    $settings['GATrackEcommerce'] = Registry::get('addons.google_analytics.status') == 'A' && Registry::get('addons.google_analytics.track_ecommerce') == 'Y' && file_exists(Registry::get('config.dir.addons') . 'google_analytics/controllers/frontend/checkout.post.php');
    if (fn_allowed_for('MULTIVENDOR')) {
        $settings['company_data'] = !empty($_SESSION['auth']['company_id']) ? fn_get_company_data($_SESSION['auth']['company_id']) : array();
    } else {
        $settings['company_data'] = array();
    }
    $settings['checkout'] = Registry::get('settings.Checkout');
    fn_set_hook('twg_get_all_settings', $settings);
    $settings['lang'] = fn_twg_process_langvars($settings['lang']);
    return $settings;
}
            Registry::get('view')->display('views/orders/components/placing_order.tpl');
            fn_flush();
        }
    } elseif ($mode == 'cancel') {
        $pp_response['order_status'] = 'N';
        $pp_response['reason_text'] = __('text_transaction_cancelled');
        fn_finish_payment($order_id, $pp_response, false);
        fn_order_placement_routines('route', $order_id);
    } elseif ($mode == 'finish') {
        fn_order_placement_routines('route', $order_id);
    }
    exit;
} else {
    $paypal_total = fn_format_price($order_info['total']);
    $cancel_url = fn_url("payment_notification.cancel?payment=paypal_advanced&order_id={$order_id}");
    $post_data = array('VENDOR' => $processor_data['processor_params']['merchant_login'], 'PARTNER' => $processor_data['processor_params']['api_partner'], 'USER' => $processor_data['processor_params']['api_user'], 'PWD' => $processor_data['processor_params']['api_password'], 'TRXTYPE' => 'S', 'AMT' => $paypal_total, 'TENDER' => 'C', 'CREATESECURETOKEN' => 'Y', 'SECURETOKENID' => uniqid(rand()), 'DISABLERECEIPT' => 'TRUE', 'RETURNURL' => fn_url("payment_notification.return?payment=paypal_advanced&order_id={$order_id}&security_hash=" . fn_generate_security_hash()), 'CANCELURL' => $cancel_url, 'ERRORURL' => fn_url("payment_notification.return?payment=paypal_advanced&order_id={$order_id}&security_hash=" . fn_generate_security_hash()), 'URLMETHOD' => 'POST', 'TEMPLATE' => $processor_data['processor_params']['layout'], 'PAGECOLLAPSEBGCOLOR' => $processor_data['processor_params']['collapse_bg_color'], 'PAGECOLLAPSETEXTCOLOR' => $processor_data['processor_params']['collapse_text_color'], 'PAGEBUTTONBGCOLOR' => $processor_data['processor_params']['button_bgcolor'], 'PAGEBUTTONTEXTCOLOR' => $processor_data['processor_params']['button_text_color'], 'BUTTONTEXT' => $processor_data['processor_params']['label_text_color'], 'PAYFLOWCOLOR' => $processor_data['processor_params']['payflowcolor'], 'HDRIMG' => $processor_data['processor_params']['header_image'], 'BILLTOFIRSTNAME' => $order_info['b_firstname'], 'BILLTOLASTNAME' => $order_info['b_lastname'], 'BILLTOSTREET' => $order_info['b_address'], 'BILLTOCITY' => $order_info['b_city'], 'BILLTOSTATE' => fn_pp_get_state($order_info, 'b_'), 'BILLTOZIP' => $order_info['b_zipcode'], 'BILLTOCOUNTRY' => $order_info['b_country'], 'SHIPTOFIRSTNAME' => $order_info['s_firstname'], 'SHIPTOLASTNAME' => $order_info['s_firstname'], 'SHIPTOSTREET' => $order_info['s_address'], 'SHIPTOCITY' => $order_info['s_city'], 'SHIPTOSTATE' => fn_pp_get_state($order_info, 's_'), 'SHIPTOZIP' => $order_info['s_zipcode'], 'SHIPTOCOUNTRY' => $order_info['s_country'], 'EMAIL' => $order_info['email'], 'PHONENUM' => $order_info['phone']);
    $result = fn_pp_request($post_data, $processor_data['processor_params']['testmode']);
    if ($result['RESULT'] == '0') {
        $query_data = array('SECURETOKEN' => $result['SECURETOKEN'], 'SECURETOKENID' => $result['SECURETOKENID'], 'MODE' => $processor_data['processor_params']['testmode'] == 'Y' ? 'TEST' : '');
        $iframe_url = 'https://payflowlink.paypal.com/?' . http_build_query($query_data);
        Registry::get('view')->assign('iframe_url', $iframe_url);
        Registry::get('view')->assign('cancel_url', $cancel_url);
        Registry::get('view')->display('views/checkout/processors/paypal_advanced.tpl');
        exit;
    } else {
        $pp_response['order_status'] = 'F';
        $pp_response["reason_text"] = 'RESULT:' . $result['RESULT'] . '; RESPMSG:' . $result['RESPMSG'];
    }
}
function fn_pp_get_state($order_info, $prefix = 's_')
{
    function content_55dc75a3ba9668_24276331($_smarty_tpl)
    {
        if (!is_callable('smarty_function_script')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.script.php';
        }
        if (!is_callable('smarty_block_scripts')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.scripts.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('cannot_buy', 'no_products_selected', 'error_no_items_selected', 'delete_confirmation', 'text_out_of_stock', 'items', 'text_required_group_product', 'save', 'close', 'notice', 'warning', 'error', 'empty', 'text_are_you_sure_to_proceed', 'text_invalid_url', 'error_validator_email', 'error_validator_phone', 'error_validator_integer', 'error_validator_multiple', 'error_validator_password', 'error_validator_required', 'error_validator_zipcode', 'error_validator_message', 'text_page_loading', 'error_ajax', 'text_changes_not_saved', 'text_data_changed', 'placing_order', 'file_browser', 'browse', 'more', 'text_no_products_found', 'cannot_buy', 'no_products_selected', 'error_no_items_selected', 'delete_confirmation', 'text_out_of_stock', 'items', 'text_required_group_product', 'save', 'close', 'notice', 'warning', 'error', 'empty', 'text_are_you_sure_to_proceed', 'text_invalid_url', 'error_validator_email', 'error_validator_phone', 'error_validator_integer', 'error_validator_multiple', 'error_validator_password', 'error_validator_required', 'error_validator_zipcode', 'error_validator_message', 'text_page_loading', 'error_ajax', 'text_changes_not_saved', 'text_data_changed', 'placing_order', 'file_browser', 'browse', 'more', 'text_no_products_found'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['dev_js']) {
                echo '<script';
                ?>
 src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" data-no-defer><?php 
                echo '</script';
                ?>
>
<?php 
                echo '<script';
                ?>
 data-no-defer>
    if (!window.jQuery) {
        document.write('<?php 
                echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js", 'no-defer' => true, 'escape' => true), $_smarty_tpl);
                ?>
');
    }
<?php 
                echo '</script';
                ?>
>

<?php 
                echo '<script';
                ?>
 src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js" data-no-defer><?php 
                echo '</script';
                ?>
>
<?php 
                echo '<script';
                ?>
 data-no-defer>
    if (!window.jQuery.ui) {
        document.write('<?php 
                echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js", 'no-defer' => true, 'escape' => true), $_smarty_tpl);
                ?>
');
    }
<?php 
                echo '</script';
                ?>
>
<?php 
            }
            ?>

<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('scripts', array());
            $_block_repeat = true;
            echo smarty_block_scripts(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>


    <?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['dev_js']) {
                    ?>
    <?php 
                    echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js"), $_smarty_tpl);
                    ?>

    <?php 
                    echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js"), $_smarty_tpl);
                    ?>

    <?php 
                }
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/tygh/core.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/tygh/ajax.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/tygh/history.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/lib/autonumeric/autoNumeric.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/lib/appear/jquery.appear-1.1.1.js"), $_smarty_tpl);
                ?>


<?php 
                if (!$_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['live_editor']) {
                    ?>
    <?php 
                    echo smarty_function_script(array('src' => "js/lib/tools/tooltip.min.js"), $_smarty_tpl);
                    ?>

<?php 
                }
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/tygh/editors/" . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'] . ".editor.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/tygh/responsive.js"), $_smarty_tpl);
                ?>


<?php 
                if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['live_editor']) {
                    ?>
    <?php 
                    echo smarty_function_script(array('src' => "js/lib/autosize/jquery.autosize.js"), $_smarty_tpl);
                    ?>

    <?php 
                    echo smarty_function_script(array('src' => "js/tygh/live_editor_mode.js"), $_smarty_tpl);
                    ?>

<?php 
                }
                ?>

<?php 
                echo '<script';
                ?>
 type="text/javascript">
(function(_, $) {

    _.tr({
        cannot_buy: '<?php 
                echo strtr($_smarty_tpl->__("cannot_buy"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        no_products_selected: '<?php 
                echo strtr($_smarty_tpl->__("no_products_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_no_items_selected: '<?php 
                echo strtr($_smarty_tpl->__("error_no_items_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        delete_confirmation: '<?php 
                echo strtr($_smarty_tpl->__("delete_confirmation"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_out_of_stock: '<?php 
                echo strtr($_smarty_tpl->__("text_out_of_stock"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        items: '<?php 
                echo strtr($_smarty_tpl->__("items"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_required_group_product: '<?php 
                echo strtr($_smarty_tpl->__("text_required_group_product"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        save: '<?php 
                echo strtr($_smarty_tpl->__("save"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        close: '<?php 
                echo strtr($_smarty_tpl->__("close"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        notice: '<?php 
                echo strtr($_smarty_tpl->__("notice"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        warning: '<?php 
                echo strtr($_smarty_tpl->__("warning"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error: '<?php 
                echo strtr($_smarty_tpl->__("error"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        empty: '<?php 
                echo strtr($_smarty_tpl->__("empty"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_are_you_sure_to_proceed: '<?php 
                echo strtr($_smarty_tpl->__("text_are_you_sure_to_proceed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_invalid_url: '<?php 
                echo strtr($_smarty_tpl->__("text_invalid_url"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_email: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_email"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_phone: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_phone"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_integer: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_integer"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_multiple: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_multiple"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_password: '******'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_required: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_required"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_zipcode: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_zipcode"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_message: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_message"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_page_loading: '<?php 
                echo strtr($_smarty_tpl->__("text_page_loading"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_ajax: '<?php 
                echo strtr($_smarty_tpl->__("error_ajax"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_changes_not_saved: '<?php 
                echo strtr($_smarty_tpl->__("text_changes_not_saved"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_data_changed: '<?php 
                echo strtr($_smarty_tpl->__("text_data_changed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        placing_order: '<?php 
                echo strtr($_smarty_tpl->__("placing_order"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        file_browser: '<?php 
                echo strtr($_smarty_tpl->__("file_browser"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        browse: '<?php 
                echo strtr($_smarty_tpl->__("browse"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        more: '<?php 
                echo strtr($_smarty_tpl->__("more"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_no_products_found: '<?php 
                echo strtr($_smarty_tpl->__("text_no_products_found"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
    });

    $.extend(_, {
        index_script: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['customer_index'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        changes_warning: /*'<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['Appearance']['changes_warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'*/'N',
        currencies: {
            'primary': {
                'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
            },
            'secondary': {
                'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'coefficient': '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['coefficient'], ENT_QUOTES, 'UTF-8');
                ?>
'
            }
        },
        default_editor: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'], ENT_QUOTES, 'UTF-8');
                ?>
',
        default_previewer: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_image_previewer'], ENT_QUOTES, 'UTF-8');
                ?>
',
        current_path: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_path'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        current_location: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_location'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        images_dir: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                ?>
',
        notice_displaying_time: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time'], ENT_QUOTES, 'UTF-8');
                } else {
                    ?>
0<?php 
                }
                ?>
,
        cart_language: '<?php 
                echo htmlspecialchars(@constant('CART_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
        default_language: '<?php 
                echo htmlspecialchars(@constant('DEFAULT_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
        cart_prices_w_taxes: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['cart_prices_w_taxes'] == 'Y') {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
        theme_name: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['theme_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        regexp: [],
        current_url: '<?php 
                echo strtr(fn_url($_smarty_tpl->tpl_vars['config']->value['current_url']), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        current_host: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_host'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        init_context: '<?php 
                echo strtr($_REQUEST['init_context'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
    });

    <?php 
                if ($_smarty_tpl->tpl_vars['live_editor_objects']->value) {
                    ?>
        $.extend(_, {
            live_editor_mode: true,
            live_editor_objects: <?php 
                    echo json_encode($_smarty_tpl->tpl_vars['live_editor_objects']->value);
                    ?>

        });
    <?php 
                }
                ?>

    <?php 
                if (!$_REQUEST['init_context']) {
                    ?>

        $(document).ready(function(){
            $.runCart('C');
        });

    <?php 
                }
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['anti_csrf']) {
                    ?>
        // CSRF form protection key
        _.security_hash = '<?php 
                    echo htmlspecialchars(fn_generate_security_hash(''), ENT_QUOTES, 'UTF-8');
                    ?>
';
    <?php 
                }
                ?>

}(Tygh, Tygh.$));
<?php 
                echo '</script';
                ?>
>

<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:scripts"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "index:scripts"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "index:scripts"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>


<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_scripts(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if (trim(Smarty::$_smarty_vars['capture']['template_content'])) {
                if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") {
                    ?>
<span class="cm-template-box template-box" data-ca-te-template="common/scripts.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/scripts.tpl"), $_smarty_tpl);
                    ?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php 
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                    ?>
<!--[/tpl_id]--></span><?php 
                } else {
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                }
            }
        } else {
            if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['dev_js']) {
                echo '<script';
                ?>
 src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" data-no-defer><?php 
                echo '</script';
                ?>
>
<?php 
                echo '<script';
                ?>
 data-no-defer>
    if (!window.jQuery) {
        document.write('<?php 
                echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js", 'no-defer' => true, 'escape' => true), $_smarty_tpl);
                ?>
');
    }
<?php 
                echo '</script';
                ?>
>

<?php 
                echo '<script';
                ?>
 src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js" data-no-defer><?php 
                echo '</script';
                ?>
>
<?php 
                echo '<script';
                ?>
 data-no-defer>
    if (!window.jQuery.ui) {
        document.write('<?php 
                echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js", 'no-defer' => true, 'escape' => true), $_smarty_tpl);
                ?>
');
    }
<?php 
                echo '</script';
                ?>
>
<?php 
            }
            ?>

<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('scripts', array());
            $_block_repeat = true;
            echo smarty_block_scripts(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>


    <?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['dev_js']) {
                    ?>
    <?php 
                    echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js"), $_smarty_tpl);
                    ?>

    <?php 
                    echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js"), $_smarty_tpl);
                    ?>

    <?php 
                }
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/tygh/core.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/tygh/ajax.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/tygh/history.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/lib/autonumeric/autoNumeric.js"), $_smarty_tpl);
                ?>

    <?php 
                echo smarty_function_script(array('src' => "js/lib/appear/jquery.appear-1.1.1.js"), $_smarty_tpl);
                ?>


<?php 
                if (!$_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['live_editor']) {
                    ?>
    <?php 
                    echo smarty_function_script(array('src' => "js/lib/tools/tooltip.min.js"), $_smarty_tpl);
                    ?>

<?php 
                }
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/tygh/editors/" . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'] . ".editor.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/tygh/responsive.js"), $_smarty_tpl);
                ?>


<?php 
                if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['live_editor']) {
                    ?>
    <?php 
                    echo smarty_function_script(array('src' => "js/lib/autosize/jquery.autosize.js"), $_smarty_tpl);
                    ?>

    <?php 
                    echo smarty_function_script(array('src' => "js/tygh/live_editor_mode.js"), $_smarty_tpl);
                    ?>

<?php 
                }
                ?>

<?php 
                echo '<script';
                ?>
 type="text/javascript">
(function(_, $) {

    _.tr({
        cannot_buy: '<?php 
                echo strtr($_smarty_tpl->__("cannot_buy"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        no_products_selected: '<?php 
                echo strtr($_smarty_tpl->__("no_products_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_no_items_selected: '<?php 
                echo strtr($_smarty_tpl->__("error_no_items_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        delete_confirmation: '<?php 
                echo strtr($_smarty_tpl->__("delete_confirmation"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_out_of_stock: '<?php 
                echo strtr($_smarty_tpl->__("text_out_of_stock"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        items: '<?php 
                echo strtr($_smarty_tpl->__("items"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_required_group_product: '<?php 
                echo strtr($_smarty_tpl->__("text_required_group_product"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        save: '<?php 
                echo strtr($_smarty_tpl->__("save"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        close: '<?php 
                echo strtr($_smarty_tpl->__("close"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        notice: '<?php 
                echo strtr($_smarty_tpl->__("notice"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        warning: '<?php 
                echo strtr($_smarty_tpl->__("warning"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error: '<?php 
                echo strtr($_smarty_tpl->__("error"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        empty: '<?php 
                echo strtr($_smarty_tpl->__("empty"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_are_you_sure_to_proceed: '<?php 
                echo strtr($_smarty_tpl->__("text_are_you_sure_to_proceed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_invalid_url: '<?php 
                echo strtr($_smarty_tpl->__("text_invalid_url"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_email: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_email"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_phone: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_phone"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_integer: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_integer"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_multiple: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_multiple"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_password: '******'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_required: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_required"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_zipcode: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_zipcode"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_validator_message: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_message"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_page_loading: '<?php 
                echo strtr($_smarty_tpl->__("text_page_loading"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        error_ajax: '<?php 
                echo strtr($_smarty_tpl->__("error_ajax"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_changes_not_saved: '<?php 
                echo strtr($_smarty_tpl->__("text_changes_not_saved"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_data_changed: '<?php 
                echo strtr($_smarty_tpl->__("text_data_changed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        placing_order: '<?php 
                echo strtr($_smarty_tpl->__("placing_order"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        file_browser: '<?php 
                echo strtr($_smarty_tpl->__("file_browser"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        browse: '<?php 
                echo strtr($_smarty_tpl->__("browse"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        more: '<?php 
                echo strtr($_smarty_tpl->__("more"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        text_no_products_found: '<?php 
                echo strtr($_smarty_tpl->__("text_no_products_found"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
    });

    $.extend(_, {
        index_script: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['customer_index'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        changes_warning: /*'<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['Appearance']['changes_warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'*/'N',
        currencies: {
            'primary': {
                'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
            },
            'secondary': {
                'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                'coefficient': '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['coefficient'], ENT_QUOTES, 'UTF-8');
                ?>
'
            }
        },
        default_editor: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'], ENT_QUOTES, 'UTF-8');
                ?>
',
        default_previewer: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_image_previewer'], ENT_QUOTES, 'UTF-8');
                ?>
',
        current_path: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_path'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        current_location: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_location'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        images_dir: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                ?>
',
        notice_displaying_time: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time'], ENT_QUOTES, 'UTF-8');
                } else {
                    ?>
0<?php 
                }
                ?>
,
        cart_language: '<?php 
                echo htmlspecialchars(@constant('CART_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
        default_language: '<?php 
                echo htmlspecialchars(@constant('DEFAULT_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
        cart_prices_w_taxes: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['cart_prices_w_taxes'] == 'Y') {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
        theme_name: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['theme_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        regexp: [],
        current_url: '<?php 
                echo strtr(fn_url($_smarty_tpl->tpl_vars['config']->value['current_url']), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        current_host: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_host'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
        init_context: '<?php 
                echo strtr($_REQUEST['init_context'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
    });

    <?php 
                if ($_smarty_tpl->tpl_vars['live_editor_objects']->value) {
                    ?>
        $.extend(_, {
            live_editor_mode: true,
            live_editor_objects: <?php 
                    echo json_encode($_smarty_tpl->tpl_vars['live_editor_objects']->value);
                    ?>

        });
    <?php 
                }
                ?>

    <?php 
                if (!$_REQUEST['init_context']) {
                    ?>

        $(document).ready(function(){
            $.runCart('C');
        });

    <?php 
                }
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['anti_csrf']) {
                    ?>
        // CSRF form protection key
        _.security_hash = '<?php 
                    echo htmlspecialchars(fn_generate_security_hash(''), ENT_QUOTES, 'UTF-8');
                    ?>
';
    <?php 
                }
                ?>

}(Tygh, Tygh.$));
<?php 
                echo '</script';
                ?>
>

<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:scripts"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "index:scripts"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "index:scripts"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>


<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_scripts(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
    }
    function content_55ccec9cba0e07_51030853($_smarty_tpl)
    {
        if (!is_callable('smarty_block_scripts')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.scripts.php';
        }
        if (!is_callable('smarty_function_script')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('cannot_buy', 'no_products_selected', 'error_no_items_selected', 'delete_confirmation', 'text_out_of_stock', 'items', 'text_required_group_product', 'save', 'close', 'notice', 'warning', 'error', 'text_are_you_sure_to_proceed', 'text_invalid_url', 'error_validator_email', 'error_validator_phone', 'error_validator_integer', 'error_validator_multiple', 'error_validator_password', 'error_validator_required', 'error_validator_zipcode', 'error_validator_message', 'text_page_loading', 'error_ajax', 'text_changes_not_saved', 'text_data_changed', 'more', 'cannot_buy', 'no_products_selected', 'error_no_items_selected', 'delete_confirmation', 'text_out_of_stock', 'items', 'text_required_group_product', 'save', 'close', 'notice', 'warning', 'error', 'text_are_you_sure_to_proceed', 'text_invalid_url', 'error_validator_email', 'error_validator_phone', 'error_validator_integer', 'error_validator_multiple', 'error_validator_password', 'error_validator_required', 'error_validator_zipcode', 'error_validator_message', 'text_page_loading', 'error_ajax', 'text_changes_not_saved', 'text_data_changed', 'more'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('scripts', array());
            $_block_repeat = true;
            echo smarty_block_scripts(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/tygh/core.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/tygh/ajax.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/tygh/history.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/autonumeric/autoNumeric.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/lib/malihu-custom-scrollbar-plugin-3.0.8/jquery.mCustomScrollbar.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/tools/tooltip.min.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/appear/jquery.appear-1.1.1.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/tygh/responsive.js"), $_smarty_tpl);
                ?>


<script type="text/javascript">
(function(_, $) {

        _.tr({
            cannot_buy: '<?php 
                echo strtr($_smarty_tpl->__("cannot_buy"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            no_products_selected: '<?php 
                echo strtr($_smarty_tpl->__("no_products_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_no_items_selected: '<?php 
                echo strtr($_smarty_tpl->__("error_no_items_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            delete_confirmation: '<?php 
                echo strtr($_smarty_tpl->__("delete_confirmation"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_out_of_stock: '<?php 
                echo strtr($_smarty_tpl->__("text_out_of_stock"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            items: '<?php 
                echo strtr($_smarty_tpl->__("items"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_required_group_product: '<?php 
                echo strtr($_smarty_tpl->__("text_required_group_product"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            save: '<?php 
                echo strtr($_smarty_tpl->__("save"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            close: '<?php 
                echo strtr($_smarty_tpl->__("close"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            notice: '<?php 
                echo strtr($_smarty_tpl->__("notice"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            warning: '<?php 
                echo strtr($_smarty_tpl->__("warning"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error: '<?php 
                echo strtr($_smarty_tpl->__("error"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_are_you_sure_to_proceed: '<?php 
                echo strtr($_smarty_tpl->__("text_are_you_sure_to_proceed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_invalid_url: '<?php 
                echo strtr($_smarty_tpl->__("text_invalid_url"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_email: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_email"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_phone: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_phone"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_integer: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_integer"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_multiple: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_multiple"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_password: '******'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_required: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_required"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_zipcode: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_zipcode"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_message: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_message"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_page_loading: '<?php 
                echo strtr($_smarty_tpl->__("text_page_loading"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_ajax: '<?php 
                echo strtr($_smarty_tpl->__("error_ajax"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_changes_not_saved: '<?php 
                echo strtr($_smarty_tpl->__("text_changes_not_saved"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_data_changed: '<?php 
                echo strtr($_smarty_tpl->__("text_data_changed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            more: '<?php 
                echo strtr($_smarty_tpl->__("more"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
        });
        
        $.extend(_, {
            index_script: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['customer_index'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            changes_warning: /*'<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['Appearance']['changes_warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'*/'N',
            currencies: {
                'primary': {
                    'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
                },
                'secondary': {
                    'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'coefficient': '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['coefficient'], ENT_QUOTES, 'UTF-8');
                ?>
'
                }
            },
            default_editor: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'], ENT_QUOTES, 'UTF-8');
                ?>
',
            default_previewer: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_image_previewer'], ENT_QUOTES, 'UTF-8');
                ?>
',    
            current_path: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_path'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            current_location: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_location'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            images_dir: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                ?>
',
            notice_displaying_time: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time'], ENT_QUOTES, 'UTF-8');
                } else {
                    ?>
0<?php 
                }
                ?>
,
            cart_language: '<?php 
                echo htmlspecialchars(@constant('CART_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
            default_language: '<?php 
                echo htmlspecialchars(@constant('DEFAULT_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
            cart_prices_w_taxes: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['cart_prices_w_taxes'] == 'Y') {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
            translate_mode: <?php 
                if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['translation']) {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
            theme_name: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['theme_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            regexp: [],
            current_url: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_url'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            current_host: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_host'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            init_context: '<?php 
                echo strtr($_REQUEST['init_context'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
        });
    
    <?php 
                if (!$_REQUEST['init_context']) {
                    ?>

        $(document).ready(function(){
            $.runCart('C');
        });

    <?php 
                }
                ?>

<?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['anti_csrf']) {
                    ?>
    // CSRF form protection key
    _.security_hash = '<?php 
                    echo htmlspecialchars(fn_generate_security_hash(''), ENT_QUOTES, 'UTF-8');
                    ?>
';
<?php 
                }
                ?>
}(Tygh, Tygh.$));

(function($){
        $(window).load(function(){
            var windowHeight = $( window ).height();
            var menuHeight = windowHeight - 126;
            
            $("ul.responsive_top_menu_ul").css("height", menuHeight).mCustomScrollbar({
                theme:"light",
                //autoHideScrollbar:true,
                //callbacks:{
                  //  onInit: function(){
                        
                    //}
                //}
            });
        });
        
        $( window ).on('scroll resize',function() {
            var windowHeight = $(window).height();
            var menuHeight = windowHeight - 126;
            var overviewHeight = $("div.tygh-header").height();
            var overviewStaticTop = $("div.tygh-header").offset().top;
            var overviewScrollTop = overviewStaticTop - $(window).scrollTop();
            var overviewStaticBottom = overviewStaticTop + $("div.tygh-header").height();
            var overviewScrollBottom = windowHeight - (overviewStaticBottom - $(window).scrollTop());
            var visibleArea;
            if ((overviewHeight + overviewScrollTop) < windowHeight) {
                // alert("bottom is showing!");
                visibleArea = windowHeight - overviewScrollBottom;
                // alert(visibleArea);
            } else {
                if (overviewScrollTop < 0) {
                    // alert("is full height");
                    visibleArea = windowHeight;
                    // alert(visibleArea);
                } else {
                    // alert("top is showing");
                    visibleArea = windowHeight - overviewScrollTop;
                    // alert(visibleArea);
                }
            }
            $("ul.responsive_top_menu_ul").css({"height":(menuHeight + (45 - (visibleArea - 40))), "top":visibleArea});
            //console.log(visibleArea);
        });
        
    })(jQuery);
</script>
<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:scripts"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "index:scripts"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "index:scripts"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>


<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_scripts(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if (trim(Smarty::$_smarty_vars['capture']['template_content'])) {
                if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") {
                    ?>
<span class="cm-template-box template-box" data-ca-te-template="common/scripts.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/scripts.tpl"), $_smarty_tpl);
                    ?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php 
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                    ?>
<!--[/tpl_id]--></span><?php 
                } else {
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                }
            }
        } else {
            $_smarty_tpl->smarty->_tag_stack[] = array('scripts', array());
            $_block_repeat = true;
            echo smarty_block_scripts(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/tygh/core.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/tygh/ajax.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/tygh/history.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/autonumeric/autoNumeric.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/lib/malihu-custom-scrollbar-plugin-3.0.8/jquery.mCustomScrollbar.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/tools/tooltip.min.js"), $_smarty_tpl);
                ?>

<?php 
                echo smarty_function_script(array('src' => "js/lib/appear/jquery.appear-1.1.1.js"), $_smarty_tpl);
                ?>


<?php 
                echo smarty_function_script(array('src' => "js/tygh/responsive.js"), $_smarty_tpl);
                ?>


<script type="text/javascript">
(function(_, $) {

        _.tr({
            cannot_buy: '<?php 
                echo strtr($_smarty_tpl->__("cannot_buy"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            no_products_selected: '<?php 
                echo strtr($_smarty_tpl->__("no_products_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_no_items_selected: '<?php 
                echo strtr($_smarty_tpl->__("error_no_items_selected"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            delete_confirmation: '<?php 
                echo strtr($_smarty_tpl->__("delete_confirmation"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_out_of_stock: '<?php 
                echo strtr($_smarty_tpl->__("text_out_of_stock"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            items: '<?php 
                echo strtr($_smarty_tpl->__("items"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_required_group_product: '<?php 
                echo strtr($_smarty_tpl->__("text_required_group_product"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            save: '<?php 
                echo strtr($_smarty_tpl->__("save"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            close: '<?php 
                echo strtr($_smarty_tpl->__("close"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            notice: '<?php 
                echo strtr($_smarty_tpl->__("notice"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            warning: '<?php 
                echo strtr($_smarty_tpl->__("warning"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error: '<?php 
                echo strtr($_smarty_tpl->__("error"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_are_you_sure_to_proceed: '<?php 
                echo strtr($_smarty_tpl->__("text_are_you_sure_to_proceed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_invalid_url: '<?php 
                echo strtr($_smarty_tpl->__("text_invalid_url"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_email: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_email"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_phone: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_phone"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_integer: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_integer"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_multiple: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_multiple"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_password: '******'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_required: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_required"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_zipcode: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_zipcode"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_validator_message: '<?php 
                echo strtr($_smarty_tpl->__("error_validator_message"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_page_loading: '<?php 
                echo strtr($_smarty_tpl->__("text_page_loading"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            error_ajax: '<?php 
                echo strtr($_smarty_tpl->__("error_ajax"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_changes_not_saved: '<?php 
                echo strtr($_smarty_tpl->__("text_changes_not_saved"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            text_data_changed: '<?php 
                echo strtr($_smarty_tpl->__("text_data_changed"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            more: '<?php 
                echo strtr($_smarty_tpl->__("more"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
        });
        
        $.extend(_, {
            index_script: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['customer_index'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            changes_warning: /*'<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['Appearance']['changes_warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'*/'N',
            currencies: {
                'primary': {
                    'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
                },
                'secondary': {
                    'decimals_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'thousands_separator': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['thousands_separator'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'decimals': '<?php 
                echo strtr($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['decimals'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
                    'coefficient': '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['secondary_currency']->value]['coefficient'], ENT_QUOTES, 'UTF-8');
                ?>
'
                }
            },
            default_editor: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'], ENT_QUOTES, 'UTF-8');
                ?>
',
            default_previewer: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_image_previewer'], ENT_QUOTES, 'UTF-8');
                ?>
',    
            current_path: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_path'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            current_location: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_location'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            images_dir: '<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                ?>
',
            notice_displaying_time: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['Appearance']['notice_displaying_time'], ENT_QUOTES, 'UTF-8');
                } else {
                    ?>
0<?php 
                }
                ?>
,
            cart_language: '<?php 
                echo htmlspecialchars(@constant('CART_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
            default_language: '<?php 
                echo htmlspecialchars(@constant('DEFAULT_LANGUAGE'), ENT_QUOTES, 'UTF-8');
                ?>
',
            cart_prices_w_taxes: <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['cart_prices_w_taxes'] == 'Y') {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
            translate_mode: <?php 
                if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['translation']) {
                    ?>
true<?php 
                } else {
                    ?>
false<?php 
                }
                ?>
,
            theme_name: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['settings']->value['theme_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            regexp: [],
            current_url: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_url'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            current_host: '<?php 
                echo strtr($_smarty_tpl->tpl_vars['config']->value['current_host'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
',
            init_context: '<?php 
                echo strtr($_REQUEST['init_context'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
                ?>
'
        });
    
    <?php 
                if (!$_REQUEST['init_context']) {
                    ?>

        $(document).ready(function(){
            $.runCart('C');
        });

    <?php 
                }
                ?>

<?php 
                if ($_smarty_tpl->tpl_vars['config']->value['tweaks']['anti_csrf']) {
                    ?>
    // CSRF form protection key
    _.security_hash = '<?php 
                    echo htmlspecialchars(fn_generate_security_hash(''), ENT_QUOTES, 'UTF-8');
                    ?>
';
<?php 
                }
                ?>
}(Tygh, Tygh.$));

(function($){
        $(window).load(function(){
            var windowHeight = $( window ).height();
            var menuHeight = windowHeight - 126;
            
            $("ul.responsive_top_menu_ul").css("height", menuHeight).mCustomScrollbar({
                theme:"light",
                //autoHideScrollbar:true,
                //callbacks:{
                  //  onInit: function(){
                        
                    //}
                //}
            });
        });
        
        $( window ).on('scroll resize',function() {
            var windowHeight = $(window).height();
            var menuHeight = windowHeight - 126;
            var overviewHeight = $("div.tygh-header").height();
            var overviewStaticTop = $("div.tygh-header").offset().top;
            var overviewScrollTop = overviewStaticTop - $(window).scrollTop();
            var overviewStaticBottom = overviewStaticTop + $("div.tygh-header").height();
            var overviewScrollBottom = windowHeight - (overviewStaticBottom - $(window).scrollTop());
            var visibleArea;
            if ((overviewHeight + overviewScrollTop) < windowHeight) {
                // alert("bottom is showing!");
                visibleArea = windowHeight - overviewScrollBottom;
                // alert(visibleArea);
            } else {
                if (overviewScrollTop < 0) {
                    // alert("is full height");
                    visibleArea = windowHeight;
                    // alert(visibleArea);
                } else {
                    // alert("top is showing");
                    visibleArea = windowHeight - overviewScrollTop;
                    // alert(visibleArea);
                }
            }
            $("ul.responsive_top_menu_ul").css({"height":(menuHeight + (45 - (visibleArea - 40))), "top":visibleArea});
            //console.log(visibleArea);
        });
        
    })(jQuery);
</script>
<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:scripts"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "index:scripts"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "index:scripts"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>


<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_scripts(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
    }