$("body").on('click', '.pop', function(){
if($('.pop').length == 3) {
$('.pop').eq(0).before('');
}
$('.pop').show();
$(this).hide();
});
Is this what you are looking for? http://jsfiddle.net/kjTBG/17/
Edit:
$("body").on('click', '.pop', function(){
if($('.pop').length == 3) {
$('.pop').last().after('');
}
$('.pop').show();
$(this).hide();
});
http://jsfiddle.net/kjTBG/24/