<a class="update-logo" href="{{update_url}}">
    <img onmousedown="return false" onmousemove="return false" class="article-logo{% include "coop_cms/widgets/_imageedit_cssclass.html" %}" src="{{thumbnail_src}}">
</a>
<script>
    $(function() {
        $('a.update-logo').colorbox({
            title: function(data){
                return document.title;
            },
            onComplete : function(){
                $("form.colorbox-form").ajaxForm({
                    dataType: 'json',
                    success: function (data) {
                        if (data['src']){
                            $.colorbox.close();
                            $('a.update-logo img').attr('src', data['src']);
                            $('a.update-logo img').change();
                        } else {
                            $.colorbox({
                                title: function(data){
                                    return document.title;
                                },
                                html:data['html']
                            }); 
                        }
                    }
                })
            }
        })
    });
</script>
