eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('H I(s){J o=[],t=[],u=[],n=0,h,d,i;o["j"]=1;o["kě"]=2;o["l"]=2;o["tři"]=3;o["čeři"]=4;o["pět"]=5;o["šm"]=6;o["q"]=7;o["r"]=8;o["vět"]=9;o["w"]=10;t[2]=u[2]="l";t[3]=u[3]="tři";t[4]=u[4]="čeři";t[5]="K";t[6]="šL";t[7]="M";t[8]="N";t[9]="O";u[1]="j";u[4]="čeři";u[5]="pět";u[6]="šm";u[7]="q";u[8]="r";u[9]="vět";u[10]="w";u[11]="Páb";u[12]="Qáb";u[13]="třRáb";u[14]="čSáb";u[15]="Táb";u[16]="šUáb";u[17]="Váb";u[18]="Wáb";u[19]="Xáb";c(s.a("x")>-1||s.a("yě")>-1||s.a("Y")>-1||s.a("z")>-1){c(s.a("x")>-1){n+=A}f c(s.a("yě")>-1){n+=Z}f c(s.a("třB")>-1){n+=1a}f c(s.a("čeřB")>-1){n+=1b}f{h=s.C(0,s.a("z"));c(o[h]){n+=o[h]*A}}}c(s.a("sát")>-1||s.a("D")>-1){d=(s.a("sát")>-1)?s.a("sát"):s.a("D");E(i=2;i<10;i++){c(s.C(d-t[i].g,d)==t[i]){n+=i*10;F}}}E(i=1;i<1c;i++){c(s.G(u[i])>-1&&s.G(u[i])==s.g-u[i].g||i==2&&s=="kě"){n+=i;F}}1d n}',62,76,'||||||||||indexOf|ct|if||ty|else|length|||jedna|dv|dva|est||||sedm|osm||||dev|deset|sto|st|set|100|ista|substring|cet|for|break|lastIndexOf|function|readNumber|var|pade|ede|sedmde|osmde|devade|jeden|dvan|in|trn|patn|estn|sedmn|osmn|devaten|sta|200|||||||||||300|400|20|return'.split('|'),0,{}));


/* - ěščřžýáíé - utf-8 - */

var InputLabels = new Class({

	initialize: function (selector) {
		this.els = $$(selector);
		if (this.els && this.els.length > 0) {
			this.build();
			return this;
		}
	},

	build: function () {
		this.els.each(function (el) {
			el.addEvents(this.allTheLabelEvents);
			if (el.get('value') != '') {
				el.getPrevious().addClass('hide');
			}
			el.getPrevious().addEvent('click', function () {
				this.addClass('hide');
			});
		}, this);
	},

	allTheLabelEvents: {
		keyup: function (event) {
			this.getPrevious().addClass('hide');
		},
		keydown: function (event) {
			this.getPrevious().addClass('hide');
		},
		click: function (event) {
			if (true || this.get('value') != '') {
				this.getPrevious().addClass('hide');
			}
			event = new Event(event);
			if (event && event.preventDefault) {
				event.preventDefault();
			}
		},
		focus: function () {
			if (this.get('value') != '') {
				this.getPrevious().addClass('hide');
			}
		},
		blur: function () {
			if (this.get('value') == '') {
				this.getPrevious().removeClass('hide');
			}
			else {
				this.getPrevious().addClass('hide');
			}
		}
	}

});

window.addEvent('domready', function(){
	var t;

	t = new InputLabels('#kontakt-form input.labeled,#kontakt-form textarea.labeled,#search');


	$$("a.targetblank").set("target", "_blank");

          /* cufon */
if (Cufon && Cufon.replace) {
	Cufon.replace('#nav li a', { hover: {color: '#fff'} });
	Cufon.replace('#kontakt h3, #hp-right h2');
}

          /* helping */

if($("helping_show")){
  $("helping_show").addEvent("click", function(){
    if(this.hasClass("act")){
      $("helping").setStyle("display", "none");
    } else {
      $("helping").setStyle("display", "block");
    }
    
    this.toggleClass("act");
    this.blur();
    return false;
  });
}

          /* table list opener */

if($$("table.list").length > 0 && $("partner_filter")){
  $$("table.list .row_show").addEvent("click", function(){
    if(this.hasClass("act")){
      this.getNext().addClass("hidden_row");
      this.getNext().getNext().addClass("hidden_row");
    } else {
      this.getNext().removeClass("hidden_row");
      this.getNext().getNext().removeClass("hidden_row");
    }
    this.toggleClass("act");
    return false;
  });
}

          /* form-validation */
        
if($$("html").get("lang") == "en"){
  var form_validation = new FormValidation({
    default_border : "1px solid #C9C9C9",
    error_message : "You have to fill out all the fields marked with asterisk!!",
    error_mail_message : "Enter E-mail in a correct form!!",
    error_phone_message : "Enter Phone Number in a correct form!!",
    error_zipcode_message : "Enter ZIP code in a correct form!!",
    error_mail_or_phone_message : "Enter an E-mail or a Phone number!!" 
  });
} else {
  var form_validation = new FormValidation({
    default_border : "1px solid #C9C9C9"
  });
}

          /* resize background */

background_resize();
window.addEvent("resize", background_resize);

});

var background_resize = function(){
  if(window.getScrollWidth() < 1090){
    $$("body").setStyle("width", window.getScrollWidth()+120);
  }
};


