/*$(function() {
	$("#hpBanner").each(function() {
		var photos = $(this).find("a");
		if (photos.length < 2) return;
		photos.css({ position: "absolute", top: 0, left: 0, zIndex: 0 });
		photos.slice(1).hide();
		setInterval(function() {
			var visible = photos.filter(":visible").eq(0);
			photos.not(visible).hide();
			var next = (visible.next().length > 0 ? visible.next() : photos.eq(0));
			visible.css({ zIndex: 1 });
			next.css({ zIndex: 0 });
			visible.fadeOut(1000);
			next.fadeIn(1000);
		}, 5000);
	});
});*/

// popup na srodku ekranu
function popup(url, w, h) {
	if (screen.availHeight) {
		var left = (screen.availWidth - w) / 2;
		var top = (screen.availHeight - h) / 2;
	} else {
		var left = (screen.width - w) / 2;
		var top = (screen.height - h) / 2;
	}

	if (left < 0) left = 30;
	if (top < 0) top = 30;
	
	window.open(url,'', 'width='+ w +',height='+h+',top='+top+',left='+left
		+',resizable=yes,scrollbars=yes');
	return false;
}