Code:
var stored_html = "";
$(".main > div").each(function() {
$(this).insertAfter(stored_html);
});
$(stored_html).insertAfter($(this).parent())
what do you intend for it to do exactly? the last line does nothing because you havent assigned it to an element, so using $(this).parent() does nothing, as it has no parent to reference.
the first part, well all you are doing is inserting, literally, nothing, not event a blank space.