// remap jQuery to $
(function($){

	//$("#homeInfo img").fadeTo("fast", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads

	$("#homeInfo img, #sidebar img.promo, article.post .sermon-series-listing .sermon-series-image").hover(function(){
		$(this).stop().fadeTo("fast", .75); // This should set the opacity to 100% on hover
	},function(){
   		$(this).stop().fadeTo("fast", 1); // This should set the opacity back to 60% on mouseout
	});
	
	$('#header nav ul li a:not(ul.children li a)').each(function(){
		var links = $(this);
		links.html( links.text().replace(/(^\w+)/,'<span class="navHighlight">$1</span>') );
  	});



	//DROPDOWN MENU
    $("#header nav li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("#header nav li ul li:has(ul)").find("a:first").append(" &raquo; ");
 


	//SERMON TABLE STRIPING
	$(".sermon-series-listing tr").mouseover(function(){$(this).addClass("over");}).mouseout(function(){$(this).removeClass("over");});
    $(".sermon-series-listing tr:nth-child(even)").addClass("even-stripe");
	
	//SERMON ESV TEXT READ MORE
	$('p.view-sermon-passage').click(function(){
        $('div.esv').slideToggle();
    });

})(window.jQuery);
