$(document).ready(function(){

	// Reset Font Size
	var originalFontSize = $('html').css('font-size');
	$(".resetFont").click(function(){
	$('html').css('font-size', originalFontSize);
	});
	
	// Increase Font Size
	$(".increaseFont").click(function(){
		var currentFontSize = $('html').css('font-size');
		var currentFontSizeNum = parseFloat(currentFontSize, 10);
	var newFontSize = currentFontSizeNum*1.2;
	$('html').css('font-size', newFontSize);
	return false;
	});
	
	// Decrease Font Size
	$(".decreaseFont").click(function(){
		var currentFontSize = $('html').css('font-size');
		var currentFontSizeNum = parseFloat(currentFontSize, 10);
	var newFontSize = currentFontSizeNum*0.8;
	$('html').css('font-size', newFontSize);
	return false;
	});

	// search boxes autofill setup
	$('form#searchform input#s').autofill({
		value: 'Search Arts NSW',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});

	// About us
	$('#topnav li#pos0 form.searchform input.s').autofill({
		value: 'Search \'About us\'',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});	

	// Funding and support
	$('#topnav li#pos1 form.searchform input.s').autofill({
		value: 'Search \'Funding and support\'',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});	

	// The Arts in NSW
	$('#topnav li#pos2 form.searchform input.s').autofill({
		value: 'Search \'The Arts in NSW\'',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});	

	// Creative spaces
	$('#topnav li#pos3 form.searchform input.s').autofill({
		value: 'Search \'Creative spaces\'',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});	

	// Resources
	$('#topnav li#pos4 form.searchform input.s').autofill({
		value: 'Search \'Resources\'',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});	

	// News and publications
	$('#topnav li#pos5 form.searchform input.s').autofill({
		value: 'Search \'News and publications\'',
		defaultTextColor: '#484848',
		activeTextColor: '#484848'
	});	
});

