// JavaScript Document

$(function(){
		 
		   $('#navigation li a').append('<span class="hover"></span>')
		   
		   $('#navigation li a').hover(function() {
	        
		// Stuff that happens when you hover on + the stop()
		$('.hover', this).stop().animate({
			'opacity': 1
			}, 400,'easeOutSine')
	
	},function() {
	
		// Stuff that happens when you unhover + the stop()
		$('.hover', this).stop().animate({
			'opacity': 0
			}, 400, 'easeOutQuad')
	
	})
		   });
		   
		   
$(document).ready(function(){

	
$("ul.topnav li a").mouseover(function(){ 
	$(this).parent().find("ul.subnav").stop(true, true).slideDown('medium').show(); //Drop down the subnav on click

	$(this).parent().hover(function(){
		}, function(){	
			$(this).parent().find("ul.subnav").slideUp('medium'); //When the mouse hovers out of the subnav, move it back up
		});
	});

});
