// JavaScript Document
$(document).ready(function() {
	
	$("#navigation ul").superfish({
		animation : { height:"toggle" },
		delay: 300, 
		speed: "fast"
	});
	
	// Reset Font Size
	var originalFontSize = parseInt( $('html').css('font-size') );
	var maxFontSize		 = parseInt(originalFontSize * 1.15);
	var minFontSize		 = parseInt(originalFontSize * 0.85);
	
	$(".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);

		if ( currentFontSizeNum < maxFontSize )
			var newFontSize 	= currentFontSizeNum + 1;

		$('html').css('font-size', newFontSize);
		return false;
	});
	// Decrease Font Size
	$(".decreaseFont").click(function(){
		var currentFontSize 	= $('html').css('font-size');
		var currentFontSizeNum 	= parseFloat(currentFontSize, 10);
		
		if ( currentFontSizeNum > minFontSize )
			var newFontSize 	= currentFontSizeNum - 1;		
		
		$('html').css('font-size', newFontSize);
		return false;
	});
});
