// JavaScript Document


	console.log( "loaded firetextween" ) ;

	var scrollValue ;
	var pageYOffsetVar = 0 ;
	var target ;
	
	var arrayPosition = 0 ;
	var statementArray = new Array( 	"Jon Gerlach's projects, experiments and process work.",
										"Lets talk like we have no lips.",
										"I heard they've recently decided to add more hops.",
										"The battle of wits has begun.", 
										"Who is this Snoop Dogg?",
										"Welcome to the terrordome.",
										"Can you hang a website on a fridge?", 
										"Mostly fluff ...", 
										"... and some residual peanut butter.", 
										"Who says blogging has to be fun?", 
										"a portfolio : jongerla.ch :: a blog : gerlager.com", 
										"Who wants candy?", 
										"Taking it back to the old school.", 
										"It's that time again."
										) ;
	
				
	function init()
	{
		scrollValue = document.getElementById( 'statement' ).offsetTop + 10 ;
		target = document.getElementById('statement');
		
		tween = new TextTween(target, 'innerHTML', statementArray[arrayPosition], Tween.strongEaseOut, 1);	
		tween.start() ;
	}
	
	
	function report(){
					
		if( ( window.pageYOffset > scrollValue ) && ( pageYOffsetVar < scrollValue ) )
		{
			tween.stop() ;
			target.innerHTML = "" ;
			pageYOffsetVar = window.pageYOffset ;						
		}
		else if( ( window.pageYOffset < scrollValue ) && ( pageYOffsetVar > scrollValue ) )
		{
		
			if( arrayPosition < statementArray.length - 1 )
			{
				arrayPosition += 1 ;
			}
			else
			{
				arrayPosition = 0 ;
			}
			
			console.log( arrayPosition ) ;
		
			pageYOffsetVar = window.pageYOffset ;
			
			tween = new TextTween(target, 'innerHTML', statementArray[arrayPosition], Tween.strongEaseOut, 1);	
			tween.start() ;
		}
		
	}