// INDEX 
function animation_index_start() {
    new Effect.Appear('Image1');    
    new Effect.Opacity('Image1',{from: 0, to: 1.0,duration: 1});    
    new Effect.Move('Image1',{duration:3,x:-30, y:-95, mode:'relative',afterFinish:animation_index_after1});
}    
function animation_index_after1() {    
    new Effect.Appear('Image2');     
    new Effect.Opacity('Image1',{from: 1.0, to: 0,duration: 2});   
    new Effect.Opacity('Image2',{from: 0, to: 1.0,duration: 1}); 
    new Effect.Move('Image2',{duration:3,x:22, y:75, mode:'relative',afterFinish:animation_index_after3});
}
function animation_index_after3() {
    new Effect.Appear('Image3');    
    new Effect.Opacity('Image2',{from: 1.0, to: 0, duration: 2});      
    new Effect.Opacity('Image3',{from: 0, to: 1.0, duration: 1});
    new Effect.Scale('Image3', 85, {duration: 3} ); 
}

// ABOUT US 
function animation_about_us_start() {
    new Effect.Appear('Image1');
    new Effect.Opacity('Image1',{from: 0, to: 1.0,duration: 1});
    new Effect.Move('Image1',{duration:1.5, x:16, y:-60, mode:'relative',transition: Effect.Transitions.linear});    
    new Effect.Move('Image1',{delay:1.5,duration:4,x:4, y:-20, mode:'relative',transition: Effect.Transitions.spring});
}



// PORTFOLIO 
function animation_portfolio_start() {
    new Effect.Appear('Image1');
    new Effect.Opacity('Image1',{from: 0, to: 1.0,duration: 1});
    new Effect.Parallel([
        new Effect.Scale('Image1', 34, {sync:true,scaleFromCenter:true}),
        new Effect.Move('Image1',{sync:true,x:280, y:61, mode:'relative'})
    ], { 
        duration: 5,
        delay: 0
    });     
}


// SERVICES 
function animation_services_start() {
    new Effect.Appear('Image1');
    new Effect.Opacity('Image1',{from: 0, to: 1.0,duration: 1});
    new Effect.Parallel([
        new Effect.Scale('Image1', 90, {sync:true} ),     
        new Effect.Move('Image1',{sync:true,x:-10, y:-90, mode:'relative'})
    ], { 
        duration: 3,
        delay: 0,
        afterFinish:animation_services_after1
    });    
}
function animation_services_after1() {
    new Effect.Appear('Image2');     
    new Effect.Opacity('Image1',{from: 1.0, to: 0, duration: 2});
    new Effect.Opacity('Image2',{from: 0, to: 1.0, duration: 1}); 
    new Effect.Parallel([
        new Effect.Scale('Image2', 87, {sync:true} ),     
        new Effect.Move('Image2',{sync:true,x:44, y:-55, mode:'relative'})
    ], { 
        duration: 3,
        delay: 0,
        afterFinish:animation_services_after4
    });    
//    new Effect.Move('Image2',{duration:3,x:-30, y:-78, mode:'relative',afterFinish:animation_services_after4});
}
function animation_services_after4() {
    new Effect.Appear('Image3');     
    new Effect.Opacity('Image2',{from: 1.0, to: 0, duration: 2 });
    new Effect.Opacity('Image3',{from: 0, to: 1.0, duration: 1});
    new Effect.Parallel([
        new Effect.Scale('Image3', 67, {sync:true} ),     
        new Effect.Move('Image3',{sync:true,x:0, y:99, mode:'relative'})
    ], { 
        duration: 3,
        delay: 0
    });
}





// CONTACT US 
function animation_contact_us_start() {
    new Effect.Appear('Image1');
    new Effect.Opacity('Image1',{from: 0, to: 1.0,duration: 1});    
    new Effect.Move('Image1',{duration:4,x:-10, y:-40, mode:'relative',transition: Effect.Transitions.spring});
}
