<?php /* Smarty version Smarty-3.1.19, created on 2018-10-13 14:32:19
         compiled from "/home/tnsmborg/public_html/templates/_common/plans.tpl" */ ?>
<?php /*%%SmartyHeaderCode:11225786905bc23a3305d526-58497721%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f408801800c04f02a31a6b12072ce9be71370296' => 
    array (
      0 => '/home/tnsmborg/public_html/templates/_common/plans.tpl',
      1 => 1528949094,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '11225786905bc23a3305d526-58497721',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'plans' => 0,
    'item' => 0,
    'plan' => 0,
    'core' => 0,
    'option' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5bc23a33087f91_20443428',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5bc23a33087f91_20443428')) {function content_5bc23a33087f91_20443428($_smarty_tpl) {?><?php if (!empty($_smarty_tpl->tpl_vars['plans']->value)) {?>
    <div class="fieldset">
        <div class="fieldset__header"><?php echo iaSmarty::lang(array('key'=>'plans'),$_smarty_tpl);?>
</div>

        <div class="fieldset__content">
            <div id="js-plans-list" class="plans">
                <div class="plans__item">
                    <label for="input-plan0" class="plans__item__header radio">
                        <input type="radio" name="plan_id" value="0"<?php if (empty($_smarty_tpl->tpl_vars['item']->value['sponsored_plan_id'])) {?> checked<?php }?> id="input-plan0" data-fields="">
                        <strong><?php echo iaSmarty::lang(array('key'=>'_not_assigned_'),$_smarty_tpl);?>
</strong>
                        <?php if (isset($_smarty_tpl->tpl_vars['item']->value['sponsored_plan_id'])&&$_smarty_tpl->tpl_vars['item']->value['sponsored_plan_id']>0) {?>
                            <span class="label label-info"><?php echo iaSmarty::lang(array('key'=>'paid_subscription_will_cancel'),$_smarty_tpl);?>
</span>
                        <?php }?>
                    </label>
                </div>
                <?php  $_smarty_tpl->tpl_vars['plan'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['plan']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['plans']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['plan']->key => $_smarty_tpl->tpl_vars['plan']->value) {
$_smarty_tpl->tpl_vars['plan']->_loop = true;
?>
                    <div class="plans__item">
                        <label for="input-plan<?php echo $_smarty_tpl->tpl_vars['plan']->value['id'];?>
" class="plans__item__header radio">
                            <input type="radio" name="plan_id" value="<?php echo $_smarty_tpl->tpl_vars['plan']->value['id'];?>
"<?php if (isset($_smarty_tpl->tpl_vars['item']->value['sponsored_plan_id'])&&$_smarty_tpl->tpl_vars['plan']->value['id']==$_smarty_tpl->tpl_vars['item']->value['sponsored_plan_id']) {?> checked<?php }?> id="input-plan<?php echo $_smarty_tpl->tpl_vars['plan']->value['id'];?>
" data-fields="<?php if (isset($_smarty_tpl->tpl_vars['plan']->value['fields'])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['plan']->value['fields'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>">
                            <strong><?php echo iaSmarty::lang(array('key'=>"plan_title_".((string)$_smarty_tpl->tpl_vars['plan']->value['id'])),$_smarty_tpl);?>
 &mdash; <?php echo $_smarty_tpl->tpl_vars['plan']->value['cost'];?>
 <?php echo $_smarty_tpl->tpl_vars['core']->value['config']['currency'];?>
</strong>
                        </label>
                        <div class="plans__item__body"><?php echo iaSmarty::lang(array('key'=>"plan_description_".((string)$_smarty_tpl->tpl_vars['plan']->value['id'])),$_smarty_tpl);?>
</div>
                        <?php if ($_smarty_tpl->tpl_vars['plan']->value['options']) {?>
                        <div class="well">
                            <ul>
                                <?php  $_smarty_tpl->tpl_vars['option'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['option']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['plan']->value['options']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['option']->key => $_smarty_tpl->tpl_vars['option']->value) {
$_smarty_tpl->tpl_vars['option']->_loop = true;
?>
                                    <li><?php echo iaSmarty::lang(array('key'=>"plan_option_".((string)$_smarty_tpl->tpl_vars['option']->value['item'])."_".((string)$_smarty_tpl->tpl_vars['option']->value['name'])),$_smarty_tpl);?>
 —
                                    <?php if ('bool'==$_smarty_tpl->tpl_vars['option']->value['type']) {?>
                                        <?php if ($_smarty_tpl->tpl_vars['option']->value['value']) {?><?php echo iaSmarty::lang(array('key'=>'yes'),$_smarty_tpl);?>
<?php } else { ?><?php echo iaSmarty::lang(array('key'=>'no'),$_smarty_tpl);?>
<?php }?>
                                    <?php } else { ?>
                                        <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['option']->value['value'], ENT_QUOTES, 'UTF-8', true);?>

                                    <?php }?>
                                    </li>
                                <?php } ?>
                            </ul>
                        </div>
                        <?php }?>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>

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

$(function()
{
    var $container = $('#js-plans-list');
    $('input[type="radio"]', $container).on('click', function()
    {
        var $this = $(this);
        var plan = $this.val();
        var fields = $this.data('fields').split(',');

        $this.closest('.plans__item').addClass('active')
            .siblings().removeClass('active');

        $('.form-group--plan').hide().addClass('hide');

        $.each(fields, function(index, item)
        {
            $('#'+item+'_fieldzone').show().removeClass('hide');
        });

        $('.fieldset__content').each(function()
        {
            if ($('.fieldzone', this).length > 0 && $('.fieldzone:not(.form-group--plan),.fieldzone:not(.hide)', this).length == 0) {
                $(this).parent('.fieldset').hide();
            } else {
                $(this).parent('.fieldset').show();
            }
        });
    });

    $(':checked', $container).length
        ? $(':checked', $container).click()
        : $('input[type="radio"]:first', $container).click();
});
    <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

<?php }?><?php }} ?>
