(function(){function b(c,d){var a=this;c=jQuery(c);var e=jQuery(document.createElement("div")).addClass(d.baseClass).addClass(d.fixed?d.fixedClass:"").addClass(d.persistent?d.persistentClass:"").html(d.content).appendTo(c);d.hidden?e.hide():e.show();if(d.persistent){c.click(function(f){if(f.target===c.get(0))e.css("display")!=="none"?a.hide():a.show()});jQuery(window).mousedown(function(f){if(e.css("display")!=="none")(d.focus?jQuery(f.target).parents(".tooltip").andSelf().filter(function(){return this===
e.get(0)}).length:0)===0&&a.hide()})}else{c.hover(function(f){a.show(f)},function(){a.hide()});d.fixed||c.mousemove(function(f){e.css("display")!=="none"&&a.updatePos(f)})}jQuery.extend(a,{getVersion:function(){return[1,2,0]},getParent:function(){return c},getTooltip:function(){return e},getPos:function(){return e.offset()},setPos:function(f,g){var o=c.offset();if(typeof f=="string")f=parseInt(f)+o.left;if(typeof g=="string")g=parseInt(g)+o.top;e.css({left:f,top:g});return a},setPosition:function(f){d.position=
f},show:function(f){d.onBeforeShow.call(a);a.updatePos(d.fixed?null:f);switch(d.showEffect){case "fade":e.fadeIn(d.showTime);break;case "slide":e.slideDown(d.showTime,a.updatePos);break;case "custom":d.showCustom.call(e,d.showTime);break;default:case "none":e.show();break}e.addClass(d.activeClass);d.onShow.call(a);return a},hide:function(){d.onBeforeHide.call(a);switch(d.hideEffect){case "fade":e.fadeOut(d.hideTime);break;case "slide":e.slideUp(d.hideTime);break;case "custom":d.hideCustom.call(e,
d.hideTime);break;default:case "none":e.hide();break}e.removeClass(d.activeClass);d.onHide.call(a);return a},update:function(f){e.html(f);d.content=f;return a},load:function(f,g){d.beforeContentLoad.call(a);e.load(f,g,function(){d.onContentLoad.call(a)});return a},boundryCheck:function(f,g){f=f+e.outerWidth();g=g+e.outerHeight();var o=jQuery(window).width()+jQuery(window).scrollLeft(),n=jQuery(window).height()+jQuery(window).scrollTop();return[f>=o,g>=n]},updatePos:function(f){var g=e.outerWidth(),
o=e.outerHeight();if(!f&&d.fixed)if(d.position.constructor==Array){l=parseInt(d.position[0]);f=parseInt(d.position[1])}else if(jQuery(d.position).attr("nodeType")===1){f=jQuery(d.position).offset();l=f.left;f=f.top}else{f=c.offset();l=c.outerWidth();var n=c.outerHeight();switch(d.position){case "top":var l=f.left-g/2+l/2;f=f.top-o;break;case "bottom":l=f.left-g/2+l/2;f=f.top+n;break;case "left":l=f.left-g;f=f.top-o/2+n/2;break;case "right":l=f.left+l;f=f.top-o/2+n/2;break;default:case "default":l=
l/2+f.left+20;f=f.top;break}}else{l=f.pageX;f=f.pageY}if(typeof d.position!="object"){l+=d.offset[0];f+=d.offset[1];if(d.boundryCheck){n=a.boundryCheck(l,f);if(n[0])l=l-g/2-2*d.offset[0];if(n[1])f=f-o/2-2*d.offset[1]}}else{if(typeof d.position[0]=="string")l=String(l);if(typeof d.position[1]=="string")f=String(f)}a.setPos(l,f);return a}})}jQuery.fn.simpletip=function(c){var d=jQuery(this).eq(typeof c=="number"?c:0).data("simpletip");if(d)return d;var a={content:"A simple tooltip",persistent:false,
focus:false,hidden:true,position:"default",offset:[0,0],boundryCheck:true,fixed:true,showEffect:"fade",showTime:150,showCustom:null,hideEffect:"fade",hideTime:150,hideCustom:null,baseClass:"tooltip",activeClass:"active",fixedClass:"fixed",persistentClass:"persistent",focusClass:"focus",onBeforeShow:function(){},onShow:function(){},onBeforeHide:function(){},onHide:function(){},beforeContentLoad:function(){},onContentLoad:function(){}};jQuery.extend(a,c);this.each(function(){var e=new b(jQuery(this),
a);jQuery(this).data("simpletip",e)});return this}})();(function(b){b.fn.lightbox=function(c){function d(){b("#overlay").remove();b("#lightbox").remove();h.inprogress=false;if(h.jsonData&&h.jsonData.length>0){var q=h.jsonDataParser?h.jsonDataParser:b.fn.lightbox.parseJsonData;h.imageArray=[];h.imageArray=q(h.jsonData)}q='<div id="outerImageContainer"><div id="imageContainer"><iframe id="lightboxIframe" /><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="'+h.strings.prevLinkTitle+'" id="prevLink"></a><a href="javascript://" id="nextLink" title="'+
h.strings.nextLinkTitle+'"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><img src="'+h.fileLoadingImage+'"></a></div></div></div>';var r='<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">';if(h.displayHelp)r+='<span id="helpDisplay">'+h.strings.help+"</span>";r+='<a href="javascript://" id="bottomNavClose" title="'+h.strings.closeTitle+'"><img src="'+h.fileBottomNavCloseImage+
'"></a></div></div></div>';if(h.navbarOnTop){q='<div id="overlay"></div><div id="lightbox">'+r+q+"</div>";b("body").append(q);b("#imageDataContainer").addClass("ontop")}else{q='<div id="overlay"></div><div id="lightbox">'+q+r+"</div>";b("body").append(q)}b("#overlay").click(function(){l()}).hide();b("#lightbox").click(function(){l()}).hide();b("#loadingLink").click(function(){l();return false});b("#bottomNavClose").click(function(){l();return false});b("#outerImageContainer").width(h.widthCurrent).height(h.heightCurrent);
b("#imageDataContainer").width(h.widthCurrent);if(!h.imageClickClose){b("#lightboxImage").click(function(){return false});b("#hoverNav").click(function(){return false})}}function a(){return new Array(b(document).width(),b(document).height(),b(window).width(),b(window).height())}function e(){var q,r;if(self.pageYOffset){r=self.pageYOffset;q=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){r=document.documentElement.scrollTop;q=document.documentElement.scrollLeft}else if(document.body){r=
document.body.scrollTop;q=document.body.scrollLeft}return new Array(q,r)}function f(q){var r=new Date,C=null;do C=new Date;while(C-r<q)}function g(q){b("select, embed, object").hide();var r=a();b("#overlay").hide().css({width:"100%",height:r[1]+"px",opacity:h.overlayOpacity}).fadeIn();imageNum=0;if(!h.jsonData){h.imageArray=[];!q.rel||q.rel==""?h.imageArray.push(new Array(q.href,h.displayTitle?q.title:"")):b("a").each(function(){if(this.href&&this.rel==q.rel)h.imageArray.push(new Array(this.href,
h.displayTitle?this.title:""))})}if(h.imageArray.length>1){for(i=0;i<h.imageArray.length;i++)for(j=h.imageArray.length-1;j>i;j--)h.imageArray[i][0]==h.imageArray[j][0]&&h.imageArray.splice(j,1);for(;h.imageArray[imageNum][0]!=q.href;)imageNum++}var C=e();r=C[1]+r[3]/10;C=C[0];b("#lightbox").css({top:r+"px",left:C+"px"}).show();h.slideNavBar||b("#imageData").hide();o(imageNum)}function o(q){if(h.inprogress==false){h.inprogress=true;h.activeImage=q;b("#loading").show();b("#lightboxImage").hide();b("#hoverNav").hide();
b("#prevLink").hide();b("#nextLink").hide();if(h.slideNavBar){b("#imageDataContainer").hide();b("#imageData").hide()}n()}}function n(){imgPreloader=new Image;imgPreloader.onload=function(){var q=imgPreloader.width,r=imgPreloader.height;if(h.fitToScreen){var C=a(),E=C[2]-2*h.borderSize;C=C[3]-200;if(imgPreloader.height>C){q=parseInt(C/imgPreloader.height*imgPreloader.width);r=C}else if(imgPreloader.width>E){r=parseInt(E/imgPreloader.width*imgPreloader.height);q=E}}b("#lightboxImage").attr("src",h.imageArray[h.activeImage][0]).width(q).height(r);
t(q,r)};imgPreloader.src=h.imageArray[h.activeImage][0]}function l(){B();b("#lightbox").hide();b("#overlay").fadeOut();b("select, object, embed").show()}function s(){if(h.loopImages&&h.imageArray.length>1){preloadNextImage=new Image;preloadNextImage.src=h.imageArray[h.activeImage==h.imageArray.length-1?0:h.activeImage+1][0];preloadPrevImage=new Image;preloadPrevImage.src=h.imageArray[h.activeImage==0?h.imageArray.length-1:h.activeImage-1][0]}else{if(h.imageArray.length-1>h.activeImage){preloadNextImage=
new Image;preloadNextImage.src=h.imageArray[h.activeImage+1][0]}if(h.activeImage>0){preloadPrevImage=new Image;preloadPrevImage.src=h.imageArray[h.activeImage-1][0]}}}function t(q,r){h.widthCurrent=b("#outerImageContainer").outerWidth();h.heightCurrent=b("#outerImageContainer").outerHeight();q=Math.max(350,q+h.borderSize*2);var C=r+h.borderSize*2;h.xScale=q/h.widthCurrent*100;h.yScale=C/h.heightCurrent*100;wDiff=h.widthCurrent-q;hDiff=h.heightCurrent-C;b("#imageDataContainer").animate({width:q},h.resizeSpeed,
"linear");b("#outerImageContainer").animate({width:q},h.resizeSpeed,"linear",function(){b("#outerImageContainer").animate({height:C},h.resizeSpeed,"linear",function(){p()})});if(hDiff==0&&wDiff==0)jQuery.browser.msie?f(250):f(100);b("#prevLink").height(r);b("#nextLink").height(r)}function p(){b("#loading").hide();b("#lightboxImage").fadeIn("fast");w();s();h.inprogress=false}function w(){b("#numberDisplay").html("");h.imageArray[h.activeImage][1]&&b("#caption").html(h.imageArray[h.activeImage][1]).show();
if(h.imageArray.length>1){var q;q=h.strings.image+(h.activeImage+1)+h.strings.of+h.imageArray.length;if(!h.disableNavbarLinks){if(h.activeImage>0||h.loopImages)q='<a title="'+h.strings.prevLinkTitle+'" href="#" id="prevLinkText">'+h.strings.prevLinkText+"</a>"+q;if(h.activeImage+1<h.imageArray.length||h.loopImages)q+='<a title="'+h.strings.nextLinkTitle+'" href="#" id="nextLinkText">'+h.strings.nextLinkText+"</a>"}b("#numberDisplay").html(q).show()}h.slideNavBar?b("#imageData").slideDown(h.navBarSlideSpeed):
b("#imageData").show();q=a();b("#overlay").height(q[1]);y()}function y(){if(h.imageArray.length>1){b("#hoverNav").show();if(h.loopImages){b("#prevLink,#prevLinkText").show().click(function(){o(h.activeImage==0?h.imageArray.length-1:h.activeImage-1);return false});b("#nextLink,#nextLinkText").show().click(function(){o(h.activeImage==h.imageArray.length-1?0:h.activeImage+1);return false})}else{h.activeImage!=0&&b("#prevLink,#prevLinkText").show().click(function(){o(h.activeImage-1);return false});h.activeImage!=
h.imageArray.length-1&&b("#nextLink,#nextLinkText").show().click(function(){o(h.activeImage+1);return false})}F()}}function u(q){var r=q.data.opts;q=q.keyCode;var C=String.fromCharCode(q).toLowerCase();if(C=="x"||C=="o"||C=="c"||q==27)l();else if(C=="p"||q==37)if(r.loopImages){B();o(r.activeImage==0?r.imageArray.length-1:r.activeImage-1)}else{if(r.activeImage!=0){B();o(r.activeImage-1)}}else if(C=="n"||q==39)if(h.loopImages){B();o(r.activeImage==r.imageArray.length-1?0:r.activeImage+1)}else if(r.activeImage!=
r.imageArray.length-1){B();o(r.activeImage+1)}}function F(){b(document).bind("keydown",{opts:h},u)}function B(){b(document).unbind("keydown")}var h=b.extend({},b.fn.lightbox.defaults,c);return this.each(function(){b(this).click(function(){d();g(this);return false})})};b.fn.lightbox.parseJsonData=function(c){var d=[];b.each(c,function(){d.push(new Array(this.url,this.title))});return d};b.fn.lightbox.defaults={fileLoadingImage:"/public/c/img/lightbox/loading.gif",fileBottomNavCloseImage:"/public/c/img/lightbox/closelabel.gif",
overlayOpacity:0.8,borderSize:10,imageArray:[],activeImage:null,inprogress:false,resizeSpeed:350,widthCurrent:250,heightCurrent:250,xScale:1,yScale:1,displayTitle:true,navbarOnTop:false,slideNavBar:false,navBarSlideSpeed:350,displayHelp:false,strings:{help:" \u2190 / P - previous image\u00a0\u00a0\u00a0\u00a0\u2192 / N - next image\u00a0\u00a0\u00a0\u00a0ESC / X - close image gallery",prevLinkTitle:"previous image",nextLinkTitle:"next image",prevLinkText:"&laquo; Previous",nextLinkText:"Next &raquo;",
closeTitle:"close image gallery",image:"Image ",of:" of "},fitToScreen:false,disableNavbarLinks:false,loopImages:false,imageClickClose:true,jsonData:null,jsonDataParser:null}})(jQuery);(function(b){b.fn.extend({autocomplete:function(c,d){var a=typeof c=="string";d=b.extend({},b.Autocompleter.defaults,{url:a?c:null,data:a?null:c,delay:a?b.Autocompleter.defaults.delay:10,max:d&&!d.scroll?10:150},d);d.highlight=d.highlight||function(e){return e};d.formatMatch=d.formatMatch||d.formatItem;return this.each(function(){new b.Autocompleter(this,d)})},result:function(c){return this.bind("result",c)},search:function(c){return this.trigger("search",[c])},flushCache:function(){return this.trigger("flushCache")},
setOptions:function(c){return this.trigger("setOptions",[c])},unautocomplete:function(){return this.trigger("unautocomplete")}});b.Autocompleter=function(c,d){function a(){var v=E.selected();if(!v)return false;var z=v.result;B=z;if(d.multiple){var K=f(u.val());if(K.length>1)z=K.slice(0,K.length-1).join(d.multipleSeparator)+d.multipleSeparator+z;z+=d.multipleSeparator}u.val(z);l();u.trigger("result",[v.data,v.value]);return true}function e(v,z){if(r==y.DEL)E.hide();else{v=u.val();if(!(!z&&v==B)){B=
v;v=g(v);if(v.length>=d.minChars){u.addClass(d.loadingClass);d.matchCase||(v=v.toLowerCase());t(v,s,l)}else{w();E.hide()}}}}function f(v){if(!v)return[""];v=v.split(d.multipleSeparator);var z=[];b.each(v,function(K,H){if(b.trim(H))z[K]=b.trim(H)});return z}function g(v){if(!d.multiple)return v;v=f(v);return v[v.length-1]}function o(v,z){if(d.autoFill&&g(u.val()).toLowerCase()==v.toLowerCase()&&r!=y.BACKSPACE){u.val(u.val()+z.substring(g(B).length));b.Autocompleter.Selection(c,B.length,B.length+z.length)}}
function n(){clearTimeout(F);F=setTimeout(l,200)}function l(){var v=E.visible();E.hide();clearTimeout(F);w();d.mustMatch&&u.search(function(z){if(!z)if(d.multiple){z=f(u.val()).slice(0,-1);u.val(z.join(d.multipleSeparator)+(z.length?d.multipleSeparator:""))}else u.val("")});v&&b.Autocompleter.Selection(c,c.value.length,c.value.length)}function s(v,z){if(z&&z.length&&q){w();E.display(z,v);o(v,z[0].value);E.show()}else l()}function t(v,z,K){d.matchCase||(v=v.toLowerCase());var H=h.load(v);if(H&&H.length)z(v,
H);else if(typeof d.url=="string"&&d.url.length>0){var N={timestamp:+new Date};b.each(d.extraParams,function(O,R){N[O]=typeof R=="function"?R():R});b.ajax({mode:"abort",port:"autocomplete"+c.name,dataType:d.dataType,url:d.url,data:b.extend({q:g(v),limit:d.max},N),success:function(O){O=d.parse&&d.parse(O)||p(O);h.add(v,O);z(v,O)}})}else{E.emptyList();K(v)}}function p(v){var z=[];v=v.split("\n");for(var K=0;K<v.length;K++){var H=b.trim(v[K]);if(H){H=H.split("|");z[z.length]={data:H,value:H[0],result:d.formatResult&&
d.formatResult(H,H[0])||H[0]}}}return z}function w(){u.removeClass(d.loadingClass)}var y={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},u=b(c).attr("autocomplete","off").addClass(d.inputClass),F,B="",h=b.Autocompleter.Cache(d),q=0,r,C={mouseDownOnSelect:false},E=b.Autocompleter.Select(d,c,a,C),Q;b.browser.opera&&b(c.form).bind("submit.autocomplete",function(){if(Q)return Q=false});u.bind((b.browser.opera?"keypress":"keydown")+".autocomplete",function(v){r=
v.keyCode;switch(v.keyCode){case y.UP:v.preventDefault();E.visible()?E.prev():e(0,true);break;case y.DOWN:v.preventDefault();E.visible()?E.next():e(0,true);break;case y.PAGEUP:v.preventDefault();E.visible()?E.pageUp():e(0,true);break;case y.PAGEDOWN:v.preventDefault();E.visible()?E.pageDown():e(0,true);break;case d.multiple&&b.trim(d.multipleSeparator)==","&&y.COMMA:case y.TAB:case y.RETURN:if(a()){v.preventDefault();Q=true;return false}break;case y.ESC:E.hide();break;default:clearTimeout(F);F=setTimeout(e,
d.delay);break}}).focus(function(){q++}).blur(function(){q=0;C.mouseDownOnSelect||n()}).click(function(){q++>1&&!E.visible()&&e(0,true)}).bind("search",function(){function v(K,H){var N;if(H&&H.length)for(var O=0;O<H.length;O++)if(H[O].result.toLowerCase()==K.toLowerCase()){N=H[O];break}typeof z=="function"?z(N):u.trigger("result",N&&[N.data,N.value])}var z=arguments.length>1?arguments[1]:null;b.each(f(u.val()),function(K,H){t(H,v,v)})}).bind("flushCache",function(){h.flush()}).bind("setOptions",function(v,
z){b.extend(d,z);"data"in z&&h.populate()}).bind("unautocomplete",function(){E.unbind();u.unbind();b(c.form).unbind(".autocomplete")})};b.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:2,delay:200,matchCase:false,matchSubset:true,matchContains:true,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:false,formatItem:function(c){return c[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,
d){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+d.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:300};b.Autocompleter.Cache=function(c){function d(n,l){c.matchCase||(n=n.toLowerCase());n=n.indexOf(l);if(n==-1)return false;return n==0||c.matchContains}function a(n,l){o>c.cacheLength&&f();g[n]||o++;g[n]=l}function e(){if(!c.data)return false;var n={},l=0;if(!c.url)c.cacheLength=1;n[""]=[];for(var s=0,t=c.data.length;s<
t;s++){var p=c.data[s];p=typeof p=="string"?[p]:p;var w=c.formatMatch(p,s+1,c.data.length);if(w!==false){var y=w.charAt(0).toLowerCase();n[y]||(n[y]=[]);p={value:w,data:p,result:c.formatResult&&c.formatResult(p)||w};n[y].push(p);l++<c.max&&n[""].push(p)}}b.each(n,function(u,F){c.cacheLength++;a(u,F)})}function f(){g={};o=0}var g={},o=0;setTimeout(e,25);return{flush:f,add:a,populate:e,load:function(n){if(!c.cacheLength||!o)return null;if(!c.url&&c.matchContains){var l=[];for(var s in g)if(s.length>
0){var t=g[s];b.each(t,function(p,w){d(w.value,n)&&l.push(w)})}return l}else if(g[n])return g[n];else if(c.matchSubset)for(s=n.length-1;s>=c.minChars;s--)if(t=g[n.substr(0,s)]){l=[];b.each(t,function(p,w){if(d(w.value,n))l[l.length]=w});return l}return null}}};b.Autocompleter.Select=function(c,d,a,e){function f(){if(F){B=b("<div/>").hide().addClass(c.resultsClass).css("position","absolute").appendTo(document.body);h=b("<ul/>").appendTo(B).mouseover(function(q){if(g(q).nodeName&&g(q).nodeName.toUpperCase()==
"LI"){w=b("li",h).removeClass(t.ACTIVE).index(g(q));b(g(q)).addClass(t.ACTIVE)}}).click(function(q){b(g(q)).addClass(t.ACTIVE);a();d.focus();return false}).mousedown(function(){e.mouseDownOnSelect=true}).mouseup(function(){e.mouseDownOnSelect=false});c.width>0&&B.css("width",c.width);F=false}}function g(q){for(q=q.target;q&&q.tagName!="LI";)q=q.parentNode;if(!q)return[];return q}function o(q){p.slice(w,w+1).removeClass(t.ACTIVE);n(q);q=p.slice(w,w+1).addClass(t.ACTIVE);if(c.scroll){var r=0;p.slice(0,
w).each(function(){r+=this.offsetHeight});if(r+q[0].offsetHeight-h.scrollTop()>h[0].clientHeight)h.scrollTop(r+q[0].offsetHeight-h.innerHeight());else r<h.scrollTop()&&h.scrollTop(r)}}function n(q){w+=q;if(w<0)w=p.size()-1;else if(w>=p.size())w=0}function l(q){return c.max&&c.max<q?c.max:q}function s(){h.empty();for(var q=l(y.length),r=0;r<q;r++)if(y[r]){var C=c.formatItem(y[r].data,r+1,q,y[r].value,u);if(C!==false){C=b("<li/>").html(c.highlight(C,u)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];
b.data(C,"ac_data",y[r])}}p=h.find("li");if(c.selectFirst){p.slice(0,1).addClass(t.ACTIVE);w=0}b.fn.bgiframe&&h.bgiframe()}var t={ACTIVE:"ac_over"},p,w=-1,y,u="",F=true,B,h;return{display:function(q,r){f();y=q;u=r;s()},next:function(){o(1)},prev:function(){o(-1)},pageUp:function(){w!=0&&w-8<0?o(-w):o(-8)},pageDown:function(){w!=p.size()-1&&w+8>p.size()?o(p.size()-1-w):o(8)},hide:function(){B&&B.hide();p&&p.removeClass(t.ACTIVE);w=-1},visible:function(){return B&&B.is(":visible")},current:function(){return this.visible()&&
(p.filter("."+t.ACTIVE)[0]||c.selectFirst&&p[0])},show:function(){var q=b(d).offset();B.css({width:typeof c.width=="string"||c.width>0?c.width:b(d).width(),top:q.top+d.offsetHeight-4,left:q.left+5}).show();if(c.scroll){h.scrollTop(0);h.css({maxHeight:c.scrollHeight,overflow:"auto"});if(b.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var r=0;p.each(function(){r+=this.offsetHeight});q=r>c.scrollHeight;h.css("height",q?c.scrollHeight:r);q||p.width(h.width()-parseInt(p.css("padding-left"))-
parseInt(p.css("padding-right")))}}},selected:function(){var q=p&&p.filter("."+t.ACTIVE).removeClass(t.ACTIVE);return q&&q.length&&b.data(q[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){B&&B.remove()}}};b.Autocompleter.Selection=function(c,d,a){if(c.createTextRange){var e=c.createTextRange();e.collapse(true);e.moveStart("character",d);e.moveEnd("character",a);e.select()}else if(c.setSelectionRange)c.setSelectionRange(d,a);else if(c.selectionStart){c.selectionStart=d;c.selectionEnd=
a}c.focus()}})(jQuery);(function(b){function c(a){return typeof a=="object"?a:{top:a,left:a}}var d=b.scrollTo=function(a,e,f){b(window).scrollTo(a,e,f)};d.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};d.window=function(){return b(window).scrollable()};b.fn.scrollable=function(){return this.map(function(){var a=this;if(!(!a.nodeName||b.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1))return a;a=(a.contentWindow||a).document||a.ownerDocument||a;return b.browser.safari||a.compatMode==
"BackCompat"?a.body:a.documentElement})};b.fn.scrollTo=function(a,e,f){if(typeof e=="object"){f=e;e=0}if(typeof f=="function")f={onAfter:f};if(a=="max")a=9E9;f=b.extend({},d.defaults,f);e=e||f.speed||f.duration;f.queue=f.queue&&f.axis.length>1;if(f.queue)e/=2;f.offset=c(f.offset);f.over=c(f.over);return this.scrollable().each(function(){function g(y){l.animate(p,e,f.easing,y&&function(){y.call(this,a,f)})}function o(y){var u="scroll"+y;if(!w)return n[u];y="client"+y;var F=n.ownerDocument.documentElement,
B=n.ownerDocument.body;return Math.max(F[u],B[u])-Math.min(F[y],B[y])}var n=this,l=b(n),s=a,t,p={},w=l.is("html,body");switch(typeof s){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(s)){s=c(s);break}s=b(s,this);case "object":if(s.is||s.style)t=(s=b(s)).offset()}b.each(f.axis.split(""),function(y,u){var F=u=="x"?"Left":"Top",B=F.toLowerCase(),h="scroll"+F,q=n[h];u=u=="x"?"Width":"Height";if(t){p[h]=t[B]+(w?0:q-l.offset()[B]);if(f.margin){p[h]-=parseInt(s.css("margin"+F))||0;p[h]-=
parseInt(s.css("border"+F+"Width"))||0}p[h]+=f.offset[B]||0;if(f.over[B])p[h]+=s[u.toLowerCase()]()*f.over[B]}else p[h]=s[B];if(/^\d+$/.test(p[h]))p[h]=p[h]<=0?0:Math.min(p[h],o(u));if(!y&&f.queue){q!=p[h]&&g(f.onAfterFirst);delete p[h]}});g(f.onAfter)}).end()}})(jQuery);
(function(b){b.fn.inputlimiter=function(c){var d=b.extend({},b.fn.inputlimiter.defaults,c);if(d.boxAttach&&!b("#"+d.boxId).length){b("<div/>").appendTo("body").attr({id:d.boxId,"class":d.boxClass}).css({position:"absolute"}).hide();b.fn.bgiframe&&b("#"+d.boxId).bgiframe()}b(this).each(function(){b(this).keyup(function(){b(this).val().length>d.limit&&b(this).val(b(this).val().substring(0,d.limit));d.boxAttach&&b("#"+d.boxId).css({width:b(this).outerWidth()-(b("#"+d.boxId).outerWidth()-b("#"+d.boxId).width())+
"px",left:b(this).offset().left+"px",top:b(this).offset().top+b(this).outerHeight()-1+"px","z-index":2E3});var a=d.limit-b(this).val().length;a=d.remTextFilter(d,a);var e=d.limitTextFilter(d);if(d.limitTextShow){b("#"+d.boxId).html(a+" "+e);var f=b("<span/>").appendTo("body").attr({id:"19cc9195583bfae1fad88e19d443be7a","class":d.boxClass}).html(a+" "+e).innerWidth();b("#19cc9195583bfae1fad88e19d443be7a").remove();f>b("#"+d.boxId).innerWidth()&&b("#"+d.boxId).html(a+"<br />"+e);b("#"+d.boxId).show()}else b("#"+
d.boxId).html(a).show()});b(this).keypress(function(a){if((!a.keyCode||a.keyCode>46&&a.keyCode<90)&&b(this).val().length>=d.limit)return false});b(this).blur(function(){if(d.boxAttach)b("#"+d.boxId).fadeOut("fast");else if(d.remTextHideOnBlur){var a=d.limitText;a=a.replace(/\%n/g,d.limit);a=a.replace(/\%s/g,d.limit==1?"":"s");b("#"+d.boxId).html(a)}})})};b.fn.inputlimiter.remtextfilter=function(c,d){var a=c.remText;if(d==0&&c.remFullText!=null)a=c.remFullText;a=a.replace(/\%n/g,d);return a=a.replace(/\%s/g,
c.zeroPlural?d==1?"":"s":d<=1?"":"s")};b.fn.inputlimiter.limittextfilter=function(c){var d=c.limitText;d=d.replace(/\%n/g,c.limit);return d=d.replace(/\%s/g,c.limit<=1?"":"s")};b.fn.inputlimiter.defaults={limit:255,boxAttach:true,boxId:"limiterBox",boxClass:"limiterBox",remText:"%n character%s remaining.",remTextFilter:b.fn.inputlimiter.remtextfilter,remTextHideOnBlur:true,remFullText:null,limitTextShow:true,limitText:"Field limited to %n character%s.",limitTextFilter:b.fn.inputlimiter.limittextfilter,
zeroPlural:true}})(jQuery);
(function(b){function c(g,o){return parseInt(b.css(g,o))||0}function d(g){g=parseInt(g).toString(16);return g.length<2?"0"+g:g}function a(g){for(;g&&g.nodeName.toLowerCase()!="html";g=g.parentNode){var o=b.css(g,"backgroundColor");if(o.indexOf("rgb")>=0){if(b.browser.safari&&o=="rgba(0, 0, 0, 0)")continue;g=o.match(/\d+/g);return"#"+d(g[0])+d(g[1])+d(g[2])}if(o&&o!="transparent")return o}return"#ffffff"}function e(g,o,n){switch(g){case "round":return Math.round(n*(1-Math.cos(Math.asin(o/n))));case "cool":return Math.round(n*
(1+Math.cos(Math.asin(o/n))));case "sharp":return Math.round(n*(1-Math.cos(Math.acos(o/n))));case "bite":return Math.round(n*Math.cos(Math.asin((n-o-1)/n)));case "slide":return Math.round(n*Math.atan2(o,n/o));case "jut":return Math.round(n*Math.atan2(n,n-o-1));case "curl":return Math.round(n*Math.atan(o));case "tear":return Math.round(n*Math.cos(o));case "wicked":return Math.round(n*Math.tan(o));case "long":return Math.round(n*Math.sqrt(o));case "sculpt":return Math.round(n*Math.log(n-o-1,n));case "dog":return o&
1?o+1:n;case "dog2":return o&2?o+1:n;case "dog3":return o&3?o+1:n;case "fray":return o%2*n;case "notch":return n;case "bevel":return o+1}}var f=function(){var g=document.createElement("div");try{g.style.setExpression("width","0+0")}catch(o){return false}return true}();b.fn.corner=function(g){if(this.length==0){if(!b.isReady&&this.selector){var o=this.selector,n=this.context;b(function(){b(o,n).corner(g)})}return this}g=(g||"").toLowerCase();var l=/keep/.test(g),s=(g.match(/cc:(#[0-9a-f]+)/)||[])[1],
t=(g.match(/sc:(#[0-9a-f]+)/)||[])[1],p=parseInt((g.match(/(\d+)px/)||[])[1])||10,w=(g.match(/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/)||["round"])[0],y={T:0,B:1},u={TL:/top|tl/.test(g),TR:/top|tr/.test(g),BL:/bottom|bl/.test(g),BR:/bottom|br/.test(g)};if(!u.TL&&!u.TR&&!u.BL&&!u.BR)u={TL:1,TR:1,BL:1,BR:1};var F=document.createElement("div");F.style.overflow="hidden";F.style.height="1px";F.style.backgroundColor=t||"transparent";F.style.borderStyle=
"solid";return this.each(function(){var B={T:parseInt(b.css(this,"paddingTop"))||0,R:parseInt(b.css(this,"paddingRight"))||0,B:parseInt(b.css(this,"paddingBottom"))||0,L:parseInt(b.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined)this.style.zoom=1;if(!l)this.style.border="none";F.style.borderColor=s||a(this.parentNode);var h=b.curCSS(this,"height");for(var q in y){var r=y[q];if(r&&(u.BL||u.BR)||!r&&(u.TL||u.TR)){F.style.borderStyle="none "+(u[q+"R"]?"solid":"none")+" none "+(u[q+
"L"]?"solid":"none");var C=document.createElement("div");b(C).addClass("jquery-corner");var E=C.style;r?this.appendChild(C):this.insertBefore(C,this.firstChild);if(r&&h!="auto"){if(b.css(this,"position")=="static")this.style.position="relative";E.position="absolute";E.bottom=E.left=E.padding=E.margin="0";if(f)E.setExpression("width","this.parentNode.offsetWidth");else E.width="100%"}else if(!r&&b.browser.msie){if(b.css(this,"position")=="static")this.style.position="relative";E.position="absolute";
E.top=E.left=E.right=E.padding=E.margin="0";if(f){var Q=c(this,"borderLeftWidth")+c(this,"borderRightWidth");E.setExpression("width","this.parentNode.offsetWidth - "+Q+'+ "px"')}else E.width="100%"}else E.margin=!r?"-"+B.T+"px -"+B.R+"px "+(B.T-p)+"px -"+B.L+"px":B.B-p+"px -"+B.R+"px -"+B.B+"px -"+B.L+"px";for(E=0;E<p;E++){Q=Math.max(0,e(w,E,p));var v=F.cloneNode(false);v.style.borderWidth="0 "+(u[q+"R"]?Q:0)+"px 0 "+(u[q+"L"]?Q:0)+"px";r?C.appendChild(v):C.insertBefore(v,C.firstChild)}}}})};b.fn.uncorner=
function(){return b(".jquery-corner",this).remove()}})(jQuery);
(function(b){b.flashPlayerVersion=function(){var c,d=null,a=false;if(c=navigator.plugins["Shockwave Flash"])c=c.description;else{try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c=[6,0,21];d.AllowScriptAccess="always"}catch(f){if(c&&c[0]===6)a=true}if(!a)try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){c="X 0,0,0"}}if(!a&&d)try{c=d.GetVariable("$version")}catch(o){}}c=c.match(/^[A-Za-z\s]*?(\d+)(\.|,)(\d+)(\s+r|,)(\d+)/);
return[c[1]*1,c[3]*1,c[5]*1]}();b.flashExpressInstaller="expressInstall.swf";b.hasFlashPlayer=b.flashPlayerVersion[0]!==0;b.hasFlashPlayerVersion=function(c){var d=b.flashPlayerVersion;return(c=/string|integer/.test(typeof c)?c.toString().split("."):c)?d[0]>=(c.major||c[0]||d[0])&&d[1]>=(c.minor||c[1]||d[1])&&d[2]>=(c.release||c[2]||d[2]):d[0]!==0};b.flash=function(c){if(!b.hasFlashPlayer)return false;var d=c.swf||"",a=c.params||{},e=document.createElement("body"),f,g,o,n,l,s,t,p;c.height=c.height||
180;c.width=c.width||320;if(c.hasVersion&&!b.hasFlashPlayerVersion(c.hasVersion)){b.extend(c,{id:"SWFObjectExprInst",height:Math.max(c.height,137),width:Math.max(c.width,214)});d=c.expressInstaller||b.flashExpressInstaller;a={flashvars:{MMredirectURL:window.location.href,MMplayerType:b.browser.msie&&b.browser.win?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}c.flashvars&&typeof a==="object"&&b.extend(a,{flashvars:c.flashvars});for(l in s=["swf","expressInstall",
"hasVersion","params","flashvars"])delete c[s[l]];f=[];for(l in c){if(typeof c[l]==="object"){g=[];for(s in c[l])g.push(s.replace(/([A-Z])/,"-$1").toLowerCase()+":"+c[l][s]+";");c[l]=g.join("")}f.push(l+'="'+c[l]+'"')}c=f.join(" ");if(typeof a==="object"){f=[];for(l in a){if(typeof a[l]==="object"){g=[];for(s in a[l]){if(typeof a[l][s]==="object"){o=[];for(t in a[l][s]){if(typeof a[l][s][t]==="object"){n=[];for(p in a[l][s][t])n.push(p.replace(/([A-Z])/,"-$1").toLowerCase()+":"+a[l][s][t][p]+";");
a[l][s][t]=n.join("")}o.push(t+"{"+a[l][s][t]+"}")}a[l][s]=o.join("")}g.push(window.escape(s)+"="+window.escape(a[l][s]))}a[l]=g.join("&amp;")}f.push('<PARAM NAME="'+l+'" VALUE="'+a[l]+'">')}a=f.join("")}/style=/.test(c)||(c+=' style="vertical-align:text-top;"');/style=(.*?)vertical-align/.test(c)||(c=c.replace(/style="/,'style="vertical-align:text-top;'));if(b.browser.msie){c+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';a='<PARAM NAME="movie" VALUE="'+d+'">'+a}else c+=' type="application/x-shockwave-flash" data="'+
d+'"';e.innerHTML="<OBJECT "+c+">"+a+"</OBJECT>";return b(e.firstChild)};b.fn.flash=function(c){if(!b.hasFlashPlayer)return this;for(var d=0,a;(a=this.eq(d++))[0];){a.html(b.flash(b.extend({},c)));if(a[0].firstChild.getAttribute("id")==="SWFObjectExprInst")d=this.length}return this}})(jQuery);
function changeLeftPane(b){var c=$(b);if(!c.hasClass("focus")){var d=new Date;$.get("/?ajx=election"+b.substr(1,b.lenght)+"&ts="+d.getTime(),function(a){$(c).fadeOut(function(){$(c).html(a).fadeIn();$("div.itembox:has(a)").click(function(){document.location=$("a.url",this).attr("href")})})})}setTimeout('changeLeftPane("'+b+'")',6E3)}function itembox_links(){$("div.itembox:has(a)").click(function(){document.location=$("a.url",this).attr("href")})}
function reload_ref(b){var c=$('input[name="ref"]',b).val();b.fadeTo(300,0.1,function(){$("div#refs").load("/zpravodajstvi?ajx=ref",{ref:c},function(){b.fadeTo(300,1)})})}
function bind_vote_click(b){b.bind("click",function(){var c=$(this).parent().parent(),d=c.attr("id").match(/poll-\d+-answer-(\d+)/)[1],a=c.parent().parent();c=a.attr("id").match(/poll_(\d+)/)[1];$.getJSON("/",{ajx:"pollvote",answer:d,poll:c},function(e){if(e.status=="ok"){alert("D\u011bkujeme! V\u00e1\u0161 hlas byl zapo\u010d\u00edt\u00e1n.");if(e.poll){$("ul",a).html(e.poll);bind_vote_click($("a.vote",a))}}else e.message!=""?alert(e.message):alert("Chyba p\u0159i zpracov\u00e1n\u00ed, v\u00e1\u0161 hlas NEBYL zapo\u010d\u00edt\u00e1n.")})})}
$(document).ready(function(){$("div.bordered,#cform td.help > div,a.tabs-cube,div.cornered").corner();var b=$("#search input[name=q]");b.autocomplete("/?ajx=autocomplete",{highlight:false,scroll:false,scrollHeight:350,formatItem:function(c,d,a,e){c=e.split("~");if(c[2])return'<img class="ico" src="'+c[3]+'" /><p>'+c[0]+"</p><small>"+c[1]+'</small><div style="clear:both;"></div><div class="sep"></div>';return'<img class="ico" src="'+c[3]+'" /><p>'+c[0]+'</p><small></small><div style="clear:both;"></div><div class="sep"></div>'},
formatResult:function(c,d){c=d.split("~");return c[2]?c[0]:c[1]}});b.result(function(c,d,a){c=a.split("~");d=c[2]?c[2]:c[1];$(this).val(c[0].replace(/<\/?[^>]+>/gi,""));window.location=d});$("#flashmap").flash({swf:"/public/flash/mapa.swf?2",width:222,height:140,flashvars:{path:"/public/flash/data.xml"}});$("select.dropdown").change(function(){$(this).parent().submit()});$("a.changeref-button").bind("click",function(){reload_ref($("div#refs"));return false});bind_vote_click($(".poll a.vote, .polltheme a.votex, .polltheme a.vote, .poll a.votex"));
$("a.gatrc").click(function(){pageTracker._trackEvent("Denik.cz","Click to link",$(this).attr("href"));return true});$("select#okres").change(function(){var c=$("select#okres option:selected").val();c>0&&$.get("/?ajx=obceselect&okres="+c,function(d){$("select#obec").replaceWith(d)})});(location+"").match(/#novy-komentar/)?$("div.comment-new").show():$("a.addcomment-button").bind("click",function(){$(this).parent().fadeOut();$("div.comment-new").slideDown();return false});$("div#voteprobe:not(.deact) input").click(function(){var c=
$(this).parent().attr("class"),d=$('div#voteprobe input[name="target"]').val();$.post("/?ajx=voteprobe",{vote:c,target:d},function(a){alert(a.alert_msg);if(a.msg!==undefined){$("div#voteprobe p.msg").html(a.msg);$("div#voteprobe td.yes span").html(a.stat_yes);$("div#voteprobe td.no span").html(a.stat_no)}},"json")});$('ul#comment-list input[type="checkbox"]').bind("click",function(){var c=$(this).attr("checked");$('input[@type="checkbox"]:gt(0)',$(this).parent().parent()).attr("checked",c)});$("ul#comment-list a").bind("click",
function(){var c=$(this).parent().parent(),d=$("div.text:first",c),a=d.css("display");c=$("div.title:first",c);if(a=="block"){d.slideUp();c.removeClass("titled")}else{c.addClass("titled");d.slideDown()}});$("input#showAll").bind("click",function(){$("ul#comment-list .text").show()});$("div.topcontrol a").click(function(){$(this).attr("class");var c=$(this).attr("id");$("div#articlebody").css({fontSize:c});return false});$(".lbox").lightbox({fitToScreen:true,strings:{help:" \u2190 / P - previous image\u00a0\u00a0\u00a0\u00a0\u2192 / N - next image\u00a0\u00a0\u00a0\u00a0ESC / X - close image gallery",
prevLinkTitle:"p\u0159edchoz\u00ed obr\u00e1zek",nextLinkTitle:"dal\u0161\u00ed obr\u00e1zek",prevLinkText:"&laquo; P\u0159edchoz\u00ed",nextLinkText:"dal\u0161\u00ed &raquo;",closeTitle:"zav\u0159\u00edt galerii",image:"Obr\u00e1zek ",of:" z ",fileLoadingImage:"/public/c/img/lightbox/loading.gif",fileBottomNavCloseImage:"/public/c/img/lightbox/closelabel.gif"}});$("a.scroller").click(function(){var c=$(this).attr("href"),d=$('h3 a[href*="'+c+'"]');if(d!=undefined){$.scrollTo(d,800,{offset:-20});
return false}else window.location=c});itembox_links();$("ul#view-menu li.act").click(function(){document.location=$("a",this).attr("href")});$("div.my-polvote").hide();$("div.voting ul.buttons li a").mouseenter(function(){var c=$(this).html();$(this).animate({fontSize:"2em"},"fast");$("div.polvote").hide();$("div.my-polvote").show().addClass("mark"+c);$("div.my-polvote strong").html(c)}).mouseleave(function(){$(this).animate({fontSize:"1.2em"},"fast");$("div.my-polvote").hide().removeClass("mark1 mark2 mark3 mark4 mark5");
$("div.polvote").show()});$("div.markinfo").hide();$("div.markshow").click(function(){$(this).next().slideDown();return false});$(".showFilter").click(function(){var c=$("div#filterbox");if(c.css("display")=="none"){$(this).html("skr\u00fdt filtr");c.show()}else{$(this).html("zobrazit filtr");c.hide()}return false});$("div.polvote, div.my-polvote").corner("10px");$("ul.expand5 li:gt(5)").hide();$("ul.expand5").next("a").click(function(){$(this).prev("ul.expand5").find("li:qt(5)").slideDown();$(this).hide();
return false});$(".top3 .item").bind("mouseenter",function(){$(".card",$(this)).show()}).bind("mouseleave",function(){$(".card",$(this)).hide()});$("#tabnav.roleswitch a:not(.off)").click(function(){var c=$(this).parent().attr("id");$("ul.roles").hide();$("ul#rt-"+c).show();$("ul#tabnav.roleswitch li.cur").removeClass("cur");$("ul#tabnav.roleswitch li#"+c).addClass("cur");return false});$("div.voting-marks ul.buttons li a").click(function(){var c=$(this).parent().attr("class").match(/\d/),d=$("input#model_type").attr("value");
$("div.voting-replace").html('<div style="padding-top: 20px;text-align: center;"><img src="/public/img/shpane-loader.gif" /></div>');$("div.voting-replace").load("/?ajx=vote&mark="+c+"&type="+d);$("div#markcommentadd").slideDown();return false});$("div#topic-add").not(".current-error").hide();$("div.current-error").each(function(){$.scrollTo($(this).parent())});$("a.topic-add-button").click(function(){var c=$(this).parent();$("div.add").show();$('div#topic-add input[name="themecat_id"]').val(c.parent().attr("id").match(/ct-(\d+)/)[1]);
$(this).hasClass("vi")==false?$("input.thumb").parent().parent().hide():$("input.thumb").parent().parent().show();$("div#topic-add").slideUp("fast",function(){c.after($("div#topic-add"));$("div#topic-add").slideDown("fast",function(){})});return false});$("a.thumb-up,a.thumb-down").click(function(){var c=$(this).hasClass("thumb-up")?1:-1,d=$(this).attr("href").match(/#md-(\d+)/)[1],a=$(this).parent(),e=$("span",a);$.getJSON("/",{ajx:"commvote",mark:c,comm:d},function(f){if(f.status=="ok"){alert("D\u011bkujeme! V\u00e1\u0161 hlas byl zapo\u010d\u00edt\u00e1n.");
$("a",a).hide();f.mark&&e.html(f.mark)}else f.message!=""?alert(f.message):alert("Chyba p\u0159i zpracov\u00e1n\u00ed, v\u00e1\u0161 hlas NEBYL zapo\u010d\u00edt\u00e1n.")});return false});$("div.profileMenu div.cell").click(function(){var c=$("a.mitem",$(this)).attr("href");if(c!=undefined)window.location=c;return false});$("input.add-def").click(function(){var c=$(this).attr("id"),d=$("div#def-sample-"+c).html();$("#def-placeholder-"+c).append("<li>"+d+"</li>");return false}).click();$("a.def-remove").live("click",
function(){$(this).parent().remove();return false});$("#fk-change").click(function(){var c=$(this).parent().attr("id").match(/fk-change-([\w_-]+)/)[1];fk_change_toggle(c,"show");$("span#fk-changeinput-"+c+" input").val("");return false});$("ul#view-menu li:has(div.tooltip)").simpletip({fixed:true,onBeforeShow:function(){position=window.innerWidth>1520?["-285","-1"]:["220","-1"];this.setPosition(position);this.update(this.getParent().find("div.tooltip").html())}});$(".detailPanel > .head .button").click(function(){var c=
$(this).parent().parent().parent().parent(),d=$(".control .button.prev",c),a=$(".control .button.next",c),e=$(".control .sep",c),f=$("input[name=m]",c).val(),g=$("input[name=t]",c).val(),o=$("input[name=n]",c).val(),n=$("input[name=ca]",c).val();if($(this).hasClass("prev"))o=parseInt(o)-1;if($(this).hasClass("next"))o=parseInt(o)+1;var l=$(".bg",c);$(".bg .content",c).animate({opacity:0},"fast",function(){l.prepend('<div class="preloader" style="display: block; position: absolute; width: 50px; height: 50px; left: 150px; top: '+
Math.round(l.height()/2-25)+'px;" ><img src="/public/img/shpane-loader.gif" /></div>')});$.get("/?ajx=detailpanel&m="+f+"&t="+g+"&n="+o,function(s){$(".bg .preloader",c).remove();l.prepend('<div class="tmpin" style="visibility:hidden;width:351px;position:absolute;">'+s+"</div>");$("div.tmpin",c).ready(function(){var t=0,p=$("div.tmpin img",c);if(p.size()>0){p=p.attr("src");$("<img />").attr("src",p).load(function(){t=$("div.tmpin",c).height();$("div.tmpin",c).remove();l.animate({height:t},"fast",
function(){l.html(s);$(".bg .content",c).animate({opacity:1},"fast")})})}else{t=$("div.tmpin",c).height();$("div.tmpin",c).remove();l.animate({height:t},"fast",function(){l.html(s);$(".bg .content",c).animate({opacity:1},"fast")})}})});if(o>=parseInt(n)-1){a.hide();a=false}else{a.show();a=true}if(o>0){d.show();d=true}else{d.hide();d=false}d&&a?e.show():e.hide();$("input[name=n]",c).val(o);return false})});
function fs_bind(b,c){$('input.fs[name="'+b+'"]').autocomplete("/?ajx=fk_autocomplete&type="+c+"&return=forumurl",{limit:10}).result(function(d,a,e){window.location=a[1];return false})}
function fk_bind(b,c){$("span#fk-changeinput-"+b+" input").autocomplete("/?ajx=fk_autocomplete&type="+c);$("span#fk-changeinput-"+b+" input").result(function(d,a,e){$("input#"+b).val(a[1]);$("span#fk-changeview-"+b).html(a[0]);fk_change_toggle(b,"hide")});$("div#fk-change-"+b+" button#fk-close").click(function(){fk_change_toggle(b,"hide");return false})}
function fk_change_toggle(b,c){b=$("#fk-change-"+b);if(c=="show"){$('span[id^="fk-changeinput-"], button#fk-close',b).show();$('span[id^="fk-changeview-"], button#fk-change',b).hide()}else if(c=="hide"){$('span[id^="fk-changeinput-"], button#fk-close',b).hide();$('span[id^="fk-changeview-"], button#fk-change',b).show()}return false}
var addthis_config={ui_language:"cs"},RecaptchaOptions={lang:"nl",custom_translations:{visual_challenge:"Obr\u00e1zkov\u00fd test",audio_challenge:"Poslechov\u00fd test",refresh_btn:"Zobrazit dal\u0161\u00ed",instructions_visual:"Opi\u0161te dv\u011b slova:",instructions_audio:"Napi\u0161te, co sly\u0161\u00edte:",help_btn:"N\u00e1pov\u011bda",play_again:"P\u0159ehr\u00e1t znovu",cant_hear_this:"St\u00e1hnout jako MP3",incorrect_try_again:"\u0160patn\u00e1 odpov\u011b\u010f. Zkuste to znovu."}};var swfobject=function(){function b(){if(X.readyState=="complete"){X.parentNode.removeChild(X);c()}}function c(){if(!Z){if(D.ie&&D.win){var k=y("span");try{var m=z.getElementsByTagName("body")[0].appendChild(k);m.parentNode.removeChild(m)}catch(x){return}}Z=true;if(aa){clearInterval(aa);aa=null}k=H.length;for(m=0;m<k;m++)H[m]()}}function d(k){if(Z)k();else H[H.length]=k}function a(k){if(typeof v.addEventListener!=r)v.addEventListener("load",k,false);else if(typeof z.addEventListener!=r)z.addEventListener("load",
k,false);else if(typeof v.attachEvent!=r)u(v,"onload",k);else if(typeof v.onload=="function"){var m=v.onload;v.onload=function(){m();k()}}else v.onload=k}function e(){for(var k=N.length,m=0;m<k;m++){var x=N[m].id;if(D.pv[0]>0){var A=w(x);if(A){N[m].width=A.getAttribute("width")?A.getAttribute("width"):"0";N[m].height=A.getAttribute("height")?A.getAttribute("height"):"0";if(F(N[m].swfVersion)){D.webkit&&D.webkit<312&&f(A);h(x,true)}else N[m].expressInstall&&!T&&F("6.0.65")&&(D.win||D.mac)?g(N[m]):
o(A)}}else h(x,true)}}function f(k){var m=k.getElementsByTagName(C)[0];if(m){var x=y("embed"),A=m.attributes;if(A)for(var G=A.length,J=0;J<G;J++)A[J].nodeName=="DATA"?x.setAttribute("src",A[J].nodeValue):x.setAttribute(A[J].nodeName,A[J].nodeValue);if(m=m.childNodes){A=m.length;for(G=0;G<A;G++)m[G].nodeType==1&&m[G].nodeName=="PARAM"&&x.setAttribute(m[G].getAttribute("name"),m[G].getAttribute("value"))}k.parentNode.replaceChild(x,k)}}function g(k){T=true;var m=w(k.id);if(m){if(k.altContentId){var x=
w(k.altContentId);if(x){U=x;ba=k.altContentId}}else U=n(m);if(!/%$/.test(k.width)&&parseInt(k.width,10)<310)k.width="310";if(!/%$/.test(k.height)&&parseInt(k.height,10)<137)k.height="137";z.title=z.title.slice(0,47)+" - Flash Player Installation";x="MMredirectURL="+v.location+"&MMplayerType="+(D.ie&&D.win?"ActiveX":"PlugIn")+"&MMdoctitle="+z.title;var A=k.id;if(D.ie&&D.win&&m.readyState!=4){var G=y("div");A+="SWFObjectNew";G.setAttribute("id",A);m.parentNode.insertBefore(G,m);m.style.display="none";
u(v,"onload",function(){m.parentNode.removeChild(m)})}l({data:k.expressInstall,id:Q,width:k.width,height:k.height},{flashvars:x},A)}}function o(k){if(D.ie&&D.win&&k.readyState!=4){var m=y("div");k.parentNode.insertBefore(m,k);m.parentNode.replaceChild(n(k),m);k.style.display="none";u(v,"onload",function(){k.parentNode.removeChild(k)})}else k.parentNode.replaceChild(n(k),k)}function n(k){var m=y("div");if(D.win&&D.ie)m.innerHTML=k.innerHTML;else if(k=k.getElementsByTagName(C)[0])if(k=k.childNodes)for(var x=
k.length,A=0;A<x;A++)!(k[A].nodeType==1&&k[A].nodeName=="PARAM")&&k[A].nodeType!=8&&m.appendChild(k[A].cloneNode(true));return m}function l(k,m,x){var A,G=w(x);if(G){if(typeof k.id==r)k.id=x;if(D.ie&&D.win){var J="";for(var L in k)if(k[L]!=Object.prototype[L])if(L.toLowerCase()=="data")m.movie=k[L];else if(L.toLowerCase()=="styleclass")J+=' class="'+k[L]+'"';else if(L.toLowerCase()!="classid")J+=" "+L+'="'+k[L]+'"';L="";for(var I in m)if(m[I]!=Object.prototype[I])L+='<param name="'+I+'" value="'+
m[I]+'" />';G.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+J+">"+L+"</object>";O[O.length]=k.id;A=w(k.id)}else if(D.webkit&&D.webkit<312){I=y("embed");I.setAttribute("type",E);for(J in k)if(k[J]!=Object.prototype[J])if(J.toLowerCase()=="data")I.setAttribute("src",k[J]);else if(J.toLowerCase()=="styleclass")I.setAttribute("class",k[J]);else J.toLowerCase()!="classid"&&I.setAttribute(J,k[J]);for(var P in m)m[P]!=Object.prototype[P]&&P.toLowerCase()!="movie"&&I.setAttribute(P,
m[P]);G.parentNode.replaceChild(I,G);A=I}else{I=y(C);I.setAttribute("type",E);for(var M in k)if(k[M]!=Object.prototype[M])if(M.toLowerCase()=="styleclass")I.setAttribute("class",k[M]);else M.toLowerCase()!="classid"&&I.setAttribute(M,k[M]);for(var S in m)m[S]!=Object.prototype[S]&&S.toLowerCase()!="movie"&&s(I,S,m[S]);G.parentNode.replaceChild(I,G);A=I}}return A}function s(k,m,x){var A=y("param");A.setAttribute("name",m);A.setAttribute("value",x);k.appendChild(A)}function t(k){var m=w(k);if(m&&(m.nodeName==
"OBJECT"||m.nodeName=="EMBED"))if(D.ie&&D.win)m.readyState==4?p(k):v.attachEvent("onload",function(){p(k)});else m.parentNode.removeChild(m)}function p(k){if(k=w(k)){for(var m in k)if(typeof k[m]=="function")k[m]=null;k.parentNode.removeChild(k)}}function w(k){var m=null;try{m=z.getElementById(k)}catch(x){}return m}function y(k){return z.createElement(k)}function u(k,m,x){k.attachEvent(m,x);R[R.length]=[k,m,x]}function F(k){var m=D.pv;k=k.split(".");k[0]=parseInt(k[0],10);k[1]=parseInt(k[1],10)||
0;k[2]=parseInt(k[2],10)||0;return m[0]>k[0]||m[0]==k[0]&&m[1]>k[1]||m[0]==k[0]&&m[1]==k[1]&&m[2]>=k[2]?true:false}function B(k,m){if(!(D.ie&&D.mac)){var x=z.getElementsByTagName("head")[0],A=y("style");A.setAttribute("type","text/css");A.setAttribute("media","screen");!(D.ie&&D.win)&&typeof z.createTextNode!=r&&A.appendChild(z.createTextNode(k+" {"+m+"}"));x.appendChild(A);if(D.ie&&D.win&&typeof z.styleSheets!=r&&z.styleSheets.length>0){x=z.styleSheets[z.styleSheets.length-1];typeof x.addRule==C&&
x.addRule(k,m)}}}function h(k,m){m=m?"visible":"hidden";if(Z&&w(k))w(k).style.visibility=m;else B("#"+k,"visibility:"+m)}function q(k){return/[\\\"<>\.;]/.exec(k)!=null?encodeURIComponent(k):k}var r="undefined",C="object",E="application/x-shockwave-flash",Q="SWFObjectExprInst",v=window,z=document,K=navigator,H=[],N=[],O=[],R=[],X,aa=null,U=null,ba=null,Z=false,T=false,D=function(){var k=typeof z.getElementById!=r&&typeof z.getElementsByTagName!=r&&typeof z.createElement!=r,m=[0,0,0],x=null;if(typeof K.plugins!=
r&&typeof K.plugins["Shockwave Flash"]==C){if((x=K.plugins["Shockwave Flash"].description)&&!(typeof K.mimeTypes!=r&&K.mimeTypes[E]&&!K.mimeTypes[E].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");m[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);m[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);m[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else if(typeof v.ActiveXObject!=r){var A=null,G=false;try{A=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(J){try{A=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
m=[6,0,21];A.AllowScriptAccess="always"}catch(L){if(m[0]==6)G=true}if(!G)try{A=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(I){}}if(!G&&A)try{if(x=A.GetVariable("$version")){x=x.split(" ")[1].split(",");m=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(P){}}G=K.userAgent.toLowerCase();var M=K.platform.toLowerCase();x=/webkit/.test(G)?parseFloat(G.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;A=M?/win/.test(M):/win/.test(G);G=M?/mac/.test(M):/mac/.test(G);return{w3cdom:k,
pv:m,webkit:x,ie:false,win:A,mac:G}}();(function(){if(D.w3cdom){d(e);if(D.ie&&D.win)try{z.write("<script id=__ie_ondomload defer=true src=//:><\/script>");(X=w("__ie_ondomload"))&&u(X,"onreadystatechange",b)}catch(k){}if(D.webkit&&typeof z.readyState!=r)aa=setInterval(function(){/loaded|complete/.test(z.readyState)&&c()},10);typeof z.addEventListener!=r&&z.addEventListener("DOMContentLoaded",c,null);a(c)}})();(function(){D.ie&&D.win&&window.attachEvent("onunload",function(){for(var k=R.length,m=0;m<
k;m++)R[m][0].detachEvent(R[m][1],R[m][2]);k=O.length;for(m=0;m<k;m++)t(O[m]);for(var x in D)D[x]=null;D=null;for(var A in swfobject)swfobject[A]=null;swfobject=null})})();return{registerObject:function(k,m,x){if(!(!D.w3cdom||!k||!m)){var A={};A.id=k;A.swfVersion=m;A.expressInstall=x?x:false;N[N.length]=A;h(k,false)}},getObjectById:function(k){var m=null;if(D.w3cdom)if(k=w(k)){var x=k.getElementsByTagName(C)[0];if(!x||x&&typeof k.SetVariable!=r)m=k;else if(typeof x.SetVariable!=r)m=x}return m},embedSWF:function(k,
m,x,A,G,J,L,I,P){if(!(!D.w3cdom||!k||!m||!x||!A||!G)){x+="";A+="";if(F(G)){h(m,false);var M={};if(P&&typeof P===C)for(var S in P)if(P[S]!=Object.prototype[S])M[S]=P[S];M.data=k;M.width=x;M.height=A;var Y={};if(I&&typeof I===C)for(var ca in I)if(I[ca]!=Object.prototype[ca])Y[ca]=I[ca];if(L&&typeof L===C)for(var V in L)if(L[V]!=Object.prototype[V])if(typeof Y.flashvars!=r)Y.flashvars+="&"+V+"="+L[V];else Y.flashvars=V+"="+L[V];d(function(){l(M,Y,m);M.id==m&&h(m,true)})}else if(J&&!T&&F("6.0.65")&&(D.win||
D.mac)){T=true;h(m,false);d(function(){var W={};W.id=W.altContentId=m;W.width=x;W.height=A;W.expressInstall=J;g(W)})}}},getFlashPlayerVersion:function(){return{major:D.pv[0],minor:D.pv[1],release:D.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(k,m,x){if(D.w3cdom)return l(k,m,x)},removeSWF:function(k){D.w3cdom&&t(k)},createCSS:function(k,m){D.w3cdom&&B(k,m)},addDomLoadEvent:d,addLoadEvent:a,getQueryParamValue:function(k){var m=z.location.search||z.location.hash;if(k==null)return q(m);if(m){m=
m.substring(1).split("&");for(var x=0;x<m.length;x++)if(m[x].substring(0,m[x].indexOf("="))==k)return q(m[x].substring(m[x].indexOf("=")+1))}return""},expressInstallCallback:function(){if(T&&U){var k=w(Q);if(k){k.parentNode.replaceChild(U,k);if(ba){h(ba,true);if(D.ie&&D.win)U.style.display="block"}ba=U=null;T=false}}}}}();(function(b){function c(){this.regional=[];this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,timeSeparator:":",isRTL:false};this._defaults={until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1};b.extend(this._defaults,
this.regional[""]);this._serverSyncs=[]}function d(a,e){b.extend(a,e);for(var f in e)if(e[f]==null)a[f]=null;return a}b.extend(c.prototype,{markerClassName:"hasCountdown",_timer:setInterval(function(){b.countdown._updateTargets()},980),_timerTargets:[],setDefaults:function(a){this._resetExtraLabels(this._defaults,a);d(this._defaults,a||{})},UTCDate:function(a,e,f,g,o,n,l,s){if(typeof e=="object"&&e.constructor==Date){s=e.getMilliseconds();l=e.getSeconds();n=e.getMinutes();o=e.getHours();g=e.getDate();
f=e.getMonth();e=e.getFullYear()}var t=new Date;t.setUTCFullYear(e);t.setUTCDate(1);t.setUTCMonth(f||0);t.setUTCDate(g||1);t.setUTCHours(o||0);t.setUTCMinutes((n||0)-(Math.abs(a)<30?a*60:a));t.setUTCSeconds(l||0);t.setUTCMilliseconds(s||0);return t},periodsToSeconds:function(a){return a[0]*31557600+a[1]*2629800+a[2]*604800+a[3]*86400+a[4]*3600+a[5]*60+a[6]},_settingsCountdown:function(a,e){if(!e)return b.countdown._defaults;a=b.data(a,"countdown");return e=="all"?a.options:a.options[e]},_attachCountdown:function(a,
e){var f=b(a);if(!f.hasClass(this.markerClassName)){f.addClass(this.markerClassName);e={options:b.extend({},e),_periods:[0,0,0,0,0,0,0]};b.data(a,"countdown",e);this._changeCountdown(a)}},_addTarget:function(a){this._hasTarget(a)||this._timerTargets.push(a)},_hasTarget:function(a){return b.inArray(a,this._timerTargets)>-1},_removeTarget:function(a){this._timerTargets=b.map(this._timerTargets,function(e){return e==a?null:e})},_updateTargets:function(){for(var a=this._timerTargets.length-1;a>=0;a--)this._updateCountdown(this._timerTargets[a])},
_updateCountdown:function(a,e){var f=b(a);if(e=e||b.data(a,"countdown")){f.html(this._generateHTML(e));f[(this._get(e,"isRTL")?"add":"remove")+"Class"]("countdown_rtl");if(f=this._get(e,"onTick")){var g=e._hold!="lap"?e._periods:this._calculatePeriods(e,e._show,this._get(e,"significant"),new Date),o=this._get(e,"tickInterval");if(o==1||this.periodsToSeconds(g)%o==0)f.apply(a,[g])}if(e._hold!="pause"&&(e._since?e._now.getTime()<e._since.getTime():e._now.getTime()>=e._until.getTime())&&!e._expiring){e._expiring=
true;if(this._hasTarget(a)||this._get(e,"alwaysExpire")){this._removeTarget(a);(f=this._get(e,"onExpiry"))&&f.apply(a,[]);if(f=this._get(e,"expiryText")){g=this._get(e,"layout");e.options.layout=f;this._updateCountdown(a,e);e.options.layout=g}if(f=this._get(e,"expiryUrl"))window.location=f}e._expiring=false}else e._hold=="pause"&&this._removeTarget(a);b.data(a,"countdown",e)}},_changeCountdown:function(a,e,f){e=e||{};if(typeof e=="string"){var g=e;e={};e[g]=f}if(f=b.data(a,"countdown")){this._resetExtraLabels(f.options,
e);d(f.options,e);this._adjustSettings(a,f);b.data(a,"countdown",f);e=new Date;if(f._since&&f._since<e||f._until&&f._until>e)this._addTarget(a);this._updateCountdown(a,f)}},_resetExtraLabels:function(a,e){var f=false;for(var g in e)if(g!="whichLabels"&&g.match(/[Ll]abels/)){f=true;break}if(f)for(g in a)if(g.match(/[Ll]abels[0-9]/))a[g]=null},_adjustSettings:function(a,e){var f=this._get(e,"serverSync"),g=0;g=null;for(var o=0;o<this._serverSyncs.length;o++)if(this._serverSyncs[o][0]==f){g=this._serverSyncs[o][1];
break}if(g!=null){g=f?g:0;a=new Date}else{g=f?f.apply(a,[]):null;a=new Date;g=g?a.getTime()-g.getTime():0;this._serverSyncs.push([f,g])}f=this._get(e,"timezone");f=f==null?-a.getTimezoneOffset():f;e._since=this._get(e,"since");if(e._since!=null){e._since=this.UTCDate(f,this._determineTime(e._since,null));e._since&&g&&e._since.setMilliseconds(e._since.getMilliseconds()+g)}e._until=this.UTCDate(f,this._determineTime(this._get(e,"until"),a));g&&e._until.setMilliseconds(e._until.getMilliseconds()+g);
e._show=this._determineShow(e)},_destroyCountdown:function(a){var e=b(a);if(e.hasClass(this.markerClassName)){this._removeTarget(a);e.removeClass(this.markerClassName).empty();b.removeData(a,"countdown")}},_pauseCountdown:function(a){this._hold(a,"pause")},_lapCountdown:function(a){this._hold(a,"lap")},_resumeCountdown:function(a){this._hold(a,null)},_hold:function(a,e){var f=b.data(a,"countdown");if(f){if(f._hold=="pause"&&!e){f._periods=f._savePeriods;var g=f._since?"-":"+";f[f._since?"_since":
"_until"]=this._determineTime(g+f._periods[0]+"y"+g+f._periods[1]+"o"+g+f._periods[2]+"w"+g+f._periods[3]+"d"+g+f._periods[4]+"h"+g+f._periods[5]+"m"+g+f._periods[6]+"s");this._addTarget(a)}f._hold=e;f._savePeriods=e=="pause"?f._periods:null;b.data(a,"countdown",f);this._updateCountdown(a,f)}},_getTimesCountdown:function(a){a=b.data(a,"countdown");return!a?null:!a._hold?a._periods:this._calculatePeriods(a,a._show,this._get(a,"significant"),new Date)},_get:function(a,e){return a.options[e]!=null?a.options[e]:
b.countdown._defaults[e]},_determineTime:function(a,e){var f=function(o){var n=new Date;n.setTime(n.getTime()+o*1E3);return n},g=function(o){o=o.toLowerCase();var n=new Date,l=n.getFullYear(),s=n.getMonth(),t=n.getDate(),p=n.getHours(),w=n.getMinutes();n=n.getSeconds();for(var y=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,u=y.exec(o);u;){switch(u[2]||"s"){case "s":n+=parseInt(u[1],10);break;case "m":w+=parseInt(u[1],10);break;case "h":p+=parseInt(u[1],10);break;case "d":t+=parseInt(u[1],10);break;case "w":t+=
parseInt(u[1],10)*7;break;case "o":s+=parseInt(u[1],10);t=Math.min(t,b.countdown._getDaysInMonth(l,s));break;case "y":l+=parseInt(u[1],10);t=Math.min(t,b.countdown._getDaysInMonth(l,s));break}u=y.exec(o)}return new Date(l,s,t,p,w,n,0)};(a=a==null?e:typeof a=="string"?g(a):typeof a=="number"?f(a):a)&&a.setMilliseconds(0);return a},_getDaysInMonth:function(a,e){return 32-(new Date(a,e,32)).getDate()},_normalLabels:function(a){return a},_generateHTML:function(a){var e=this._get(a,"significant");a._periods=
a._hold?a._periods:this._calculatePeriods(a,a._show,e,new Date);for(var f=false,g=0,o=e,n=b.extend({},a._show),l=0;l<=6;l++){f|=a._show[l]=="?"&&a._periods[l]>0;n[l]=a._show[l]=="?"&&!f?null:a._show[l];g+=n[l]?1:0;o-=a._periods[l]>0?1:0}var s=[false,false,false,false,false,false,false];for(l=6;l>=0;l--)if(a._show[l])if(a._periods[l])s[l]=true;else{s[l]=o>0;o--}f=this._get(a,"compact");o=this._get(a,"layout");var t=f?this._get(a,"compactLabels"):this._get(a,"labels"),p=this._get(a,"whichLabels")||
this._normalLabels;l=this._get(a,"timeSeparator");var w=this._get(a,"description")||"",y=function(F){var B=b.countdown._get(a,"compactLabels"+p(a._periods[F]));return n[F]?a._periods[F]+(B?B[F]:t[F])+" ":""},u=function(F){var B=b.countdown._get(a,"labels"+p(a._periods[F]));return!e&&n[F]||e&&s[F]?'<span class="countdown_section"><span class="countdown_amount">'+a._periods[F]+"</span><br/>"+(B?B[F]:t[F])+"</span>":""};return o?this._buildLayout(a,n,o,f,e,s):(f?'<span class="countdown_row countdown_amount'+
(a._hold?" countdown_holding":"")+'">'+y(0)+y(1)+y(2)+y(3)+(n[4]?this._minDigits(a._periods[4],2):"")+(n[5]?(n[4]?l:"")+this._minDigits(a._periods[5],2):"")+(n[6]?(n[4]||n[5]?l:"")+this._minDigits(a._periods[6],2):""):'<span class="countdown_row countdown_show'+(e||g)+(a._hold?" countdown_holding":"")+'">'+u(0)+u(1)+u(2)+u(3)+u(4)+u(5)+u(6))+"</span>"+(w?'<span class="countdown_row countdown_descr">'+w+"</span>":"")},_buildLayout:function(a,e,f,g,o,n){var l=this._get(a,g?"compactLabels":"labels"),
s=this._get(a,"whichLabels")||this._normalLabels,t=function(y){return(b.countdown._get(a,(g?"compactLabels":"labels")+s(a._periods[y]))||l)[y]},p=function(y,u){return Math.floor(y/u)%10};t={desc:this._get(a,"description"),sep:this._get(a,"timeSeparator"),yl:t(0),yn:a._periods[0],ynn:this._minDigits(a._periods[0],2),ynnn:this._minDigits(a._periods[0],3),y1:p(a._periods[0],1),y10:p(a._periods[0],10),y100:p(a._periods[0],100),y1000:p(a._periods[0],1E3),ol:t(1),on:a._periods[1],onn:this._minDigits(a._periods[1],
2),onnn:this._minDigits(a._periods[1],3),o1:p(a._periods[1],1),o10:p(a._periods[1],10),o100:p(a._periods[1],100),o1000:p(a._periods[1],1E3),wl:t(2),wn:a._periods[2],wnn:this._minDigits(a._periods[2],2),wnnn:this._minDigits(a._periods[2],3),w1:p(a._periods[2],1),w10:p(a._periods[2],10),w100:p(a._periods[2],100),w1000:p(a._periods[2],1E3),dl:t(3),dn:a._periods[3],dnn:this._minDigits(a._periods[3],2),dnnn:this._minDigits(a._periods[3],3),d1:p(a._periods[3],1),d10:p(a._periods[3],10),d100:p(a._periods[3],
100),d1000:p(a._periods[3],1E3),hl:t(4),hn:a._periods[4],hnn:this._minDigits(a._periods[4],2),hnnn:this._minDigits(a._periods[4],3),h1:p(a._periods[4],1),h10:p(a._periods[4],10),h100:p(a._periods[4],100),h1000:p(a._periods[4],1E3),ml:t(5),mn:a._periods[5],mnn:this._minDigits(a._periods[5],2),mnnn:this._minDigits(a._periods[5],3),m1:p(a._periods[5],1),m10:p(a._periods[5],10),m100:p(a._periods[5],100),m1000:p(a._periods[5],1E3),sl:t(6),sn:a._periods[6],snn:this._minDigits(a._periods[6],2),snnn:this._minDigits(a._periods[6],
3),s1:p(a._periods[6],1),s10:p(a._periods[6],10),s100:p(a._periods[6],100),s1000:p(a._periods[6],1E3)};var w=f;for(f=0;f<=6;f++){p="yowdhms".charAt(f);w=w.replace(new RegExp("\\{"+p+"<\\}(.*)\\{"+p+">\\}","g"),!o&&e[f]||o&&n[f]?"$1":"")}b.each(t,function(y,u){w=w.replace(new RegExp("\\{"+y+"\\}","g"),u)});return w},_minDigits:function(a,e){a=""+a;if(a.length>=e)return a;a="0000000000"+a;return a.substr(a.length-e)},_determineShow:function(a){a=this._get(a,"format");var e=[];e[0]=a.match("y")?"?":
a.match("Y")?"!":null;e[1]=a.match("o")?"?":a.match("O")?"!":null;e[2]=a.match("w")?"?":a.match("W")?"!":null;e[3]=a.match("d")?"?":a.match("D")?"!":null;e[4]=a.match("h")?"?":a.match("H")?"!":null;e[5]=a.match("m")?"?":a.match("M")?"!":null;e[6]=a.match("s")?"?":a.match("S")?"!":null;return e},_calculatePeriods:function(a,e,f,g){a._now=g;a._now.setMilliseconds(0);var o=new Date(a._now.getTime());if(a._since)if(g.getTime()<a._since.getTime())a._now=g=o;else g=a._since;else{o.setTime(a._until.getTime());
if(g.getTime()>a._until.getTime())a._now=g=o}var n=[0,0,0,0,0,0,0];if(e[0]||e[1]){var l=b.countdown._getDaysInMonth(g.getFullYear(),g.getMonth()),s=b.countdown._getDaysInMonth(o.getFullYear(),o.getMonth());s=o.getDate()==g.getDate()||o.getDate()>=Math.min(l,s)&&g.getDate()>=Math.min(l,s);var t=function(w){return(w.getHours()*60+w.getMinutes())*60+w.getSeconds()};s=Math.max(0,(o.getFullYear()-g.getFullYear())*12+o.getMonth()-g.getMonth()+(o.getDate()<g.getDate()&&!s||s&&t(o)<t(g)?-1:0));n[0]=e[0]?
Math.floor(s/12):0;n[1]=e[1]?s-n[0]*12:0;g=new Date(g.getTime());l=g.getDate()==l;s=b.countdown._getDaysInMonth(g.getFullYear()+n[0],g.getMonth()+n[1]);g.getDate()>s&&g.setDate(s);g.setFullYear(g.getFullYear()+n[0]);g.setMonth(g.getMonth()+n[1]);l&&g.setDate(s)}var p=Math.floor((o.getTime()-g.getTime())/1E3);g=function(w,y){n[w]=e[w]?Math.floor(p/y):0;p-=n[w]*y};g(2,604800);g(3,86400);g(4,3600);g(5,60);g(6,1);if(p>0&&!a._since){a=[1,12,4.3482,7,24,60,60];g=6;o=1;for(l=6;l>=0;l--){if(e[l]){if(n[g]>=
o){n[g]=0;p=1}if(p>0){n[l]++;p=0;g=l;o=1}}o*=a[l]}}if(f)for(l=0;l<=6;l++)if(f&&n[l])f--;else f||(n[l]=0);return n}});b.fn.countdown=function(a){var e=Array.prototype.slice.call(arguments,1);if(a=="getTimes"||a=="settings")return b.countdown["_"+a+"Countdown"].apply(b.countdown,[this[0]].concat(e));return this.each(function(){typeof a=="string"?b.countdown["_"+a+"Countdown"].apply(b.countdown,[this].concat(e)):b.countdown._attachCountdown(this,a)})};b.countdown=new c})(jQuery);(function(b){b.countdown.regional.cs={labels:["Rok\u016f","M\u011bs\u00edc\u016f","T\u00fddn\u016f","Dn\u00ed","Hodin","Minut","Sekund"],labels1:["Rok","M\u011bs\u00edc","T\u00fdden","Den","Hodina","Minuta","Sekunda"],labels2:["Roky","M\u011bs\u00edce","T\u00fddny","Dny","Hodiny","Minuty","Sekundy"],compactLabels:["r","m","t","d"],whichLabels:function(c){return c==1?1:c>=2&&c<=4?2:0},timeSeparator:":",isRTL:false};b.countdown.setDefaults(b.countdown.regional.cs)})(jQuery);function slide_effect(b,c,d,a){a=a?2E3:500;var e=b.hasClass("wide")?606:285,f=e+75,g=$(".cont",b);d=(cond=d=="prev"||d=="politic"||d=="party"&&g.html().match(/hodnocen\u00e9 obce/))?-f:f;f=cond?f:-f;$(".main",b).append('<div class="cont new" style="position: absolute; left: '+d+"px; top: 15px; width: "+e+'px;">'+c+"</div>");c=$(".cont.new",b);b.css({opacity:1});g.css({position:"absolute"});g.animate({left:f},a,function(){$(this).remove()});c.animate({left:10},a)}
function fade_effect(b,c,d,a){if(a){d=1500;a=500}else{d=750;a=250}var e=b.hasClass("wide")?606:285,f=$(".cont",b);$(".main",b).append('<div class="cont new" style="display: none; position: absolute; left: 10px; top: 15px; width: '+e+'px;">'+c+"</div>");$(".cont.new",b).fadeIn(d);f.fadeOut(a,function(){$(this).remove()})}
function shpane_update(b,c,d,a){var e=$(".cont",b),f=b.attr("id"),g=$("input.obj_id",b).val(),o=f!="voting"?$(c).hasClass("prev")?"prev":"next":$(c).hasClass("strany")?"party":$(c).hasClass("obce")?"obce":"politic";e.css({opacity:0.5});e.append('<div id="shpane-loader" style="position:absolute;top:80px;left:'+(b.hasClass("wide")?275:120)+'px;width:50px;height:50px;background:url(/public/img/shpane-loader.gif) no-repeat;"></div>');$.ajax({type:"GET",data:"ajx=shpane&pane="+f+"&cur="+g+"&dir="+o,success:function(n){$("#shpane-loader").remove();
if(d)if(f=="news")fade_effect(b,n,o,a);else{slide_effect(b,n,o,a);if(f=="voting"){if(c){$(".button",b).removeClass("cur");c.addClass("cur")}$("div.itembox:has(a)",b).click(function(){document.location=$("a.url",this).attr("href")})}}else{e.css({opacity:1});e.html(n);if(f=="voting"){if(c){$(".button",b).removeClass("cur");c.addClass("cur")}$("div.minimark",b).corner("6px");$("div.statsmark",b).corner("8px");$("div.itembox:has(a)",b).click(function(){document.location=$("a.url",this).attr("href")})}}}});
return false}function refresher(b,c){setInterval(function(){if(b.hasClass("focus"))return false;shpane_update(b,$("button.prev",b),true,true)},c*1E3)}function refresher_topbanner(b){setInterval(function(){var c=$("#spane .banner:not(.hide)"),d=c.next(".banner");if(c.hasClass("focus"))return false;if(d.size()==0)d=$("#spane .banner:first");c.fadeOut(750,function(){c.addClass("hide");d.fadeIn(750).removeClass("hide")})},b*1E3)}
$(document).ready(function(){$("div#search input.ti").focus();$("div.shpane, #spane div.banner").bind("mouseenter",function(){$(this).addClass("focus")}).bind("mouseleave",function(){$(this).removeClass("focus")});$(".shpane .button").click(function(){var b=$(this).parent().parent();shpane_update(b,$(this),true);return false});refresher($("#news.shpane"),5);refresher($("#politic.shpane"),9);refresher($("#candidate.shpane"),9);refresher_topbanner(10)});
