$(document).ready(function () {
var $target = $('#layouts ol');
var $elements = $('.author_poem');
$elements.sort(function (a, b) {
var an = $.trim($(a).text()),
bn = $.trim($(b).text());
if (an && bn) {
return an.toUpperCase().localeCompare(bn.toUpperCase());
}
return 0;
});
$elements.detach().appendTo($target);
});