// JavaScript Document
$(document).ready(function(){
	 /*$("#example ul").tabs();*/
	$("div.dropShadow").wrap("<div id='shadow-container'><div class='shadow1'><div class='shadow2'><div class='shadow3'></div></div></div></div>");
	$("div.topicBox_dyk .topicboxContent").hide();
	
	/*$("div#navigation > ul").addClass("nav");*/
	    
	$("#graphic1_text").mouseover(
	    function(){
	        $(this).css({"border":"1px solid #CCC"});
	        
	        }).mouseout(function(){
	        $(this).css({"border":"none"});
	        });
	        
	$("div.topicBox_dyk h1 a").click(function()
	{
		$("div.topicBox_dyk .topicboxContent").slideToggle("slow");
	});
		
	$("ul.nav").superfish({
		
		animation	: {opacity:"show"},
		speed		: "normal",
		disableHI   : false,              // set to true to disable hoverIntent detection 
	    autoArrows	: false
	   
	});
	$("ul.appDrop").superfish({
		delay		: 0,
		animation	: {opacity:"show"},
		speed		: "fast",
		disableHI   : true,              // set to true to disable hoverIntent detection
		autoArrows	: false
		
	});     

    //Code that toggles answers on FAQ pages
    //hide answers on page load
	$(".faqList .answer").hide();
	
	//toggle answers	
	$(".question").click(function(){
		$(this).next(".answer").slideToggle(100)
		return false;
	});
	//keeps arrow highlighted when answer is open. DOESN'T WORK WITH HOVER
//	$(".question").toggle(
//		  function(){
//		   $(this).siblings("img").attr("src","/images/9x8Navtree_Selected.gif");
//		  },
//		  function(){
//		  $(this).siblings("img").attr("src","/images/9x8Navtree.gif")
//		  }
//		  );  
    
    //CHANGES ARROW TO RED ON HOVER
    $(".faqList li").hover(
        function() {
        $(this).find("img:first").attr("src","/images/9x8Navtree_Selected.gif");
        }, function(){
        $(this).find("img:first").attr("src","/images/9x8Navtree.gif");
        })
});
 