jQuery.fn.center = function () {

	return this.each(function () {
		var t = jQuery(this);
		t.css({
			left:jQuery(window).scrollLeft()+ (jQuery(window).width()/2) - (t.outerWidth() / 2)
		});
	});
};
 $(document).ready(function() {

$("#main").center();
$("#menuContainer").css({
left:$("#main").position().left-150
});
var a =$("#stopka").position().top;

var hStopka =$("#stopka").height();
var hLogo =$("#logo").height();
var hTresc=$("#trescContent").height();
var hMain=$("#main").height();
if (hTresc>hMain)
{
	$("#main").css({height:hTresc+hStopka+hLogo});
}


if(a<600) a=700;
var b=jQuery(window).height();
if (a<b)
{

	$("#stopka").css({
	top:(b-a)-10
});

}
$("#linia").hide();

});
