$('#questions').ready(function(){
	
	if ($('#start_button').length > 0) {
		$('#questions .question').hide();
	}

	for (i = 1; i < 100; i++) {
	  if ($('#question' + i).length > 0) {
			$('#question' + i).hide();
		} else {
			break;
		}
  }
	if ($('#html_code').length > 0) {
		$('#html_code').hide();
	}
	if ($('#answer_key').length > 0) {
		$('#answer_key').hide();
	}
	
	
	$('#start_button a').click(function(){ 
		$('#question0').show();
		$('#start_button').hide();
		$('#quiz_header').hide();
	});
	
	
});

function transition(question_id) {
	// nicholmikey, I love you
	$('#question' + question_id).fadeOut('fast',function() {        
		   //fade out is done now
		   question_id++;
		if ($('#question' + question_id).length > 0) {
		   $('#question' + question_id).fadeIn();
		} else {
		    $('#quizform').submit();
		}
	});
}

