saper333,
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
div {
border: 1px solid;
}
</style>
<title>Document</title>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
<div>
<div class="c">1</div>
<div class="j" id="m">2</div>
</div>
<div>
<div class="c">1</div>
<div class="j">2</div>
<div class="j">3</div>
<div class="j">4</div>
</div>
<div>
<div class="c">1</div>
<div class="j">2</div>
<div class="j">4</div>
<div class="j">3</div>
<div class="j">7</div>
</div>
<script>
$(document).ready(function() {
$(".c").each(function(c, a) {
var b = $(a).nextAll(".j").remove().eq(0);
$(a).click(function() {
$(a).nextAll(".j").length ? b.remove() : b.insertAfter(a)
})
})
});
</script>
</body>
</html>