$(document).ready(function() {
	// Skrypt do obsługi linków otwieranych w nowej karcie (ver 2)
	$("a[rel=external]")
		.addClass("external")
		.click(function() {
			var href = $(this).attr('href');
	
			var prefix1 = "http://";
			var prefix2 = "https://";
	
			var new_href = href;
			if ((href.search(prefix1) == -1)&&(href.search(prefix2) == -1)) {
				new_href = prefix1 + href;
			}
			window.open(new_href);
			return false;
		});
});

$(window).load(function() {
	// skrypt ustawiający boxy na głównej równo
    setEqualHeight('.gimme_same_height h3');
    setEqualHeight('.gimme_same_height');
});

function setEqualHeight($selector) {
	var max_height = 0;
	$($selector).each(function() {
		var this_height = $(this).height();
		if (this_height > max_height) max_height = this_height; 
	});
	$($selector).css('height',max_height+'px');
}

