/*
easeInQuad
easeOutQuad
easeInCubic
easeOutCubic
easeInQuart
easeOutQuart
easeInQuint
easeOutQuint
easeInSine
easeOutSine
easeInCirc
easeOutCirc
easeInExpo
easeOutExpo
easeInElastic
easeOutElastic
easeInBack
easeOutBack
easeInBounce
easeOutBounce
*/

$(function($) {

var p1 = document.getElementById('p1');
var t1 = document.getElementById('t1');
var t2 = document.getElementById('t2');
var s1 = document.getElementById('s1');
var s2 = document.getElementById('s2');
var s3 = document.getElementById('s3');
var s4 = document.getElementById('s4');
var s5 = document.getElementById('s5');

p1.style.visibility = "hidden";
t1.style.visibility = "hidden";
t2.style.visibility = "hidden";
s1.style.visibility = "hidden";
s2.style.visibility = "hidden";
s3.style.visibility = "hidden";
s4.style.visibility = "hidden";
s5.style.visibility = "hidden";

new Tween(p1.style,{ time:.1,onComplete:fc_p1 });
new Tween(t1.style,{ time:2,onComplete:fc_t1 });
new Tween(t2.style,{ time:6,onComplete:fc_t2 });

new Tween(s1.style,{ time:3.1,onComplete:fc_s1 });
new Tween(s2.style,{ time:3.4,onComplete:fc_s2 });
new Tween(s3.style,{ time:3.8,onComplete:fc_s3 });
new Tween(s4.style,{ time:4.2,onComplete:fc_s4 });
new Tween(s5.style,{ time:4.6,onComplete:fc_s5 });


function fc_p1(){
new Tween(p1.style,{
time:3
,delay:0
,transition:'easeOutQuint'
//,top:{ from:0,to:180,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
//,onComplete:fc_aaa
});
p1.style.visibility = "visible";
}

function fc_t1(){
new Tween(t1.style,{
time:2
,delay:0
,transition:'easeOutQuart'
,top:{ from:145,to:115,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
//,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
//,onComplete:fc_aaa
});
t1.style.visibility = "visible";
}

function fc_t2(){
new Tween(t2.style,{
time:2
,delay:0
,transition:'easeOutBack'
//,top:{ from:65,to:15,tmpl:"$#px" }
,left:{ from:680,to:580,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
//,onComplete:fc_aaa
});
t2.style.visibility = "visible";
}



function fc_s1(){
new Tween(s1.style,{
time:1
,delay:0
,transition:'easeOutBack'
,top:{ from:0,to:180,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
,onComplete:fc_rf1
});
s1.style.visibility = "visible";
}


function fc_s2(){
new Tween(s2.style,{
time:1
,delay:0
,transition:'easeOutBack'
,top:{ from:0,to:180,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
,onComplete:fc_rf2
});
s2.style.visibility = "visible";
}


function fc_s3(){
new Tween(s3.style,{
time:1
,delay:0
,transition:'easeOutBack'
,top:{ from:0,to:180,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
,onComplete:fc_rf3
});
s3.style.visibility = "visible";
}


function fc_s4(){
new Tween(s4.style,{
time:1
,delay:0
,transition:'easeOutBack'
,top:{ from:0,to:130,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
,onComplete:fc_rf4
});
s4.style.visibility = "visible";
}


function fc_s5(){
new Tween(s5.style,{
time:1
,delay:0
,transition:'easeOutBack'
,top:{ from:0,to:130,tmpl:"$#px" }
//,left:{ from:0,to:0,tmpl:"$#px" }
//,width:{ from:300,to:100,tmpl:"$#px" }
//,height:{ from:300,to:100,tmpl:"$#px" }
,opacity:{ from:0,to:1 }
,filter:{ from:0,to:100,tmpl:"alpha(opacity=$0)" }
//,background:{ to:0,from:25,tmpl:"rgb($00,$200,$0)" }
,onComplete:fc_rf5
});
s5.style.visibility = "visible";
}

function fc_rf1(){
$('#s1').reflect({ height:.5, opacity:.6 });
}
function fc_rf2(){
$('#s2').reflect({ height:.5, opacity:.6 });
}
function fc_rf3(){
$('#s3').reflect({ height:.5, opacity:.6 });
}
function fc_rf4(){
$('#s4').reflect({ height:.3, opacity:.5 });
}
function fc_rf5(){
$('#s5').reflect({ height:.3, opacity:.5 });
}

});
