(function($) {
	$('.expand .more-information').css({ opacity: 0 });

	$('.expand').live('mouseover', function(e) {
		$(this).find('.more-information').addClass('hover').animate({
			opacity: 0.7
		}, 150 * (e.shiftKey ? 3 : 1));
	}).live('mouseout', function(e) {
		var info = $(this).find('.more-information').removeClass('hover');
		setTimeout(function() {
			if(info.hasClass('hover')) {
				return;
			}
			info.animate({
				opacity: 0
			}, 150 * (e.shiftKey ? 3 : 1));
		}, 100);
	}).live('click', function(e) {
		window.location = $(this).find('a').attr('href');
	});

	$(function() {
		var height = 0;
		if($('#cb').is('.ie6') || $('#cb').is('.ie7')) {
			var isIE6 = (function() { return $('#cb').is('.ie6') })();
			$('.more-information').each(function(i, panel) {
				if($('#cb').is('.ie6')) {
					$(panel).width($(panel).parents('li').width());
				}
				var panelHeight = isIE6 ? $(panel).height() : panel.offsetHeight;
				if(panelHeight > height) {
					height = panelHeight;
				}
			});
			$('#lr-nav, #lr-nav div, #lr-nav ul, #lr-nav li').height(height);
		}
	});
})(jQuery);