$(document).ready(function() {

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

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

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

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

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

});