function start(duration, slow, fast, veryfast, url){
    // place first slide images
    for (var i=1; i<=9; i++) {
        var image = '<img src="' + url + 'home_1' + i + '.png" class="img' + i + '" />'
        $('#slider').append(image);
    }
    // fade all to 0 (invisible)
    $('#slider img').fadeTo(1,0)
    $('.img9').fadeTo(slow,1)
    $('.img2').fadeTo(fast,1, function(){
        $('.img4').fadeTo(slow,1)
        $('.img3').fadeTo(fast,1, function(){
            $('.img8').fadeTo(slow,1)
            $('.img6').fadeTo(fast,1, function(){
                $('.img1').fadeTo(veryfast,1, function(){
                    $('.img5').fadeTo(veryfast,1, function(){
                        $('.img7').fadeTo(veryfast,1, function(){
                            setTimeout("second("+duration+", "+slow+", "+fast+", "+veryfast+")", duration);
                        })
                    })
                })
            });

        });
    });
}
function first(duration, slow, fast, veryfast){
    $('.img9').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(fast,1)})
    $('.img2').fadeTo(fast,0, function(){
        $(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(slow,1)
        $('.img4').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(fast,1)})
        $('.img3').fadeTo(fast,0, function(){
            $(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(slow,1)
            $('.img8').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(fast,1)})
            $('.img6').fadeTo(fast,0, function(){
                $(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(slow,1)
                $('.img1').fadeTo(fast,0, function(){
                    $(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(veryfast,1)
                    $('.img5').fadeTo(fast,0, function(){
                        $(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(veryfast,1)
                        $('.img7').fadeTo(fast,0, function(){
                            $(this).attr('src', $(this).attr('src').replace("home_3", "home_1")).fadeTo(veryfast,1)
                            setTimeout("second("+duration+", "+slow+", "+fast+", "+veryfast+")", duration);
                        })
                    })

                })
            })
        })
    })
}
function second(duration, slow, fast, veryfast){
    $('.img1').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(fast,1)})
    $('.img9').fadeTo(fast,0, function(){
        $(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(slow,1)
        $('.img2').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(fast,1)})
        $('.img8').fadeTo(fast,0, function(){
            $(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(slow,1)
            $('.img3').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(fast,1)})
            $('.img7').fadeTo(fast,0, function(){
                $(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(slow,1)
                $('.img4').fadeTo(fast,0, function(){
                    $(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(veryfast,1)
                    $('.img5').fadeTo(fast,0, function(){
                        $(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(veryfast,1)
                        $('.img6').fadeTo(fast,0, function(){
                            $(this).attr('src', $(this).attr('src').replace("home_1", "home_2")).fadeTo(veryfast,1)
                            setTimeout("third("+duration+", "+slow+", "+fast+", "+veryfast+")", duration);
                        })
                    })

                })
            })
        })
    })
}
function third(duration, slow, fast, veryfast){
    $('.img3').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(fast,1)})
    $('.img7').fadeTo(fast,0, function(){
        $(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(slow,1)
        $('.img4').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(fast,1)})
        $('.img6').fadeTo(fast,0, function(){
            $(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(slow,1)
            $('.img1').fadeTo(fast,0, function(){$(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(fast,1)})
            $('.img9').fadeTo(fast,0, function(){
                $(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(slow,1)
                $('.img2').fadeTo(fast,0, function(){
                    $(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(veryfast,1)
                    $('.img5').fadeTo(fast,0, function(){
                        $(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(veryfast,1)
                        $('.img8').fadeTo(fast,0, function(){
                            $(this).attr('src', $(this).attr('src').replace("home_2", "home_3")).fadeTo(veryfast,1)
                            setTimeout("first("+duration+", "+slow+", "+fast+", "+veryfast+")", duration);
                        })
                    })

                })
            })
        })
    })
}



            
            
            

