//easingScroll
$(function(){
	$("a[href*='#']").easingScroll({
	easing: "easeOutQuad",
	duration: 400
			});
});

//SlideDownMenu
$(document).ready(function() {
			
function HoverOver(){
    $(this).find(".subnav").stop().slideDown('fast').show(); //Find sub and fade it in
}
//On Hover Out
function HoverOut(){
  $(this).find(".subnav").stop().slideUp('fast', function() { //Fade to 0 opactiy
      $(this).hide();  //after fading, hide it
  });
}

//Set custom configurations
var config = {    
     sensitivity: 10, // number = sensitivity threshold (must be 1 or higher)    
     interval: 100, // number = milliseconds for onMouseOver polling interval    
     over: HoverOver, // function = onMouseOver callback (REQUIRED)    
     timeout: 100, // number = milliseconds delay before onMouseOut    
     out: HoverOut // function = onMouseOut callback (REQUIRED)    
};

$("#gn ul li").hoverIntent(config); //Trigger Hover intent with custom configurations
			
});


//tabs
$(document).ready(function() {

	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li[name='show']").addClass("active").show(); //Activate first tab
	$(".tab_content[name='show']").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});

//image_mouseOver
$(document).ready(function() {
  $("a.tn img").fadeTo("fast",1.0)
  .hover( 
    function(){// }EXI[o[
      $(this).fadeTo("fast", 0.7);
    },
    function(){// }EXAEg
      $(this).fadeTo("fast", 1.0);
    }
  );
});
	
//accordion
$(document).ready(function() {
	$(".faqContainer dt").hover(function(){
		$(this).css("cursor","pointer"); 
	},function(){
		$(this).css("cursor","default"); 
		});
	$(".faqContainer dd").css("display","none");
	$(".faqContainer dt").click(function(){
		$(this).next().slideToggle("fast");
		});
});