$(document).ready(function(){  

//$("ul.subnav").parent().append("<span><span>");

$("#featured_content ul li a img, .module_cat_books_single img").hover(function() {
	  $(this).stop().animate({ opacity: "1", "top": "-2px"}, 200);
	}, function() {
	  $(this).stop().animate({ opacity: "0.8", "top": "-0px"}, 200);
	});
	
	$(".entry_featured_image").hover(function() {
		  $(this).stop().animate({ opacity: "1"}, 400);
		}, function() {
		  $(this).stop().animate({ opacity: "0.8"}, 400);
		});
	
//$(".topnav li").addClass("active");

//$(".topnav li").addClass("active"); .css("background-image", "1px solid red").animate({ "margin-left": "20px" }, 300);

 //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  
	
	$("ul.topnav li").hover(function() {
		$(this).addClass("topnav_hover");
	}, function() {
		$(this).removeClass("topnav_hover");
	});
	
	
	
    $("ul.topnav li a").hover(function() { //When trigger is clicked...  
  
	
  
        //Following events are applied to the subnav itself (moving subnav up and down)  
        $(this).parent().find("ul.subnav").show(); //Drop down the subnav on click  
  
        $(this).parent().hover(function() {  
        }, function(){  
            $(this).parent().find("ul.subnav").hide(); //When the mouse hovers out of the subnav, move it back up  
        });  
  
        //Following events are applied to the trigger (Hover events for the trigger)  
        }).hover(function() {  
            $(this).addClass(""); //On hover over, add class "subhover"  
        }, function(){  //On Hover Out  
            $(this).removeClass(""); //On hover out, remove class "subhover"  
    }); 

});


