var programPremium = function(completion)
{
    this.name = 'Премиум';
    this.programType = 1;
    this.codeName = 'premium';
    
    this.price = Math.round(completion.price);
    this.completionPrice = Math.round(completion.price);
    this.metallicPrice = completion.CostColorMetalic;
    this.metallicPriceUSD = completion.CostColorMetallicUSD;
    this.completion = completion;
}

extend(programPremium, programStandard);

programPremium.prototype.init = function(startData, programSwitch)
{
    if (typeof programSwitch == 'undefined')
    {
        programSwitch = false;
    }
    this.termMin = 12;
    this.termMax = 60;
    this.firstPayMin = 30;
    this.firstPayMax = 100;
    
    $('#CalcCredit input[name=onSumCredit]').attr('disabled', false);
    facade.program.setTerm(12);
    facade.program.setFirstPay(30);
    facade.program.commission = 6000;
    this.insurance = 0;
    
    if (!programSwitch)
    {
        facade.program.currency = 'rub';
        this.USDRate = false;
    }
    
    facade.page.sliderTerm.slider('option', 'disabled', false);
    facade.page.sliderTermInner.slider('option', 'disabled', false);
    facade.page.sliderFirstPay.slider('option', 'disabled', false);
    
    if (!programSwitch)
    {
        $('#currency_selector_rub').attr('checked', true);
        $('.currency_label').html('Руб');
        $('#metallic_off').attr('checked', true);
    }
    
    $('#onSumCredit_off').attr('checked', true);
    $('#CalcCredit input[name=SumCreditCur]').val('').attr('disabled', true);
    $('#CalcCredit input[name=SumCreditRate]').val('').attr('disabled', true);
    $('#LsTerm').hide();
    
    $('#FormExchangeRate').hide();
    $('.program50_field').hide();
    $('.additional_field').hide();
    $('.standard_field').show();    
    $('.so_sign').hide();
    $('.disclaimer p').hide();
    $('#so_notice_standart').show();
    
    
    
    $('#TotalIntegCost').val(Math.round(parseFloat(this.price)));
    if ((typeof startData != 'undefined') && startData)
    {
        this.setData(startData);
    }
    facade.program.calc();
    facade.program.bindEvents();
}

programPremium.prototype.updateInterestRate = function()
{
    _self = this;
    

    if (_self.term < 37)
    {
        _self.interestRate = 13.9;
    }
    else
    {
        _self.interestRate = 14.9;
    }
    
}
