   
    //Path to image folder.
    var path_images = './countdown/images';
    
    //Paths to image subfolders
    var top_left = path_images+'/top/left/';
    var top_right = path_images+'/top/right/';
    var bottom_left = path_images+'/bottom/left/';
    var bottom_right = path_images+'/bottom/right/';
    var reflection_left = path_images+'/reflection/left/';
    var reflection_right = path_images+'/reflection/right/';
    var files_to_load = 60;
    var custom_width = 160 / files_to_load;
    var progress = 0;
    var i = 0;
    
    function update_progress () {
        progress++;
        new_width = progress * custom_width;        
        jQuery('#progress_bar').css('width', new_width +"px");
        if(progress == files_to_load){
            jQuery('#loading').fadeOut('slow', function (){
                jQuery('#clock').fadeIn('slow', function (){
                    animate_clock();
                });
            });
        };
    }
    
    //load_images();

    function load_images() {
        jQuery('<img />').attr('src', top_left + parseInt(i) + '.png').load(function(){
            update_progress();});
        jQuery('<img />').attr('src', top_right + parseInt(i) + '.png').load(function(){
            update_progress();});
        jQuery('<img />').attr('src', bottom_left + parseInt(i) + '.png').load(function(){
            update_progress();});
        jQuery('<img />').attr('src', bottom_right + parseInt(i) + '.png').load(function(){
            update_progress();});
        jQuery('<img />').attr('src', reflection_left + parseInt(i) + '.png').load(function(){
            update_progress();});
        jQuery('<img />').attr('src', reflection_right + parseInt(i) + '.png').load(function(){
            update_progress();});
        i++;
        if(i <= 9){load_images();};
    }



