$(function() {
	//
	//	Inflation progression
	//
	
	$('#strBtn').click(function() {
		$(this).hide();
		current = $('#current').val();
		$('#strLoad').show();
		
		$.ajax({
			url: "inflation/inc/newStream.php",
			data: "current="+current,
			type: "GET",
			dataType: 'html', 
			success: function(data) {
						$('#updStream tbody').append(data);
					}
		});
		
		current++;
		$('#current').val(current);
		$('#strLoad').hide();
		
		$(this).show();
	});

	function showContactForm(){
		$("#contactForm").toggle('blind');
	};
	
	$("#whoFor").click(function() {
		showContactForm();
	});
	
	function showAdminBox(){
		$("#adminBox").toggle('blind');
	};
	
	$("#adminButton").click(function() {
		showAdminBox();
	});

	// Help side
	$("#contactRefIcon").mouseover(function(){
		$("#infoContactRef").toggle('fade');
	});
	$("#contactRefIcon").mouseout(function(){
		$("#infoContactRef").toggle('fade');
	});	

	$("#dateNewIcon").mouseover(function(){
		$("#infoDateNew").toggle('fade');
	});
	$("#dateNewIcon").mouseout(function(){
		$('#infoDateNew').toggle('fade');
	});
	
	$("#infoContactRef, #strLoad, #infoDateNew, #contactForm, #adminBox").hide();
});

function addStream(type)
{
	$(function() {
		$('#strBtn').click();
	});
}

