var 
	text1 = document.querySelector(".text1"),
	text2 = document.querySelector(".text2"),
	text3 = document.querySelector(".text3"),
	image2 = document.querySelector(".image2"),
	image3 = document.querySelector(".image3"),
	overlay = document.querySelector(".overlay"),
	// subOverlay = document.querySelector(".sub-overlay"),
	button = document.querySelector(".button"),

	text1_base = new TweenMax.fromTo(text1, 2, 
		{
			"y": "-28",
			ease: Power4.easeOut
		},
		{
			"y": "-28"
		}
	);

	text1_slideOut = new TweenMax.fromTo(text1, 0.6, 
		{
			"y": "-28",
			ease: Power4.easeOut
		},
		{
			"y": "65"
		}
	);

	text2_slideIn = new TweenMax.fromTo(text2, 0.6, 
		{
			"y": "-83",
			ease: Power4.easeOut
		},
		{
			"y": "-4"
		}
	);

	text2_pause = new TweenMax.to(text2, 1, 
		{
			"y": "-4",
			ease: Power4.easeOut
		}
	);	

	text2_slideOut = new TweenMax.to(text2, 1.2, 
		{
			"y": "83",
			ease: Power4.easeOut
		}
	);	

	text3_pause = new TweenMax.to(text3, 0.1, 
		{
			"x": "-252px",
			ease: Power4.easeOut
		}
	);

	text3_slideIn = new TweenMax.to(text3, 1.5, 
		{
			"x": "0",
			ease: Power4.easeOut
		}
	);

	image2_fadeIn = new TweenMax.fromTo(image2, 1.5, 
		{
			"opacity": "0",
			ease: Power4.easeOut
		},
		{
			"opacity": "1"
		}
	);

	overlay_scale = new TweenMax.fromTo(overlay, 0.3, 
		{
			"x": "0",
			ease: Power4.easeOut
		},
		{		
			"x": "0"
		}
	);

	// subOverlay_expand = new TweenMax.fromTo(subOverlay, 0.3, 
	// 	{
	// 		"right": "475",
	// 		ease: Power4.easeOut
	// 	},
	// 	{
	// 		"right": "175",
	// 	}
	// );

	// text3_toRight = new TweenMax.to(text3, 0, 
	// 	{
	// 		"left": "-65",
	// 		ease: Power4.easeOut
	// 	}
	// );

// scale(0.4)

	button_slideIn = new TweenMax.to(button, 0.6, 
		{
			"y": "-54",
			ease: Power4.easeOut
		}
	);

	image3_fadeIn = new TweenMax.to(image3, 0.6, 
		{
			"opacity": "1",
			ease: Power4.easeOut
		}
	);

	button_pause = new TweenMax.to(button, 5, 
		{
			"display": "block"
		}
	);




	// w1 = new TimelineMax({ repeat:300 }),
	w1 = new TimelineMax({ repeat:300 }),
	t1 = new TimelineMax(),
	t1.pause();

	// w1
	w1
		.add(text1_base)
		.add(text1_slideOut, "sync")
		.add(text2_slideIn, "sync")
		.add(image2_fadeIn)
		.add(text2_pause)
		.add(text2_slideOut, "sync2")
		.add(text3_pause, "sync2")
		.add(text3_slideIn, "sync2")
		// .add(overlay_scale, "sync3")
		// .add(subOverlay_expand)
		// .add(text3_scaleDown)
		.add(button_slideIn, "sync3")
		.add(image3_fadeIn, "sync3")
		.add(button_pause)
		
