// JavaScript Document//clear text box on click
function clearText(field){

if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;

}


// CUFON
Cufon.replace('h1', {hover: true});
Cufon.replace('h2', {hover: true});
Cufon.replace('h3', {hover: true});
Cufon.replace('h4', {hover: true});
Cufon.replace('.f-avenir', {hover: true});



$(function(){
	$('#what-btn').click(function(){
		$('#content').animate({marginTop:0}, 500);
		$('#container').animate({height:'500px'}, 1000),
		$('#container').css("height","500");
		return false;
		
	});
	$('#who-btn').click(function(){
		$('#content').animate({marginTop:-1500}, 500);
		$('#container').animate({height:'1200px'}, 1000),
		$('#container').css("height","1200");
		return false;
	});
	$('#how-btn').click(function(){
		$('#content').animate({marginTop:-4000}, 500);
		$('#container').animate({height:'750px'}, 1000),
		$('#container').css("height","750");
		return false;
	});
	$('#where-btn').click(function(){
		$('#content').animate({marginTop:-5750}, 500);
		$('#container').animate({height:'500px'}, 1000),
		$('#container').css("height","500");
		return false;
	});
	
	
	$('#what-btn,#who-btn,#how-btn,#where-btn').click(function(){
		$('#header').animate({marginTop:-440}, 500);
		$('#header').fadeOut(0);
		$('#header2').show(1000);
		return false;
	});
	
	$('#header2').click(function(){
		$('#header2').hide(500);						 
		$('#header').show(200);
		$('#header').animate({marginTop:0}, 500);
		$('#container').animate({height:'0px'}, 1000),
		$('#content').animate({marginTop:1000}, 1000);
		return false;
	});
	
});



/////////////////////////////////////////////////////
////////// VIDEO AND FLASH MANILPULATION
/////////////////////////////////////////////////////
	function changeBgVideo(newVid) {
		if(navigator.appName.indexOf("Microsoft") != -1) {
			var flash = window.flashObject;
		}else {
			var flash = window.document.flashObject
		}
		
		flash.changeVid(newVid);
	}
	
	function pauseVid(type) {
		if(navigator.appName.indexOf("Microsoft") != -1) {
			var flash = window.flashObject;
		}else {
			var flash = window.document.flashObject
		}
		
		flash.changeVidStatus(type);
	}
