var not_br_first = ':not(br):first'

function find_next(jquery_obj) {
    var next = jquery_obj.nextAll(not_br_first)
    if (next.length > 0) {
        return next
    }

    return jquery_obj.parent().nextAll(not_br_first)
}

$(function() {
    $('.spoiler_button').click(function() {
        var that = $(this)

        find_next(that).fadeToggle()

        var html = that.html()
        that.html(that.attr('data-spoiler'))
        that.attr('data-spoiler', html)
    }).each(function() {
        find_next($(this)).hide()
    })
})

