

var loadeddivtop;
var loadeddivbottom;

function onLoad() {
	loadeddivtop = $('#introtxt');
	loadeddivbottom = $('#introcontent'); 
}

function resetButtons() {
	  document.getElementById('whatsthatbutton').setAttribute('class','invertbutton');
      document.getElementById('contactbutton').setAttribute('class','invertbutton');
}

function clickWhatButton() {
//	document.getElementById('introtxt').style.display = 'none';
	$('#what1').css('display','hidden');
	loadeddivtop.fadeOut('fast', function() {
        // Animation complete
        loadeddivtop = $('#whatisit');
		$('#whatisit').fadeIn('slow', function() {
				loadeddivbottom.fadeOut('fast');
				loadeddivbottom = $('#whatswigwagcontent');
				$('#what1').delay(1500).fadeIn('slow');
				$('#what2').delay(3000).fadeIn('slow', function() {

					// done	
	
					
				} );
				$('#whatswigwagcontent').fadeIn('fast');        		
     	 });
     	 

      });
      resetButtons();
      document.getElementById('whatsthatbutton').setAttribute('class','invertbutton activeon');
}

function clickContactButton() {
//	document.getElementById('introtxt').style.display = 'none';    
	loadeddivtop.fadeOut('fast', function() {
        // Animation complete
        loadeddivtop = $('#locationtext')
		$('#locationtext').fadeIn('slow', function() {
     	 });
     	 
		loadeddivbottom.fadeOut('fast', function() {
			loadeddivbottom = $('#locationcontent');
			$('#locationcontent').fadeIn('fast', function() {
					// done	
			});        		
				// done	
		});

      });
      resetButtons();
      document.getElementById('contactbutton').setAttribute('class','invertbutton activeon');
}


function clickNotifyMe() {
	// load the modal window
		// scroll to top
//		alert("notify.");
  		
//		$('#push').hide(); 
//		$('#footer').hide();

//		$('html, body').animate({scrollTop:0}, 'fast');

		// before showing the modal window, reset the form incase of previous use.
		$('.success, .error').hide();
		$('form#contactForm').show();
		
		// Reset all the default values in the form fields
		$('#name').val('Your name');
		$('#email').val('Your email address');
//		$('#comment').val('Enter your comment or query...');

		//show the mask and contact divs
		$('#mask').show().fadeTo('', 0.7);
		$('div#contact').fadeIn();
        
  
		// stop the modal link from doing its default action
		//return false;
}
