// Fade Functions
	var id = 1; // id of the starting div, assumes the divs start at id = 1
	var divMax = 0; // number of elements (divs) contained in the innerdiv element, assumes they are sequentially numbered
	var fadeTime = 500; // time in ms used for both fade in & fade out
	var holdTime = 8000; // time in ms used to display the testimonial before it fades to the next one
	
	
	$(document).ready(function() {
		divMax = $('.fade').size();	
		$('.fade').hide();
		
		$('#message1').fadeIn(fadeTime);
		
		startTimer();
		
		if($('#buynow_button').length != 0)
		{
			buyClick();
		}
		
		if($('#buynow_button2').length != 0)
		{
			buyClick2();
		}
		
		if($('#email_submit_btn').length != 0)
		{
			emailSignupClick();
		}
		//emailSignupClick
	});
	
	function advance()
	{
		$('#message'+id).fadeOut(fadeTime , function(){
			$('#message'+id).hide();
			id++;
			if(id>divMax)
			{
				id = 1;
			}
			$('#message'+id).fadeIn(fadeTime);
		});
	}
	
	function retreat()
	{
		$('#message'+id).fadeOut(fadeTime , function(){
			$('#message'+id).hide();
			id--;
			if(id<1)
			{
				id = divMax;
			}
			$('#message'+id).fadeIn(fadeTime);
			
		});
	}
	
	function startTimer()
	{
		$(document).everyTime(holdTime,'advanceTimer',function(){
			advance();
		});
	}
	
	function stopTimer()
	{
		$(document).stopTime('advanceTimer');
	}
