$(document).ready(function(){

	function moveAction(){
		time = 0;
		function orangeLine(eq){
			$('#orangeLine li').delay(time).eq(eq).animate({
				width: '256px'
			}, 700);
			time = 700;
		}
	
		function rightPanel(){
			$('#violShadow').css({'height':'0px', 'opacity': '1'});
			$('#viol').animate({
				opacity: 1,
			}, 2000);
			
			$('#violShadow').delay(2000).animate({
				height: '432px'
			}, 4000, function() {
				$('#violShadow').delay(1000).animate({
					opacity: 0
				}, 800);
				$('#viol').delay(1800).animate({
					opacity: 0
				}, 2000);
			});
			$('#door').delay(6700).animate({
				opacity: 1,
				width: '202px'
			}, 4000, function() {
				$('#door').delay(5000).animate({
					opacity: 0,
					width: '0px'
				}, 2000, function() {
						rightPanel();
				});
			});
		}
		rightPanel();
		
		
		function mainText(){
			$('#mainText').css({'width':'0px'});
			$('#imgText').css({'height':'153px', 'left':'12px', 'top':'54px', 'opacity':'1'});
			$('#mainText').delay(2000).animate({
				width: '681px'
			}, 4000, function() {
				$('#imgText').animate({
					height: '290px',
					top: '1px'
				}, 2000, function() {
					$('#imgText').animate({
						left: '-590px'
					}, 8000, function() {
						$('#imgText').animate({
							left: '35px',
							height: '155px'
						}, 4000, function() {
							$('#imgText').animate({
								left: '-200px',
								opacity: 0,
								height: '280px'
							}, 5000, function() {
									mainText();
							});
						});
					});
				});
			});
		
		}
		mainText();
		
		
		$('#otital').animate({
			width: '174px'
		}, 2000);
		
		$('#masters').delay(3000).animate({
			width: '102px'
		}, 1400, function() {
			orangeLine('0');
			orangeLine('1');
			orangeLine('2');
			orangeLine('3');
		});
		
		
	}

	moveAction();
});
