// jQuery Document

$(document).ready(function()
{	
	
	//hide drop down menus on doc ready
	$('ul.submenu').hide();	
	
	//add actions for hover actions
	$('#navigation > li').hover(function()
	{
		$(this).find('ul.submenu').show();
	},function()
	{
		$('ul.submenu').hide();
	});	
	
	//text resize functionality
	$('span#medium').addClass('selected'); //when page loads set medium to be selected by default
	
	$('span.textresize').click(function()
	{	
		$('span.textresize').removeClass('selected'); 	//remove all selected classes
		$('p').removeClass('small');  					//remove any classes from the body tag		
		$('p').removeClass('large');  					//remove any classes from the body tag
		$('div.promo').removeClass('promolargeheight');	  //rmoev large size for largetext
		
		if(this.id=='small')
		{
			$(this).addClass('selected'); 				//highlight as selected
		    $('p').addClass('small');					//resize text small		
		}		
		else if (this.id=='large')
		{	
			$(this).addClass('selected');  				//highlight as selected
			$('p').addClass('large');					//resize text large	
			$('div.promo').addClass('promolargeheight');											//set the size of the boxes
		}
		else if (this.id=='medium')
		{
			$(this).addClass('selected');				 //highlight as selected
		}
	});
    
	//hover on text resize element
	$('span.textresize').hover(function()
	{
		$(this).addClass('underline');				
	},function()
	{
		$(this).removeClass('underline');		
	});
});