document.write('<style type="text/css">.hide-from-js{display:none}</style>');

// fill in captcha code
$(document).ready(function () {
  window.setTimeout(function () {
  
    if ($('#captchaCode').length) {
      $.get(HTTP_PATH+'/libs/securimage/AJAX_captcha.php', function (data) {
        $('#captchaCode').val(data);
      });
    }
  }, 1000);
});

$(document).ready(function() {
  $("a.fotogalery").fancybox({'overlayOpacity':0.7});
});


$(document).ready(partnerLinkOpenInWindow);
function partnerLinkOpenInWindow () {
  // every link in partners open in new window
  $('#partners').find('a').bind('click', function () {
    window.open($(this).attr('href'));
    return false;
  });
}


function setCookie(cookieName, cookieValue, expires, path, domain, secure) {
  if (!expires) {
  	var dnes = new Date();
  	var expires = new Date(dnes.getTime() + 1000 * 60 * 60 * 24); // za 24 hodin
  }
	document.cookie =
		escape(cookieName) + '=' + escape(cookieValue)
		+ (expires ? '; expires=' + expires.toGMTString() : '')
		+ (path ? '; path=' + path : '; path=/')
		+ (domain ? '; domain=' + domain : '')
		+ (secure ? '; secure' : '');
	//alert(document.cookie)
}
function getCookie(cookieName) {
	var cookieValue = '';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}
	return (cookieValue);
}


