I have tried using .each(), .siblings() and #layer_wrp > div in various ways.
$(function() {
jQuery.fn.slideRightOut = (function(){
if($welcome_layer.css("margin-left") ==='900px') {
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
} else if ($work_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else if ($diver_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else if ($robin_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else if ($other_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else if ($experi_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else if ($cool_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else if ($contact_layer.css("margin-left") ==='900px'){
$(this).css("z-index",-1).stop().animate({ marginLeft: "1800px" }, 1200);
}else {
}
});
});