function updatePrices() {
    var design = $('input[name="design"]:checked').val()*1;
        var emails = $('input[name="email"]:checked').val()*1;
        var ssl = $('input[name="ssl"]:checked').val()*1;
        var payment = $('input[name="payment"]:checked').val()*-1;

        var total_fixed = 1500 + design
        var total_monthly = 350 + emails + ssl + payment;
        var total_costs = total_fixed + 24*total_monthly;


        $('#overview span.total_fixed').html(total_fixed).fadeIn();
        $('#overview span.total_monthly').html(total_monthly).fadeIn();
        $('#overview span.total_costs').html(total_costs).fadeIn();

        $('ul#fixed li.design span.price').html(design);
        $('ul#fixed li.total_fixed span.price').html(total_fixed);

        $('ul#monthly li.emails span.price').html(emails);
        $('ul#monthly li.ssl span.price').html(ssl);
        $('ul#monthly li.payment span.price').html(payment);
        $('ul#monthly li.total_monthly span.price').html(total_monthly);

}

$(function(){
    $('#steps > div').hide();
    $('#step1').show();
    $('a.next').click(function(){
        var whichStep = $(this).parent().parent().attr('id');
        if( whichStep == 'step1' ) {
        }
        else if( whichStep == 'step2' ) {
        }
        else if( whichStep == 'step3' ) {
        }
        else if( whichStep == 'step4' ) {
        }
        else if( whichStep == 'step5' ) {
        }
        $(this).parent().parent().hide().next().fadeIn();
    });
    $('a.prev').click(function(){
        $(this).parent().parent().hide().prev().fadeIn();
    });

    updatePrices();
        
    $('#cenik input').click(function() {
        updatePrices();
    });

});


