/*	ColorBox v1.3.2 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 */
(function(z){var p="colorbox",n="hover",v=true,O=false,U,l=!z.support.opacity,Q=l&&!window.XMLHttpRequest,T="click.colorbox",w="cbox_open",I="cbox_load",s="cbox_complete",H="cbox_cleanup",m="cbox_closed",L="resize.cbox_resize",E,R,S,d,x,i,b,D,c,M,B,f,q,h,k,J,j,G,r,V,g,e,a,o,y,N,u,K,F,A={transition:"elastic",speed:350,width:O,height:O,innerWidth:O,innerHeight:O,initialWidth:"400",initialHeight:"400",maxWidth:O,maxHeight:O,scalePhotos:v,scrolling:v,inline:O,html:O,iframe:O,photo:O,href:O,title:O,rel:O,opacity:0.9,preloading:v,current:"obrázek {current} z {total}",previous:"předchozí",next:"následující",close:"zavřít",open:O,overlayClose:v,slideshow:O,slideshowAuto:v,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",preloadIMG:v};function C(W,X){X=X==="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return(typeof W==="string")?Math.round((W.match(/%/)?(X/100)*parseInt(W,10):parseInt(W,10))):W}function t(W){return N.photo||W.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function P(){for(var W in N){if(typeof(N[W])==="function"){N[W]=N[W].call(o)}}}U=z.fn.colorbox=function(X,W){if(this.length){this.each(function(){var Y=z(this).data(p)?z.extend({},z(this).data(p),X):z.extend({},A,X);z(this).data(p,Y).addClass("cboxelement")})}else{z(this).data(p,z.extend({},A,X))}z(this).unbind(T).bind(T,function(Z){o=this;N=z(o).data(p);P();F=W||O;var Y=N.rel||o.rel;if(Y&&Y!=="nofollow"){c=z(".cboxelement").filter(function(){var aa=z(this).data(p).rel||this.rel;return(aa===Y)});y=c.index(o);if(y<0){c=c.add(o);y=c.length-1}}else{c=z(o);y=0}if(!u){u=v;K=v;z().bind("keydown.cbox_close",function(aa){if(aa.keyCode===27){aa.preventDefault();U.close()}}).bind("keydown.cbox_arrows",function(aa){if(aa.keyCode===37){aa.preventDefault();G.click()}else{if(aa.keyCode===39){aa.preventDefault();j.click()}}});if(N.overlayClose){E.css({cursor:"pointer"}).one("click",U.close)}o.blur();z.event.trigger(w);r.html(N.close);E.css({opacity:N.opacity}).show();N.w=C(N.initialWidth,"x");N.h=C(N.initialHeight,"y");U.position(0);if(Q){M.bind("resize.cboxie6 scroll.cboxie6",function(){E.css({width:M.width(),height:M.height(),top:M.scrollTop(),left:M.scrollLeft()})}).trigger("scroll.cboxie6")}}U.slideshow();U.load();Z.preventDefault()});if(X&&X.open){z(this).triggerHandler(T)}return this};U.init=function(){function W(X){return z('<div id="cbox'+X+'"/>')}M=z(window);R=z('<div id="colorbox"/>');E=W("Overlay").hide();S=W("Wrapper");d=W("Content").append(B=W("LoadedContent").css({width:0,height:0}),f=W("LoadingOverlay"),q=W("LoadingGraphic"),h=W("Title"),k=W("Current"),J=W("Slideshow"),j=W("Next"),G=W("Previous"),r=W("Close"));S.append(z("<div/>").append(W("TopLeft"),x=W("TopCenter"),W("TopRight")),z("<div/>").append(i=W("MiddleLeft"),d,b=W("MiddleRight")),z("<div/>").append(W("BottomLeft"),D=W("BottomCenter"),W("BottomRight"))).children().children().css({"float":"left"});z("body").prepend(E,R.append(S));if(l){R.addClass("cboxIE");if(Q){E.css("position","absolute")}}d.children().addClass(n).mouseover(function(){z(this).addClass(n)}).mouseout(function(){z(this).removeClass(n)}).hide();V=x.height()+D.height()+d.outerHeight(v)-d.height();g=i.width()+b.width()+d.outerWidth(v)-d.width();e=B.outerHeight(v);a=B.outerWidth(v);R.css({"padding-bottom":V,"padding-right":g}).hide();j.click(U.next);G.click(U.prev);r.click(U.close);d.children().removeClass(n)};U.position=function(ab,Y){var aa,X=document.documentElement.clientHeight,Z=Math.max(X-N.h-e-V,0)/2+M.scrollTop(),W=Math.max(document.documentElement.clientWidth-N.w-a-g,0)/2+M.scrollLeft();aa=(R.width()===N.w+a&&R.height()===N.h+e)?0:ab;S[0].style.width=S[0].style.height="9999px";function ac(ad){x[0].style.width=D[0].style.width=d[0].style.width=ad.style.width;q[0].style.height=f[0].style.height=d[0].style.height=i[0].style.height=b[0].style.height=ad.style.height}R.dequeue().animate({width:N.w+a,height:N.h+e,top:Z,left:W},{duration:aa,complete:function(){ac(this);K=O;S[0].style.width=(N.w+a+g)+"px";S[0].style.height=(N.h+e+V)+"px";if(Y){Y()}},step:function(){ac(this)}})};U.resize=function(aa){if(!u){return}var ab,Z,X,ad,ah,W,af,Y=N.transition==="none"?0:N.speed;M.unbind(L);if(!aa){af=setTimeout(function(){var ai=B.wrapInner("<div style='overflow:auto'></div>").children();N.h=ai.height();B.css({height:N.h});ai.replaceWith(ai.children());U.position(Y)},1);return}B.remove();B=z('<div id="cboxLoadedContent"/>').html(aa);function ae(){N.w=N.w||B.width();return N.w}function ac(){N.h=N.h||B.height();return N.h}B.hide().appendTo(E).css({width:ae(),overflow:N.scrolling?"auto":"hidden"}).css({height:ac()}).prependTo(d);z("#cboxPhoto").css({cssFloat:"none"});if(Q){z("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(H,function(){this.style.visibility="inherit"})}function ag(ai){U.position(ai,function(){if(!u){return}if(l){if(W){B.fadeIn(100)}R[0].style.removeAttribute("filter")}d.children().show();if(N.iframe){B.append("<iframe id='cboxIframe'"+(N.scrolling?" ":"scrolling='no'")+" name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+(N.href||o.href)+"' />")}f.hide();q.hide();J.hide();if(c.length>1){k.html(N.current.replace(/\{current\}/,y+1).replace(/\{total\}/,c.length));j.html(N.next);G.html(N.previous);if(N.slideshow){J.show()}}else{k.hide();j.hide();G.hide()}h.html(N.title||o.title);z.event.trigger(s);if(F){F.call(o)}if(N.transition==="fade"){R.fadeTo(Y,1,function(){if(l){R[0].style.removeAttribute("filter")}})}M.bind(L,function(){U.position(0)})})}if((N.transition==="fade"&&R.fadeTo(Y,0,function(){ag(0)}))||ag(Y)){}if(N.preloading&&c.length>1){Z=y>0?c[y-1]:c[c.length-1];ad=y<c.length-1?c[y+1]:c[0];ah=z(ad).data(p).href||ad.href;X=z(Z).data(p).href||Z.href;if(t(ah)){z("<img />").attr("src",ah)}if(t(X)){z("<img />").attr("src",X)}}};U.load=function(){var X,W,aa,Z=U.resize;K=v;function Y(ad){var ac=z(ad),ae=ac.find("img"),ab=ae.length;(function af(){var ag=new Image();ab=ab-1;if(ab>=0&&N.preloadIMG){ag.onload=af;ag.src=ae[ab].src}else{Z(ac)}}())}o=c[y];N=z(o).data(p);P();z.event.trigger(I);N.h=N.height?C(N.height,"y")-e-V:N.innerHeight?C(N.innerHeight,"y"):O;N.w=N.width?C(N.width,"x")-a-g:N.innerWidth?C(N.innerWidth,"x"):O;N.mw=N.w;N.mh=N.h;if(N.maxWidth){N.mw=C(N.maxWidth,"x")-a-g;N.mw=N.w&&N.w<N.mw?N.w:N.mw}if(N.maxHeight){N.mh=C(N.maxHeight,"y")-e-V;N.mh=N.h&&N.h<N.mh?N.h:N.mh}X=N.href||o.href;f.show();q.show();r.show();if(N.inline){z('<div id="cboxInlineTemp" />').hide().insertBefore(z(X)[0]).bind(I+" "+H,function(){z(this).replaceWith(B.children())});Z(z(X))}else{if(N.iframe){Z(" ")}else{if(N.html){Y(N.html)}else{if(t(X)){W=new Image();W.onload=function(){var ab;W.onload=null;W.id="cboxPhoto";z(W).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(N.scalePhotos){aa=function(){W.height-=W.height*ab;W.width-=W.width*ab};if(N.mw&&W.width>N.mw){ab=(W.width-N.mw)/W.width;aa()}if(N.mh&&W.height>N.mh){ab=(W.height-N.mh)/W.height;aa()}}if(N.h){W.style.marginTop=Math.max(N.h-W.height,0)/2+"px"}Z(W);if(c.length>1){z(W).css({cursor:"pointer"}).click(U.next)}if(l){W.style.msInterpolationMode="bicubic"}};W.src=X}else{z("<div />").load(X,function(ab,ac){if(ac==="success"){Y(this)}else{Z(z("<p>Request unsuccessful.</p>"))}})}}}}};U.next=function(){if(!K){y=y<c.length-1?y+1:0;U.load()}};U.prev=function(){if(!K){y=y>0?y-1:c.length-1;U.load()}};U.slideshow=function(){var X,W,Y="cboxSlideshow_";J.bind(m,function(){J.unbind();clearTimeout(W);R.removeClass(Y+"off "+Y+"on")});function Z(){J.text(N.slideshowStop).bind(s,function(){W=setTimeout(U.next,N.slideshowSpeed)}).bind(I,function(){clearTimeout(W)}).one("click",function(){X();z(this).removeClass(n)});R.removeClass(Y+"off").addClass(Y+"on")}X=function(){clearTimeout(W);J.text(N.slideshowStart).unbind(s+" "+I).one("click",function(){Z();W=setTimeout(U.next,N.slideshowSpeed);z(this).removeClass(n)});R.removeClass(Y+"on").addClass(Y+"off")};if(N.slideshow&&c.length>1){if(N.slideshowAuto){Z()}else{X()}}};U.close=function(){z.event.trigger(H);u=O;z().unbind("keydown.cbox_close keydown.cbox_arrows");M.unbind(L+" resize.cboxie6 scroll.cboxie6");E.css({cursor:"auto"}).fadeOut("fast");R.stop(v,O).fadeOut("fast",function(){B.remove();R.css({opacity:1});d.children().hide();z.event.trigger(m)})};U.element=function(){return o};U.settings=A;z(U.init)}(jQuery));
/* Wayfarer Tooltip * Version 1.0.6 * Author Abel Mohler * URI: http://www.wayfarerweb.com/wtooltip.php * Released with the MIT License: http://www.wayfarerweb.com/mit.php */
(function(a){a.fn.wTooltip=function(f,r){f=a.extend({content:null,ajax:null,follow:true,auto:true,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:false,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(t,p,o){},callAfter:function(t,p,o){},clickAction:function(p,o){a(p).hide()},delay:0,timeout:0},f||{});if(!f.style&&typeof f.style!="object"){f.style={};f.style.zIndex="1000"}else{f.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},f.style||{})}if(typeof r=="function"){f.callAfter=r||f.callAfter}f.style.display="none",f.style.position="absolute";var m,l,q,c,k={},b=true,e=false,n=false,s=document.createElement("div"),g=(typeof document.body.style.maxWidth=="undefined")?true:false,j=(typeof a.talk=="function"&&typeof a.listen=="function")?true:false;if(f.id){s.id=f.id}if(f.className){s.className=f.className}f.degrade=(f.degrade&&g)?true:false;for(var d in f.style){s.style[d]=f.style[d]}function i(o){if(o){if(f.degrade){a(s).html(f.content.replace(/<\/?[^>]+>/gi,""))}else{a(s).html(f.content)}}}if(f.ajax){a.get(f.ajax,function(o){if(o){f.content=o}i(f.content)})}function h(p){function t(u){if(m&&!f.content){m=null}}function o(){if(!e&&f.auto){clearInterval(c);if(f.fadeOut){a(s).fadeOut(f.fadeOut,function(){t(p)})}else{t(p);s.style.display="none"}}if(typeof f.callAfter=="function"){f.callAfter(s,p,f)}if(j){f=a.listen(f)}}if(f.timeout>0){q=setTimeout(function(){o()},f.timeout)}else{o()}}a(s).hover(function(){e=true},function(){e=false;h(k)});if(j){f.key=s;f.plugin="wTooltip";f.channel="wayfarer";a.talk(f)}i(f.content&&!f.ajax);a(s).appendTo(f.appendTip);return this.each(function(){a(this).hover(function(){var p=this;clearTimeout(q);if((this.title||this.titleMemKeep)&&!f.degrade&&!f.content){m=this.title||this.titleMemKeep;if(this.title){this.titleMemKeep=this.title;this.title=null}}if(f.content&&f.degrade){this.title=s.innerHTML}function o(){if(typeof f.callBefore=="function"){f.callBefore(s,p,f)}if(j){f=a.listen(f)}if(f.auto){var t;if(f.content){if(!f.degrade){t="block"}}else{if(m&&!f.degrade){a(s).html(unescape(m));t="block";m=null}else{t="none"}}if(t=="block"&&f.fadeIn){a(s).fadeIn(f.fadeIn)}else{s.style.display=t}}}if(f.delay>0){l=setTimeout(function(){o()},f.delay)}else{o()}},function(){clearTimeout(l);var o=this;b=true;if(!f.follow||n||(f.offsetX<0&&f.offsetY<0)){setTimeout(function(){c=setInterval(function(){h(o)},1)},1)}else{h(this)}});a(this).mousemove(function(v){k=this;if(f.follow||b){var y=a(window).scrollTop(),z=a(window).scrollLeft(),w=v.clientY+y+f.offsetY,t=v.clientX+z+f.offsetX,x=a(f.appendTip).outerHeight(),p=a(f.appendTip).innerHeight(),o=a(window).width()+z-a(s).outerWidth(),u=a(window).height()+y-a(s).outerHeight();w=(x>p)?w-(x-p):w;n=(w>u||t>o)?true:false;if(t-z<=0&&f.offsetX<0){t=z}else{if(t>o){t=o}}if(w-y<=0&&f.offsetY<0){w=y}else{if(w>u){w=u}}s.style.top=w+"px";s.style.left=t+"px";b=false}});if(typeof f.clickAction=="function"){a(this).click(function(){f.clickAction(s,this)})}})}})(jQuery);

