$(function(){		
		//Takes all the nav items with subnav elements and adds appropriate accordian classes
		$('#navigation li a').each(function(){			
			if($(this).siblings('ul').length == 1){
				$(this).addClass('head').addClass('acrdnParent');
			}
		});
		
		//Removes previously assigned accordian classes from subnav items 
		$('#navigation ul ul a').removeClass('head').removeClass('acrdnParent');
		
		//Adds background color hover state to parent nav items when subnav items are being hovered over 
		$('#navigation ul li').hover(function(){
			$(this).children('a.acrdnParent').css('background','#334D8D url(/wp-content/themes/default/images/arrow2.gif) no-repeat 95%');
		},function(){
			$(this).children('a.acrdnParent').css('background','#0B2464 url(/wp-content/themes/default/images/arrow.gif) no-repeat 95%');
		});
		
		//The parent UL of the current subnav nav element will always show even if other subnavs are opening and closing (
		//done by removing the 'head' class which the accordian plugin uses to add functionality)
		$('.current_page_item').parent().addClass('showMe');
		$('.showMe').siblings('a').removeClass('head').attr('href','javascript:void');

		
		//Assigns accordian class to navigation
		$('#navigation').accordion({ 
			autoHeight: false,
			active: false,
			header: '.head',
			navigation: true
		});
	
		//Removes animation if using Internet Explorer (because animation was causing bugs)
		if($.browser.msie){
			$('#navigation').accordion('option', 'animated',false);
		}
		
		$(".mp3").jmp3({
			showfilename: "false",
			width: 25,
			backcolor: "0B2464"
		});
		
		if ($.browser.safari) {
			$('#sound').css('bottom', '0');
			var ua = navigator.userAgent.toLowerCase();
			if (ua.indexOf("macintosh") != -1) {
				$('#cell-two').css('width', '154px');
			}	
		}
	});