$(document).ready(function(){
    var one=$('#house .person_first');
    var two=$('#house .person_two');
    var three=$('#house .person_three');
    var four=$('#house .person_four');
    var five=$('#house .person_five');
    
    scenariy();
    
    $('body').everyTime(72000, function(){
        one.css({
        'top': '450px',
        'left': '0px'
        });
        two.css({
            'top': '450px',
            'left': '450px'
        });
        three.css({
            'top': '450px',
            'left': '926px'
        });
        four.css({
            'top': '450px',
            'left': '450px'
        });
        five.css({
            'top': '450px',
            'left': '450px'
        });
        scenariy();
    });
    
function scenariy(){
    one.delay(3000).fadeIn(1000)
    .delay(3000).fadeOut(1000).animate({
        left: '+=200'
    },0, function(){
        one.fadeIn(1000).delay(3000).fadeOut(1000).animate({
            left: '+=200'
        }, 0, function(){
            one.fadeIn(1000).delay(3000).fadeOut(1000).animate({
                left: '+=200'
            }, 0, function(){
                one.fadeIn(1000);
                four.css('left', '876px').fadeIn(1000).delay(3000).fadeOut(1000).animate({
                    left: '-=200'
                }, 0, function(){
                    four.fadeIn(1000).delay(3000).fadeOut(1000).animate({
                        left: '-=200'
                    },0,function(){
                        four.fadeIn(1000).delay(3000).fadeOut(1000, function(){
                            two.fadeIn(1000);
                            one.fadeOut(1000, function(){
                                five.css('left', '600px').fadeIn(1000).delay(3000).fadeOut(1000, function(){
                                    one.css('left', '600px').fadeIn(1000).delay(3000).fadeOut(1000).animate({
                                        left: '+=100',
                                        top: 420
                                    },0 ,function(){
                                        three.fadeIn(1000);
                                        one.fadeIn(1000);
                                        
                                        two.delay(2000).fadeOut(1000, function(){
                                            one.fadeOut(1000);
                                            two.fadeIn(1000, function(){
                                                one.delay(1000).animate({
                                                    top: '390',
                                                    left: '+=100'
                                                },0).fadeIn(1000).delay(3000).fadeOut(1000, function(){
                                                    two.fadeOut(1000).animate({
                                                        top: '420',
                                                        left: '700'
                                                    },0);
                                                    three.fadeOut(1000).animate({
                                                        left: '770'
                                                    },0, function(){
                                                        three.fadeIn(1000);
                                                        two.fadeIn(1000).delay(3000).fadeOut(1000, function(){
                                                            three.fadeOut(1000).animate({
                                                                top: '420',
                                                                left: '740'
                                                            },0);
                                                            two.animate({
                                                                top: '370',
                                                                left: '790'
                                                            },1000).fadeIn(1000);
                                                            three.fadeIn(1000, function(){
                                                                two.delay(1000).fadeOut(1000);
                                                                three.fadeOut(1000).animate({
                                                                    top: '420',
                                                                    left: '750'
                                                                },0, function(){
                                                                    three.delay(2000).css({
                                                                        'left': '790px',
                                                                        'top': '390px'
                                                                    }).fadeIn(1000).delay(3000).fadeOut(1000);
                                                                });
                                                            });
                                                        });
                                                    });
                                                });
                                            })
                                            
                                        });
                                    })
                                });
                            })
                        });
                    });
                })
            });
        });
    });
    
}    
})
