$(document).ready(function() {

    $('input[name="image"]').change(function(e) {
        var reader = new FileReader();

        reader.onload = function(event) {
            $('.sobre img').attr('src', event.target.result);
        }

        reader.readAsDataURL(this.files[0]);
    });

    $('.sobre h2').bind('focusout', function(e) {
        $('input[name="title"]').val($(this).html());
    });

    $('.sobre .inline').bind('focusout', function(e) {
        $('input[name="description"]').val($(this).html());
    });



    $('.sobre a').bind('focusout', function(e) {
        $('input[name="action"]').val($(this).html());
    });

    $('.choose .col:nth-of-type(1) p').bind('focusout', function(e) {
        $('input[name="mission"]').val($(this).html());
    });

    $('.choose .col:nth-of-type(2) p').bind('focusout', function(e) {
        $('input[name="vision"]').val($(this).html());
    });

    $('.choose .col:nth-of-type(3) p').bind('focusout', function(e) {
        $('input[name="virtue"]').val($(this).html());
    });

});