(function(a){a.fn.lightBox=function(p){p=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageLoading:"images/lightbox-ico-loading.gif",imageBtnPrev:"images/lightbox-btn-prev.gif",imageBtnNext:"images/lightbox-btn-next.gif",imageBtnClose:"images/lightbox-btn-close.gif",imageBlank:"images/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},p);var i=this;function r(){o(this,i);return false}function o(v,u){a("embed, object, select").css({visibility:"hidden"});c();p.imageArray.length=0;p.activeImage=0;if(u.length==1){p.imageArray.push(new Array(v.getAttribute("href"),v.getAttribute("title")))}else{for(var t=0;t<u.length;t++){p.imageArray.push(new Array(u[t].getAttribute("href"),u[t].getAttribute("title")))}}while(p.imageArray[p.activeImage][0]!=v.getAttribute("href")){p.activeImage++}l()}function c(){a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+p.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+p.imageBtnClose+'"></a></div></div></div></div>');var t=f();a("#jquery-overlay").css({backgroundColor:p.overlayBgColor,opacity:p.overlayOpacity,width:t[0],height:t[1]}).fadeIn();var u=h();a("#jquery-lightbox").css({top:u[1]+(t[3]/10),left:u[0]}).show();a("#jquery-overlay,#jquery-lightbox").click(function(){b()});a("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){b();return false});a(window).resize(function(){var v=f();a("#jquery-overlay").css({width:v[0],height:v[1]});var w=h();a("#jquery-lightbox").css({top:w[1]+(v[3]/10),left:w[0]})})}function l(){a("#lightbox-loading").show();if(p.fixedNavigation){a("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}else{a("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}var t=new Image();t.onload=function(){a("#lightbox-image").attr("src",p.imageArray[p.activeImage][0]);j(t.width,t.height);t.onload=function(){}};t.src=p.imageArray[p.activeImage][0]}function j(w,z){var t=a("#lightbox-container-image-box").width();var y=a("#lightbox-container-image-box").height();var x=(w+(p.containerBorderSize*2));var v=(z+(p.containerBorderSize*2));var u=t-x;var A=y-v;a("#lightbox-container-image-box").animate({width:x,height:v},p.containerResizeSpeed,function(){g()});if((u==0)&&(A==0)){if(a.browser.msie){n(250)}else{n(100)}}a("#lightbox-container-image-data-box").css({width:w});a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:z+(p.containerBorderSize*2)})}function g(){a("#lightbox-loading").hide();a("#lightbox-image").fadeIn(function(){k();s()});q()}function k(){a("#lightbox-container-image-data-box").slideDown("fast");a("#lightbox-image-details-caption").hide();if(p.imageArray[p.activeImage][1]){a("#lightbox-image-details-caption").html(p.imageArray[p.activeImage][1]).show()}if(p.imageArray.length>1){a("#lightbox-image-details-currentNumber").html(p.txtImage+" "+(p.activeImage+1)+" "+p.txtOf+" "+p.imageArray.length).show()}}function s(){a("#lightbox-nav").show();a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+p.imageBlank+") no-repeat"});if(p.activeImage!=0){if(p.fixedNavigation){a("#lightbox-nav-btnPrev").css({background:"url("+p.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){p.activeImage=p.activeImage-1;l();return false})}else{a("#lightbox-nav-btnPrev").unbind().hover(function(){a(this).css({background:"url("+p.imageBtnPrev+") left 15% no-repeat"})},function(){a(this).css({background:"transparent url("+p.imageBlank+") no-repeat"})}).show().bind("click",function(){p.activeImage=p.activeImage-1;l();return false})}}if(p.activeImage!=(p.imageArray.length-1)){if(p.fixedNavigation){a("#lightbox-nav-btnNext").css({background:"url("+p.imageBtnNext+") right 15% no-repeat"}).unbind().bind("click",function(){p.activeImage=p.activeImage+1;l();return false})}else{a("#lightbox-nav-btnNext").unbind().hover(function(){a(this).css({background:"url("+p.imageBtnNext+") right 15% no-repeat"})},function(){a(this).css({background:"transparent url("+p.imageBlank+") no-repeat"})}).show().bind("click",function(){p.activeImage=p.activeImage+1;l();return false})}}m()}function m(){a(document).keydown(function(t){d(t)})}function e(){a(document).unbind()}function d(t){if(t==null){keycode=event.keyCode;escapeKey=27}else{keycode=t.keyCode;escapeKey=t.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if((key==p.keyToClose)||(key=="x")||(keycode==escapeKey)){b()}if((key==p.keyToPrev)||(keycode==37)){if(p.activeImage!=0){p.activeImage=p.activeImage-1;l();e()}}if((key==p.keyToNext)||(keycode==39)){if(p.activeImage!=(p.imageArray.length-1)){p.activeImage=p.activeImage+1;l();e()}}}function q(){if((p.imageArray.length-1)>p.activeImage){objNext=new Image();objNext.src=p.imageArray[p.activeImage+1][0]}if(p.activeImage>0){objPrev=new Image();objPrev.src=p.imageArray[p.activeImage-1][0]}}function b(){a("#jquery-lightbox").remove();a("#jquery-overlay").fadeOut(function(){a("#jquery-overlay").remove()});a("embed, object, select").css({visibility:"visible"})}function f(){var v,t;if(window.innerHeight&&window.scrollMaxY){v=window.innerWidth+window.scrollMaxX;t=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){v=document.body.scrollWidth;t=document.body.scrollHeight}else{v=document.body.offsetWidth;t=document.body.offsetHeight}}var u,w;if(self.innerHeight){if(document.documentElement.clientWidth){u=document.documentElement.clientWidth}else{u=self.innerWidth}w=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){u=document.documentElement.clientWidth;w=document.documentElement.clientHeight}else{if(document.body){u=document.body.clientWidth;w=document.body.clientHeight}}}if(t<w){pageHeight=w}else{pageHeight=t}if(v<u){pageWidth=v}else{pageWidth=u}arrayPageSize=new Array(pageWidth,pageHeight,u,w);return arrayPageSize}function h(){var u,t;if(self.pageYOffset){t=self.pageYOffset;u=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;u=document.documentElement.scrollLeft}else{if(document.body){t=document.body.scrollTop;u=document.body.scrollLeft}}}arrayPageScroll=new Array(u,t);return arrayPageScroll}function n(v){var u=new Date();t=null;do{var t=new Date()}while(t-u<v)}return this.unbind("click").click(r)}})(jQuery);(function(b){var a=b.scrollTo=function(d,f,e){b(window).scrollTo(d,f,e)};a.defaults={axis:"y",duration:1};a.window=function(d){return b(window).scrollable()};b.fn.scrollable=function(){return this.map(function(){var d=this.parentWindow||this.defaultView,h=this.nodeName=="#document"?d.frameElement||d:this,f=h.contentDocument||(h.contentWindow||h).document,e=h.setInterval;return h.nodeName=="IFRAME"||e&&b.browser.safari?f.body:e?f.documentElement:this})};b.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}d=b.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=c(d.offset);d.over=c(d.over);return this.scrollable().each(function(){var h=this,s=b(h),r=f,g,n={},m=s.is("html,body");switch(typeof r){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(r)){r=c(r);break}r=b(r,this);case"object":if(r.is||r.style){g=(r=b(r)).offset()}}b.each(d.axis.split(""),function(k,x){var u=x=="x"?"Left":"Top",p=u.toLowerCase(),w="scroll"+u,q=h[w],o=x=="x"?"Width":"Height",l=o.toLowerCase();if(g){n[w]=g[p]+(m?0:q-s.offset()[p]);if(d.margin){n[w]-=parseInt(r.css("margin"+u))||0;n[w]-=parseInt(r.css("border"+u+"Width"))||0}n[w]+=d.offset[p]||0;if(d.over[p]){n[w]+=r[l]()*d.over[p]}}else{n[w]=r[p]}if(/^\d+$/.test(n[w])){n[w]=n[w]<=0?0:Math.min(n[w],i(o))}if(!k&&d.queue){if(q!=n[w]){j(d.onAfterFirst)}delete n[w]}});j(d.onAfter);function j(k){s.animate(n,e,d.easing,k&&function(){k.call(this,f,d)})}function i(k){var o="scroll"+k,l=h.ownerDocument;return m?Math.max(l.documentElement[o],l.body[o]):h[o]}}).end()};function c(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};jaaulde.utils.cookies=(function(){var d=[];var b={hoursToLive:null,path:"/",domain:null,secure:false};var g=function(h){var i;if(typeof h!=="object"||h===null){i=b}else{i={hoursToLive:(typeof h.hoursToLive==="number"&&h.hoursToLive>0?h.hoursToLive:b.hoursToLive),path:(typeof h.path==="string"&&h.path!=""?h.path:b.path),domain:(typeof h.domain==="string"&&h.domain!=""?h.domain:b.domain),secure:(typeof h.secure==="boolean"&&h.secure?h.secure:b.secure)}}return i};var f=function(h){h=g(h);return((typeof h.hoursToLive=="number"?"; expires="+a(h.hoursToLive):"")+"; path="+h.path+(typeof h.domain==="string"?"; domain="+h.domain:"")+(h.secure===true?"; secure":""))};var a=function(h){var i=new Date();i.setTime(i.getTime()+(h*60*60*1000));return i.toGMTString()};var e=function(){d=[];var l,j,h=document.cookie.split(";");for(var k=0;k<h.length;k++){l=h[k].split("=");j=l[0].replace(/^\s*/,"").replace(/\s*$/,"");value=decodeURIComponent(l[1]);d[j]=value}return d};var c=function(){};c.prototype.get=function(j){var h;e();if(typeof j==="string"){h=(typeof d[j]!=="undefined")?d[j]:null}else{if(typeof j==="object"&&j!==null){h=[];for(var i in j){h[j[i]]=(typeof d[j[i]]!=="undefined")?d[j[i]]:null}}else{h=d}}return h};c.prototype.set=function(k,i,h){if(typeof i==="undefined"||i===null){if(typeof h!=="object"||h===null){h={}}i="";h.hoursToLive=-8760}var j=f(h);document.cookie=k+"="+encodeURIComponent(i)+j};c.prototype.del=function(i,h){if(typeof h!=="object"||h===null){h={}}this.set(i,null,h)};c.prototype.test=function(){var i=false,h="cT",j="data";this.set(h,j);if(this.get(h)==j){this.del(h);i=true}return i};c.prototype.setOptions=function(h){if(typeof h!=="object"){h=null}b=g(h)};return new c()})();(function(){if(typeof jQuery!=="undefined"){jQuery.cookies=jaaulde.utils.cookies;var a={cookify:function(b){return this.each(function(){var c="",g="",f=["name","id"],e=0,d;while(e<f.length&&(typeof c!=="string"||c==="")){c=jQuery(this).attr(f[e]);e++}if(typeof c==="string"||c!==""){d=jQuery(this).attr("type").toLowerCase();if(d!=="radio"&&d!=="checkbox"){g=jQuery(this).attr("value");if(typeof g!=="string"||g===""){g=null}jQuery.cookies.set(c,g,b)}}e=0})},cookieFill:function(){return this.each(function(){var c="",f,e=["name","id"],d=0,b;while(d<e.length&&(typeof c!=="string"||c==="")){c=jQuery(this).attr(e[d]);d++}if(typeof c==="string"&&c!==""){f=jQuery.cookies.get(c);if(f!==null){b=this.nodeName.toLowerCase();if(b==="input"||b==="textarea"){jQuery(this).attr("value",f)}else{jQuery(this).html(f)}}}d=0})},cookieBind:function(b){return this.each(function(){$(this).cookieFill().change(function(){$(this).cookify(b)})})}};jQuery.each(a,function(b){jQuery.fn[b]=this})}})();$(document).ready(function(){jQuery("a[href$=JPG],a[href$=jpg],a[href$=JPEG],a[href$=jpeg],a[href$=png],a[href=$PNG]").lightBox({overlayBgColor:"#000",overlayOpacity:0.6,containerResizeSpeed:350,txtImage:"Fotografie",txtOf:"z",imageLoading:"/img/lightbox-ico-loading.gif",imageBtnPrev:"/img/lightbox-btn-prev.gif",imageBtnNext:"/img/lightbox-btn-next.gif",imageBtnClose:"/img/lightbox-btn-close.gif",imageBlank:"/img/lightbox-blank.gif",keyToNext:"d",keyToClose:"#27"})});jQuery.fn.topLink=function(a){a=jQuery.extend({min:1,fadeSpeed:200,ieOffset:50},a);return this.each(function(){var b=jQuery(this);b.css("display","none");jQuery(window).scroll(function(){if(!jQuery.support.hrefNormalized){b.css({position:"absolute",top:jQuery(window).scrollTop()+jQuery(window).height()-a.ieOffset})}if(jQuery(window).scrollTop()>=a.min){b.fadeIn(a.fadeSpeed)}else{b.fadeOut(a.fadeSpeed)}})})};$(document).ready(function(){jQuery("#top-link").topLink({min:300,fadeSpeed:500});jQuery("#top-link").click(function(a){a.preventDefault();jQuery.scrollTo(0,300)})});$(function(){var a=jQuery.cookies.get("font-size");switch(a){case"small":jQuery("#small").addClass("active");jQuery("html").css("font-size","14px");break;case"normal":jQuery("#normal").addClass("active");jQuery("html").css("font-size","16px");break;case"large":jQuery("#large").addClass("active");jQuery("html").css("font-size","20px");break;default:jQuery("#normal").addClass("active")}jQuery("#large").click(function(){jQuery("html").css("font-size","20px");jQuery("#font-size a").removeClass("active");jQuery(this).addClass("active");jQuery.cookies.set("font-size","large");return false});jQuery("#normal").click(function(){jQuery("html").css("font-size","16px");jQuery("#font-size a").removeClass("active");jQuery(this).addClass("active");jQuery.cookies.set("font-size","normal");return false});jQuery("#small").click(function(){jQuery("html").css("font-size","14px");jQuery("#font-size a").removeClass("active");jQuery(this).addClass("active");jQuery.cookies.set("font-size","small");return false})});jQuery(function(){jQuery(".spam input").val("13").parents(".spam").hide()});jQuery(function(){jQuery("#cssselected").change(function(a){jQuery("#cssswitch input[type=submit]").click()})});jQuery(function(){jQuery("#main_article input, #main_article textarea").focus(function(){var a=jQuery(this).attr("id");jQuery("label[for="+a+"]").addClass("focused");jQuery(this).parents("fieldset").addClass("focused");jQuery(this).parents("fieldset").children("legend").addClass("focused")}).blur(function(){var a=jQuery(this).attr("id");jQuery("label[for="+a+"]").removeClass("focused");jQuery(this).parents("fieldset").removeClass("focused");jQuery(this).parents("fieldset").children("legend").removeClass("focused")})});(function(a){a.event.special.textselect={setup:function(c,b){a(this).data("textselected",false);a(this).bind("mouseup",a.event.special.textselect.handler)},teardown:function(b){a(this).unbind("mouseup",a.event.special.textselect.handler)},handler:function(b){var c=a.event.special.textselect.getSelectedText().toString();if(c!=""){a(this).data("textselected",true);b.type="textselect";b.text=c;a.event.handle.apply(this,arguments)}},getSelectedText:function(){var b="";if(window.getSelection){b=window.getSelection()}else{if(document.getSelection){b=document.getSelection()}else{if(document.selection){b=document.selection.createRange().text}}}return b}};a.event.special.textunselect={setup:function(c,b){a(this).data("textselected",false);a(this).bind("mouseup",a.event.special.textunselect.handler);a(this).bind("keyup",a.event.special.textunselect.handlerKey)},teardown:function(b){a(this).unbind("mouseup",a.event.special.textunselect.handler)},handler:function(b){if(a(this).data("textselected")){var c=a.event.special.textselect.getSelectedText().toString();if(c==""){a(this).data("textselected",false);b.type="textunselect";a.event.handle.apply(this,arguments)}}},handlerKey:function(b){if(a(this).data("textselected")){var c=a.event.special.textselect.getSelectedText().toString();if((b.keyCode=27)&&(c=="")){a(this).data("textselected",false);b.type="textunselect";a.event.handle.apply(this,arguments)}}}}})(jQuery);jQuery(function(){jQuery(document).bind("textselect",function(a){jQuery.post("/save-selected.php",{text:a.text,url:escape(document.location)})});jQuery("a").click(function(){jQuery.post("/odkazy.php",{url:jQuery(this).attr("href"),text:jQuery(this).text()})})});jQuery(function(){jQuery("#ff").submit(function(a){jQuery.post("/hledani.php",{autor:"",nazev:"",klic:"",libovolne:jQuery("#h1").val()})})});
