.has
only works on descendants, ignoring the element itself. Try this (you don't need $(document).ready
since you're binding the event to the document anyway):
$(document).on("mouseup", function(e) {
var container = $("#mpop-loop");
if (!container.has(e.target).length && !container.is(e.target)) {
container.fadeOut("fast");
}
});