
$(document).ready(function() {

  var height = $("#cont").height();        
  
  //alert(height);  
  
  var lms = document.getElementById('znacky-cnt');
  lms.style.height = height+'px';

  /*$("#left").css("height", height+500+"px");
  $("#menu_left_space").css("height", height+10+"px");*/



$('img.rounded').one('load',function () {
	var img = $(this);
	var img_width = img.width();
	var img_height = img.height();
	
	// build wrapper
	var wrapper = $('<div class="rounded_wrapper"></div>');
	wrapper.width(img_width);
	wrapper.height(img_height);
	
	// move CSS properties from img to wrapper
	wrapper.css('float', img.css('float'));
	img.css('float', 'none')
	
	wrapper.css('margin-right', img.css('margin-right'));
	img.css('margin-right', '0')

	wrapper.css('margin-left', img.css('margin-left'));
	img.css('margin-left', '0')

	wrapper.css('margin-bottom', img.css('margin-bottom'));
	img.css('margin-bottom', '0')

	wrapper.css('margin-top', img.css('margin-top'));
	img.css('margin-top', '0')

	wrapper.css('display', 'block');
	img.css('display', 'block')

	// IE6 fix (when image height or width is odd)
	if ($.browser.msie && $.browser.version == '6.0')
	{
		if(img_width % 2 != 0)
		{
			wrapper.addClass('ie6_width')
		}
		if(img_height % 2 != 0)
		{
			wrapper.addClass('ie6_height')			
		}
	}

	// wrap image
	img.wrap(wrapper);
	
	// add rounded corners
	img.after('<div class="tl"></div>');
	img.after('<div class="tr"></div>');
	img.after('<div class="bl"></div>');
	img.after('<div class="br"></div>');
}).each(function(){
	if(this.complete) $(this).trigger("load");
});
	
});




function mouseX(evt) {
if (evt.pageX) return evt.pageX;
else if (evt.clientX)
   return evt.clientX + (document.documentElement.scrollLeft ?
   document.documentElement.scrollLeft :
   document.body.scrollLeft);
else return null;
}

function mouseY(evt) {
if (evt.pageY) return evt.pageY;
else if (evt.clientY)
   return evt.clientY + (document.documentElement.scrollTop ?
   document.documentElement.scrollTop :
   document.body.scrollTop);
else return null;
}






function showDetail(url,w,h){

	wasOpen  = false;
  if ( (0<w) && (0<h) )
  {
	 win = window.open(url,'detail','left='+(screen.width/2-w/2)+', top='+(screen.height/2-h/2)+', width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
	else
	{
    win = window.open(url);
  }
	win.focus();
  return (typeof(win)=='object')?true:false;

}       




function showBubble(text, event)
{
	document.getElementById('bubble').innerHTML=text;
	document.getElementById('bubble').style.display='block';
	document.getElementById('bubble').style.margin=(mouseY(event)-80)+'px 0 0 '+(mouseX(event)-180)+'px';
}

function hideBubble()
{
	document.getElementById('bubble').style.display='none';
}

 function Rozbal(id)
 {
  var obj = document.getElementById('elem'+id);
  if(obj.style.display == 'none')
   obj.style.display = 'block';
  else
   obj.style.display = 'none'
 }
 function SbalVse()
  {
 	  var elems =new Array(1, 2, 3, 301, 3011, 302, 303, 304, 3041, 305, 306, 3061, 3062, 3063, 4, 401, 402, 403, 404,405,406,407,408, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,16);
     for(i=0; i < elems.length; i++)
     {
  	   var obj = document.getElementById('elem'+ elems[i]);
       obj.style.display = 'none';
  	 }
    
  }
 function SbalVse2()
  {
 	  //var elems =new Array(1, 2, 3, 301, 3011, 302, 303, 304, 3041, 305, 306, 3061, 3062, 3063, 4, 401, 402, 403, 404,405,406,407,408, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
     for(i=1; i < 28; i++)
     {
  	   var obj = document.getElementById('elem'+ i);
       obj.style.display = 'none';
  	 }
    
  }
  function RozbalVse()
  {
 	  var elems =new Array(1, 2, 3, 301, 3011, 302, 303, 304, 3041, 305, 306, 3061, 3062, 3063, 4, 401, 402, 403, 404,405,406,407,408, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,16);
     for(i=0; i < elems.length; i++)
     {
  	   var obj = document.getElementById('elem'+ elems[i]);
       obj.style.display = 'block';
  	 }
    
  }
    function RozbalVse2()
  {
 	  //var elems =new Array(1, 2, 3, 301, 3011, 302, 303, 304, 3041, 305, 306, 3061, 3062, 3063, 4, 401, 402, 403, 404,405,406,407,408, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
     for(i=1; i < 28; i++)
     {
  	   var obj = document.getElementById('elem'+ i);
       obj.style.display = 'block';
  	 }
    
  }

