jQuery(document).ready(function(){
	jQuery(window).load(function() {
	var test = jQuery('#wrapper').css('height');
	var test2 = jQuery('#wrapper').height();
	//if (test == 'auto') {
		test = test2+'px';
	//}
	jQuery('#dolni-pozadi').css('height', test);
	if (test2 > 230) {
		jQuery('#dolni-pozadi').css('display', 'block');
	}
	if (test2 <= 230) {
		jQuery('#dolni-pozadi').css('display', 'none');
	}
	test3 = test2 - 89;
	test4 = test3+'px';
	jQuery('#footer').css('top', test4);
	jQuery('#footer').css('display', 'block');
	jQuery(window).resize(function() {
		test = jQuery('#wrapper').css('height');
		test2 = jQuery('#wrapper').height();
		test = test2+'px';
		jQuery('#dolni-pozadi').css('height', test);
		if (test2 > 230) {
			jQuery('#dolni-pozadi').css('display', 'block');
		}
		if (test2 <= 230) {
			jQuery('#dolni-pozadi').css('display', 'none');
		}
		test3 = test2 - 89;
		test4 = test3+'px';
		jQuery('#footer').css('top', test4);
		jQuery('#footer').css('display', 'block');
	});
	jQuery('#wrapper').resize(function() {
		test = jQuery('#wrapper').css('height');
		test2 = jQuery('#wrapper').height();
		test = test2+'px';
		jQuery('#dolni-pozadi').css('height', test);
		if (test2 > 230) {
			jQuery('#dolni-pozadi').css('display', 'block');
		}
		if (test2 <= 230) {
			jQuery('#dolni-pozadi').css('display', 'none');
		}
		test3 = test2 - 89;
		test4 = test3+'px';
		jQuery('#footer').css('top', test4);
		jQuery('#footer').css('display', 'block');
	});
	jQuery('#sidebar').bind("resize", function() {
		test = jQuery('#wrapper').css('height');
		test2 = jQuery('#wrapper').height();
		test = test2+'px';
		jQuery('#dolni-pozadi').css('height', test);
		if (test2 > 230) {
			jQuery('#dolni-pozadi').css('display', 'block');
		}
		if (test2 <= 230) {
			jQuery('#dolni-pozadi').css('display', 'none');
		}
		test3 = test2 - 89;
		test4 = test3+'px';
		jQuery('#footer').css('top', test4);
		jQuery('#footer').css('display', 'block');
	});	
	});
	jQuery('td.svatek').mouseenter(function() {
		jQuery(this).find("div.stred").css('display', 'block');
	  }).mouseleave(function(){
		  jQuery(this).find("div.stred").css('display', 'none');
	  });
	jQuery('div.stred').mouseenter(function() {
		jQuery(this).css('display', 'none');
	  });	
});