$(document).ready(function(){
  $("#vpravo a:has(img)").each(function() {
    $(this).attr("title", $(this).children("img").attr("alt"))
  });
  $("a.ur").each(function() {
    $(this).attr("title", "")
    $(this).attr("href", $(this).attr("href").replace(".html",".html?show"))
  });
	$("#vpravo a[href*=jpg],#vpravo a[href*=gif],#vpravo a[href*=png]").colorbox({rel:"img1",maxWidth:"95%",maxHeight:"100%"});
	$("a.pf2010").colorbox({iframe:true, transition:'elastic', speed:800, opacity:"0.85", width:"1040px", height:"360px", title:""});
	$(".colorbox").colorbox();
	$("a.ur").colorbox({title:"Roční zpráva skupiny Czech Coal: Hospodaření a udržitelný rozvoj v roce 2008", width:"780", height:"99%", iframe:true});
  $("a.ur08").wTooltip({
     content:"Tento odkaz vede na informace ze zprávy z roku 2008"
     }); 
  $("a.ur_en").wTooltip({
     content:"This link points to report about activities in 2008"
     }); 
  $("a.ur").wTooltip({
     content:" ",
     offsetY:0,
     offsetX:0,
     style:{
       border: "none",
       color: "#000",
       width: "224px",
       height: "74px",
       zIndex: "1000",
       background: "transparent url(/templates/default/cs/img/bg_bublina08.gif) top left no-repeat",
       padding: "0",
       margin: "-77px 0 0 -42px"
       }
     }); 
});
