jQuery(document).ready(function() {
	jQuery('.content-bottom .content-block:last').addClass('last');
	jQuery('.main-nav .menu li a').wrapInner('<span/>');
	jQuery('.content .sidebar .widget:last').addClass('last');
	
	jQuery(".content-bottom .content-block").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		jQuery(this).find("div.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		jQuery(this).find("span.more-info").css({'background-position':'left bottom', 'color' : '#ffffff'});

		//Animate the image to 0 opacity (fade it out)
		jQuery(this).find(".thumb span").stop().fadeTo('normal', 0 , function() {
			jQuery(this).hide() //Hide the image after fade
		});
	}, function() { //on hover out...
		//Fade the image to full opacity 
		jQuery(this).find(".thumb span").stop().fadeTo('normal', 1).show();
		jQuery(this).find("span.more-info").css({'background-position':'left top', 'color' : '#323133'});
	});
	
	jQuery('#current-events tbody tr:odd').addClass('odd');
	jQuery('#post-237 .linkcattitle').remove();
	
	// iOS Hover Event Class Fix
	if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		jQuery(".team-list li a").click(function(){  // Update class to point at the head of the list
			jQuery('.team-list li a .thumb').css('display','block');
		});
	}

}); 
