$(function(){
    $('.accordion .trigger').click(function(){
        var $this = $(this);
        var $target = $this.next();
        
        if (!$target.is(':visible'))
        {
            $target.show();
            $this.addClass('opened');
        }
        else
        {
            $target.hide();
            $this.removeClass('opened');
        }
    });
});
