jQuery(function ($) {
    
	var lg = $("#lg a"),
	op_on = 1,
	op_off = 0.5,
	op_this = 0;
	
	lg.each(function(i) {
		if(! $(this).hasClass('on')) {
			$(this).css({opacity:0.5});
		}
			
		$(this).hover(function() {
			op_this = $(this).css('opacity');
			
			$(this).css({opacity:op_on});
			
			}, function() {
			
			$(this).css({opacity:op_this});
			
			});
			
		});
});

