').css({visibility: 'hidden', width: 100, overflow: 'scroll'}).appendTo('body'),
widthWithScroll = $('
').css({width: '100%'}).appendTo($outer).outerWidth();
$outer.remove();
return 100 - widthWithScroll;
};
function resrc() {
$("img[data-src]").each(function(){
$path = $(this).attr("src").split("/");
$img = $path.pop();
$wxh = $path.pop();
$path = $path.join("/");
$resp = $(this).attr("data-src").split(",");
$wx=$wxh.split("x")[0];
i=0;while(i<$resp.length && $(this).width()>$wx) {$wxh = $resp[i]; $wx=$wxh.split("x")[0]; i++;}
$src = $path + "/" + $wxh + "/" + $img;
/* alert($src);*/
$(this).attr("src",$src);
});
}
function onresize() {
if($(window).width()<(screenWidth-scrollbarWidth)) {
$('#header').attr("style","").trigger('detach.ScrollToFixed');$(".fixer").remove();
if (!$("#switchMenu").hasClass("active")) {
$("#menu nav").hide(0);
}
if( $('#menu nav li.more .open-submenu').length == 0) {
$('#menu nav li.more').append('');
$('.open-submenu').on('click', function (e) {
e.preventDefault();
if ($(this).prev('ul').css('display') == 'none') {
$(this).prev('ul').show();
$(this).removeClass('sign-open');
$(this).html('');
} else {
$(this).prev('ul').hide();
$(this).addClass('sign-open');
$(this).html('');
}
});
}
} else {
$("#switchMenu").removeClass("active");
$("#menu nav").show(0);
$("#menu nav li.more").find(".open-submenu").remove();
$("#menu nav ul ul").hide();
/*$(".wrap-link").remove();*/
if($(document).height()>($(window).height()+$("#header").height()+$submenu.height())) {
$(".fixer").remove();
$("#header").attr("style","").scrollToFixed({dontSetWidth:true,spacerClass:"fixer"});
}
else {$('#header').attr("style","").trigger('detach.ScrollToFixed');$(".fixer").remove();}
}
/*
if($("#menu").length) menuOffset = Math.round($("#menu").offset().top);
menuHeight = $("#menu").height();
$(".fix").css({height:menuHeight+"px"});
*/
resrc();
}
var hash = "";
var menuOffset = 0;
var menuHeight = 0;
var $w = 0;
var $submenu = 0;
$(document).ready(function(){
mwh = $("#mapawrap").height();
if(!mwh) mwh = $("#bgfotowrap").height();
scrollbarWidth = getScrollBarWidth();
$submenu=$("#submenu");
$w = $(window).width();
$(window).on("resize",function(){onresize();})
//$("#main").disableSelection();
$("a").click(function(){$(this).blur();return true;});
outlinks();
$("body").removeClass("nojs").addClass("js");
$('select').has("option:selected:disabled").css({color:"#999"}).change(function(){$(this).css({color:"#000"});}).children("option").css({color:"#000"}).filter("option[disabled]").css({color:"#999"});
if($("body").hasClass("nojs")) {
} else { // desktop
// var s = skrollr.init({
// edgeStrategy: 'set',
// easing: {
// WTF: Math.random,
// inverted: function(p) {
// return 1-p;
// }
// }
// });
// $("#head").after("
");
$("#switchMenu").on("click",function() {
if($(this).hasClass("active")) {
$("#menu nav").slideUp(200);
$(this).removeClass("active");
} else {
$("#menu nav").slideDown(200);
$(this).addClass("active");
}
});
if($(window).width()<(screenWidth-scrollbarWidth)) {
$("#menu nav").hide(0);
if( $('#menu nav li.more .open-submenu').length == 0) {
$('#menu nav li.more').append('');
}
} else {
$("#menu nav").show(0);
$("#menu nav li.more .open-submenu").remove();
}
$('.open-submenu').on('click', function (e) {
e.preventDefault();
if ($(this).prev('ul').css('display') == 'none') {
$(this).prev('ul').show();
$(this).removeClass('sign-open');
$(this).html('');
} else {
$(this).prev('ul').hide();
$(this).addClass('sign-open');
$(this).html('');
}
});
$("#menu nav a").on("click",function() {
if($(window).width()<(screenWidth-scrollbarWidth)) $("#switchMenu").click();
});
$("#up").on("click",function(e){
e.preventDefault(); $.scrollTo(0,1000); return false;
});
if($(window).scrollTop()>20) $("#up").addClass("ukaz"); else if($("#up").removeClass("ukaz")) ; else $("#up").removeClass("ukaz");
$(window).on('scroll', function (e) {
var elements = document.querySelectorAll("*[data-imgakce-src]");
for (var i = 0; i < elements.length; i++) {
var boundingClientRect = elements[i].getBoundingClientRect();
if (elements[i].hasAttribute("data-imgakce-src") && boundingClientRect.top < window.innerHeight) {
elements[i].setAttribute("src", elements[i].getAttribute("data-imgakce-src"));
elements[i].removeAttribute("data-imgakce-src");
}
}
var elements2 = document.querySelectorAll("*[data-typakce1-src]");
for (var i = 0; i < elements2.length; i++) {
var boundingClientRect = elements2[i].getBoundingClientRect();
if (elements2[i].hasAttribute("data-typakce1-src") && boundingClientRect.top < window.innerHeight) {
elements2[i].setAttribute("src", elements2[i].getAttribute("data-typakce1-src"));
elements2[i].removeAttribute("data-typakce1-src");
}
}
var elements3 = document.querySelectorAll("*[data-typakce2-src]");
for (var i = 0; i < elements3.length; i++) {
var boundingClientRect = elements3[i].getBoundingClientRect();
if (elements3[i].hasAttribute("data-typakce2-src") && boundingClientRect.top < window.innerHeight) {
elements3[i].setAttribute("src", elements3[i].getAttribute("data-typakce2-src"));
elements3[i].removeAttribute("data-typakce2-src");
}
}
var elements4 = document.querySelectorAll("*[data-fz-imgakce-src]");
for (var i = 0; i < elements4.length; i++) {
var boundingClientRect = elements4[i].getBoundingClientRect();
if (elements4[i].hasAttribute("data-fz-imgakce-src") && boundingClientRect.top < window.innerHeight) {
elements4[i].setAttribute("src", elements4[i].getAttribute("data-fz-imgakce-src"));
elements4[i].removeAttribute("data-fz-imgakce-src");
}
}
var scrollPos = $(window).scrollTop();
if (scrollPos >= 30) {
var curlev = (scrollPos/mwh);
// brglev = (1-curlev)*maxbrg;
// brglev = (brglev>100) ? 100 : brglev;
var blurlev = (curlev*maxblur);
blurlev = (blurlev>maxblur) ? maxblur : blurlev;
$("#mapawrap,#bgfotowrap").css({filter:"blur("+blurlev+"px)","-webkit-filter":"blur("+blurlev+"px)"});
} else {
$("#mapawrap,#bgfotowrap").css({"filter":"none","-webkit-filter":"none"});
}
if($(".fixer").height()!=$("#header").height()) $(".fixer").css({height:$("#header").height()+"px"});
if($(window).scrollTop()>20) $("#up").addClass("ukaz"); else if($("#up").removeClass("ukaz")) ; else $("#up").removeClass("ukaz");
if($(window).scrollTop()<1) {}
if($submenu.length) {
if(($submenu).is(":visible") && $("#header.scroll-to-fixed-fixed").length) {
$submenu.slideUp(500, function() {if($(this).is(":hidden") && $("#header.scroll-to-fixed-fixed").length==0) $(this).slideDown(500);});
} else if(($submenu).is(":hidden") && $("#header.scroll-to-fixed-fixed").length==0) {
$submenu.slideDown(500);
}
}
/*
if($("#menu").length) {
if($("#menu").hasClass("fixed")) {
if($(window).scrollTop()
menuOffset) {$("#menu").addClass("fixed").next().css({display:"block"});}
else if($(window).scrollTop()<($("#menu").prev().offset().top + $("#menu").prev().height())) {if(window.location.hash) {history.replaceState({}, "", "#");}}
}
}
*/
});
}
// onresize();
resrc();
$("#show-on-map").on("click",function() {
$.scrollTo(0,500);$("#mapawrap").removeClass("schovat");$("#bgfotowrap").fadeOut(1000);
var fElem = $("#switchmap").find(".f");
if (!fElem.hasClass("hover")) {
fElem.addClass("hover");
}
});
$("#switchmap").on("click",function() {$.scrollTo(0,500);$("#mapawrap").removeClass("schovat");$("#bgfotowrap").fadeToggle(1000);});
if($(window).width()>=(screenWidth-scrollbarWidth)) {
if($(document).height()>($(window).height()+$("#header").height()+$submenu.height())) {$("#header").scrollToFixed({dontSetWidth:true,spacerClass:"fixer"/*,fixed:function(){window.setTimeout('$(".fixer").css({height:$("#header").height()+"px"});',250);}*/});}
}
//if(window.location.hash=="") $("#submenu").hide(0).delay(1000).slideDown(500);
});
/*
(function($){
$.fn.ctrl = function(key, callback) {
if(typeof key != 'object') key = [key];
callback = callback || function(){ return false; }
return $(this).keydown(function(e) {
var ret = true;
$.each(key,function(i,k){
if(e.keyCode == k.toUpperCase().charCodeAt(0) && e.ctrlKey) {
ret = callback(e);
}
});
return ret;
});
};
$.fn.disableSelection = function() {
$(window).ctrl(['a','s','c']);
return this.each(function() {
$(this).attr('unselectable', 'on')
.css({'-moz-user-select':'none',
'-o-user-select':'none',
'-khtml-user-select':'none',
'-webkit-user-select':'none',
'-ms-user-select':'none',
'user-select':'none'})
.each(function() {
$(this).attr('unselectable','on')
.bind('selectstart',function(){ return false; });
});
});
};
})(jQuery);
*/
function getElementsByClassJmeno(strClass, strTag, objContElm) {
strTag = strTag || "*";
objContElm = objContElm || document;
var objColl = objContElm.getElementsByTagName(strTag);
if (!objColl.length && strTag == "*" && objContElm.all) objColl = objContElm.all;
var arr = new Array();
var delim = strClass.indexOf('|') != -1 ? '|' : ' ';
var arrClass = strClass.split(delim);
for (var i = 0, j = objColl.length; i < j; i++) {
var arrObjClass = objColl[i].className.split(' ');
if (delim == ' ' && arrClass.length > arrObjClass.length) continue;
var c = 0;
comparisonLoop:
for (var k = 0, l = arrObjClass.length; k < l; k++) {
for (var m = 0, n = arrClass.length; m < n; m++) {
if (arrClass[m] == arrObjClass[k]) c++;
if (( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) {
arr.pushit(objColl[i]);
break comparisonLoop;
}
}
}
}
return arr;
}
Array.prototype.pushit = function(value) {
this[this.length] = value;
}
function protectit(cl,slovo) {
mejly = getElementsByClassJmeno(cl,'a');
for (var i = 0, j = mejly.length; i < j; i++) {
var mejl = (mejly[i].title) ? mejly[i].title.split(slovo) : mejly[i].innerHTML.split(slovo);
antiSpam.mailTo(mejly[i], {
email: mejl[0],
domain: mejl[1],
nameAsEmail: true
});
}
}
var antiSpam = {
toSeparatedString: function(obj, delimiter) {
if (!obj) return null;
if (typeof(obj) == 'string') return obj;
var res = '';
for (var i=0; i 0 && delimiter) res += delimiter;
res += obj[i];
}
return res;
},
mailTo: function(id, parameters) {
if (!parameters) return;
var a = id;
if (!a) return;
var email = parameters.email;
if (!email) return;
var domain = parameters.domain;
if (!domain) return;
realemail = email + '@' + domain;
email = email + '@' + domain;
a.href = 'mailto:' + realemail;
if (!parameters.name) {
if (parameters.nameAsEmail) { if(a.title=="") a.innerHTML = email; else a.title = email;}
} else a.innerHTML = parameters.name;
}
}
function outlink(href){
var evt = window.event;
if(href) var win = window.open(href);
if (win){
if (evt && evt.preventDefault) evt.preventDefault();
if (evt) evt.returnValue = false;
return false;
} else {
return true;
}
}
function outlinks(e) {
var hostname = window.location.hostname;
hostname = hostname.replace("www.","").toLowerCase();
$("body a").each(function(){href = String($(this).attr("href")).toLowerCase(); if((href.indexOf("https://")!=-1 || href.indexOf("http://")!=-1) && href.indexOf(hostname)==-1) $(this).not(".not").addClass("out");});
linky = getElementsByClassJmeno('out','a',document.getElementById(e));
for (var i = 0, j = linky.length; i < j; i++) {
// linky[i].setAttribute("target","_blank");
linky[i].setAttribute("onclick","return outlink(this.href)");
}
}
/* prevede datum na mysql format YYYY-MM-DD */
function prevodDatum(filtrDat) {
var resultDatum = "";
var filterDatArr = filtrDat.split(".").reverse();
for(i = 0; i < filterDatArr.length; i++){
if (i == 0) {
resultDatum = filterDatArr[i].trim();
} else {
resultDatum += "-" + filterDatArr[i].trim();
}
}
return resultDatum;
}
/* SCROLLTOFIXED */
(function(a){a.isScrollToFixed=function(b){return !!a(b).data("ScrollToFixed")};a.ScrollToFixed=function(d,i){var m=this;m.$el=a(d);m.el=d;m.$el.data("ScrollToFixed",m);var c=false;var H=m.$el;var I;var F;var k;var e;var z;var E=0;var r=0;var j=-1;var f=-1;var u=null;var A;var g;function v(){H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");f=-1;E=H.offset().top;r=H.offset().left;if(m.options.offsets){r+=(H.offset().left-H.position().left)}if(j==-1){j=r}I=H.css("position");c=true;if(m.options.bottom!=-1){H.trigger("preFixed.ScrollToFixed");x();H.trigger("fixed.ScrollToFixed")}}function o(){var J=m.options.limit;if(!J){return 0}if(typeof(J)==="function"){return J.apply(H)}return J}function q(){return I==="fixed"}function y(){return I==="absolute"}function h(){return !(q()||y())}function x(){if(!q()){var J=H[0].getBoundingClientRect();u.css({display:H.css("display"),width:J.width,height:J.height,"float":H.css("float")});cssOptions={"z-index":m.options.zIndex,position:"fixed",top:m.options.bottom==-1?t():"",bottom:m.options.bottom==-1?"":m.options.bottom,"margin-left":"0px"};if(!m.options.dontSetWidth){cssOptions.width=H.css("width")}H.css(cssOptions);H.addClass(m.options.baseClassName);if(m.options.className){H.addClass(m.options.className)}I="fixed"}}function b(){var K=o();var J=r;if(m.options.removeOffsets){J="";K=K-E}cssOptions={position:"absolute",top:K,left:J,"margin-left":"0px",bottom:""};if(!m.options.dontSetWidth){cssOptions.width=H.css("width")}H.css(cssOptions);I="absolute"}function l(){if(!h()){f=-1;u.css("display","none");H.css({"z-index":z,width:"",position:F,left:"",top:e,"margin-left":""});H.removeClass("scroll-to-fixed-fixed");if(m.options.className){H.removeClass(m.options.className)}I=null}}function w(J){if(J!=f){H.css("left",r-J);f=J}}function t(){var J=m.options.marginTop;if(!J){return 0}if(typeof(J)==="function"){return J.apply(H)}return J}function B(){if(!a.isScrollToFixed(H)||H.is(":hidden")){return}var M=c;var L=h();if(!c){v()}else{if(h()){E=H.offset().top;r=H.offset().left}}var J=a(window).scrollLeft();var N=a(window).scrollTop();var K=o();if(m.options.minWidth&&a(window).width()m.options.maxWidth){if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}else{if(m.options.bottom==-1){if(K>0&&N>=K-t()){if(!L&&(!y()||!M)){p();H.trigger("preAbsolute.ScrollToFixed");b();H.trigger("unfixed.ScrollToFixed")}}else{if(N>=E-t()){if(!q()||!M){p();H.trigger("preFixed.ScrollToFixed");x();f=-1;H.trigger("fixed.ScrollToFixed")}w(J)}else{if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}}}else{if(K>0){if(N+a(window).height()-H.outerHeight(true)>=K-(t()||-n())){if(q()){p();H.trigger("preUnfixed.ScrollToFixed");if(F==="absolute"){b()}else{l()}H.trigger("unfixed.ScrollToFixed")}}else{if(!q()){p();H.trigger("preFixed.ScrollToFixed");x()}w(J);H.trigger("fixed.ScrollToFixed")}}else{w(J)}}}}}function n(){if(!m.options.bottom){return 0}return m.options.bottom}function p(){var J=H.css("position");if(J=="absolute"){H.trigger("postAbsolute.ScrollToFixed")}else{if(J=="fixed"){H.trigger("postFixed.ScrollToFixed")}else{H.trigger("postUnfixed.ScrollToFixed")}}}var D=function(J){if(H.is(":visible")){c=false;B()}else{l()}};var G=function(J){(!!window.requestAnimationFrame)?requestAnimationFrame(B):B()};var C=function(){var K=document.body;if(document.createElement&&K&&K.appendChild&&K.removeChild){var M=document.createElement("div");if(!M.getBoundingClientRect){return null}M.innerHTML="x";M.style.cssText="position:fixed;top:100px;";K.appendChild(M);var N=K.style.height,O=K.scrollTop;K.style.height="3000px";K.scrollTop=500;var J=M.getBoundingClientRect().top;K.style.height=N;var L=(J===100);K.removeChild(M);K.scrollTop=O;return L}return null};var s=function(J){J=J||window.event;if(J.preventDefault){J.preventDefault()}J.returnValue=false};m.init=function(){m.options=a.extend({},a.ScrollToFixed.defaultOptions,i);z=H.css("z-index");m.$el.css("z-index",m.options.zIndex);u=a("");I=H.css("position");F=H.css("position");k=H.css("float");e=H.css("top");if(h()){m.$el.after(u)}a(window).bind("resize.ScrollToFixed",D);a(window).bind("scroll.ScrollToFixed",G);if("ontouchmove" in window){a(window).bind("touchmove.ScrollToFixed",B)}if(m.options.preFixed){H.bind("preFixed.ScrollToFixed",m.options.preFixed)}if(m.options.postFixed){H.bind("postFixed.ScrollToFixed",m.options.postFixed)}if(m.options.preUnfixed){H.bind("preUnfixed.ScrollToFixed",m.options.preUnfixed)}if(m.options.postUnfixed){H.bind("postUnfixed.ScrollToFixed",m.options.postUnfixed)}if(m.options.preAbsolute){H.bind("preAbsolute.ScrollToFixed",m.options.preAbsolute)}if(m.options.postAbsolute){H.bind("postAbsolute.ScrollToFixed",m.options.postAbsolute)}if(m.options.fixed){H.bind("fixed.ScrollToFixed",m.options.fixed)}if(m.options.unfixed){H.bind("unfixed.ScrollToFixed",m.options.unfixed)}if(m.options.spacerClass){u.addClass(m.options.spacerClass)}H.bind("resize.ScrollToFixed",function(){u.height(H.height())});H.bind("scroll.ScrollToFixed",function(){H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");B()});H.bind("detach.ScrollToFixed",function(J){s(J);H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");a(window).unbind("resize.ScrollToFixed",D);a(window).unbind("scroll.ScrollToFixed",G);H.unbind(".ScrollToFixed");u.remove();m.$el.removeData("ScrollToFixed")});D()};m.init()};a.ScrollToFixed.defaultOptions={marginTop:0,limit:0,bottom:-1,zIndex:1000,baseClassName:"scroll-to-fixed-fixed"};a.fn.scrollToFixed=function(b){return this.each(function(){(new a.ScrollToFixed(this,b))})}})(jQuery);
/* ACTUAL.JS */
/*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 1.0.18
*
* Requires: jQuery >= 1.2.3
*/
(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a);
}else{a(jQuery);}}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf;a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';
}var f={absolute:false,clone:false,includeMargin:false,display:"block"};var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; ";
e=e.clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().addBack().filter(":hidden");
d+="visibility: hidden !important; display: "+i.display+" !important; ";if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this);
var n=m.attr("style");g.push(n);m.attr("style",n?n+";"+d:d);});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style");
}else{o.attr("style",n);}});};}h();var k=/(outer)/.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});}));
/* SCROLLTO.JS */
/**
* Copyright (c) 2007-2015 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com
* Licensed under MIT
* @author Ariel Flesler
* @version 2.1.1
*/
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1