$(window).ready(function() {
	$('img.qr').hover(function() {
		$('span.qr').show();
		$('span.qr').hover(null, function() {
			$('span.qr').hide();
		});
	});
	$('.features').each(function(id, group) {
		tall = 0;
		wide = $(group).width();
		count = $(group).children('.feature').size();
		hdr = 0;
		$(group).children('.feature').each(function() {
			wide -= $(this).outerWidth(true) - $(this).width();
		});
		wide -= wide % count;
		wide /= count;
		if (($.browser.msie == false) || ($.browser.version.slice(0, 1) != "7")) wide -= count + 1;
		$(group).children('.feature').width(wide);
		$(group).children('.feature').each(function() {
			high = $(this).children('div').outerHeight(true);
			if ($(this).is(':has(.buttons)')) high += 16;
			if (high > tall) tall = high;
		});
		$(group).children('.feature').children('div').height(tall);
		if (($.browser.msie) && ($.browser.version.slice(0, 1) == "7")) {
			$(group).children('.feature').css("display", "inline");
			$(group).children('.feature').children('h1').css('display', 'inline');
		}
		$(group).children('.feature').each(function() {
			if ($(this).children('h1').height() > hdr) hdr = $(this).children('h1').height();
		});
		$(group).children('.feature').each(function() {
			$(this).children('.buttons').css('margin-top', - $(this).children('.buttons').outerHeight(true));
			$(this).children('.buttons').children('li:last').css('padding-right', 4);
			mgn = parseFloat($(this).children('h1').css('margin-top')) + hdr - $(this).children('h1').height();
			$(this).children('h1').css('margin-top', mgn);
		});
		$('li:has(a:only-child)').each(function() {
			$(this).css("cursor", "pointer");
			$(this).click(function() {
				eval("document.location.href('" + $(this).children("a:only-child").attr("href") + "');");
			});
		});
	});
	if (($.browser.msie) && ($.browser.version.slice(0, 1) == "7")) {
		$('.feature > h1').css('background-color', '#2A73B7');
		$('.slide div span').css('background-color', '#2A73B7');
		$('.slide h1 .pad').css('background-color', '#2A73B7');
	}
	$('#summary .feature > div').css({
		'height': $('#summary .feature > div').height(),
		'margin-top': -9
	});
});
