$(document).ready(function($) {
    $("a.box_editor").click(function() {
        $.facebox.settings.loadingImage = "/site_media/static/img/loading.gif";
        $.facebox.settings.closeImage = "/site_media/static/img/closelabel.png";
        $(document).bind("beforeReveal.facebox", function() {
            $("#facebox .content").css("width", "600px");
        });
        var editable = this;
        $(document).bind("reveal.facebox", function() {
            $("#edit_form").submit(function() {
                $.post(editable.href, $(this).serialize(), function(data) {
                    $(document).trigger("close.facebox");
                    $(editable).load(data);
                    $(document).unbind("reveal.facebox");
                });
                return false;
            });
        });
        $.facebox({ajax: this.href});
        return false;
    });
    $('#slideshow-container').jshowoff({
        speed: 6000
    });
});
