$(document).ready(function() {
                                $(".highlight").removeClass("highlight").find("a").append("<span class='hover' />").each(function(){
                                                var $span = $("> span.hover", this).css("opacity", 0);
                                                $(this).hover(
                                                                function(){
                                                                                $span.stop().fadeTo(150, 1);
                                                                },
                                                                function(){
                                                                                $span.stop().fadeTo(150, 0);
                                                                }
                                                );
                                });
});

$(document).ready(function() {
	
	$('.homeIcon').hover(
		function(){
			var currentBtn = $(this);
			$('#homeIcons div.homeIcon').each(function(){
				$(this).removeClass('selected');
			});
			$(currentBtn).addClass('selected');
			
			$('#homeIcons div.homeIcon img.fade').each(function(){
				$(this).stop().animate({opacity: 0.3}, 500);
			});
			
			$('#homeIcons .homeIcon .rollover').each(function(){
				//$(this).stop().animate({marginTop: "0px"}, 500);
				$(this).stop().animate({opacity: 0.3}, 500);
			});
			
			//$(this).find('.rollover').stop().animate({marginTop: "-19px"}, 500);
			$(this).find('.rollover').stop().animate({opacity: 1}, 500);
			$(this).find('img.fade').stop().animate({opacity: 1}, 500);
		},
		function(){
			//$(this).find('.rollover').stop().animate({marginTop: "0px"}, 500);
			$(this).find('img.fade').stop().animate({opacity: 0.3}, 500);
		}
	);
	
	$('#homeIcons').hover(
		function(){
			//
		},
		function(){
			$('#homeIcons div.homeIcon').each(function(){
				//$(this).find('.rollover').stop().animate({marginTop: "-19px"}, 500);
				$(this).find('.rollover').stop().animate({opacity: 1}, 500);
				$(this).find('img.fade').stop().animate({opacity: 1}, 500);
			});		
		}
	);

})
