$(document).ready(function(){function k(){c=$("#hpProjects","#container");g=$("li",c);g.hover(function(){$(this).addClass("hover");$(this).find("span.absbg").stop(true,false).animate({opacity:0.8},500);$(this).find("a").stop(true,false).animate({color:"#049500"},500)},function(){$(this).removeClass("hover");$(this).find("span.absbg").stop(true,false).animate({opacity:0.6},500);$(this).find("a").stop(true,false).animate({color:"#fff"},500)});g.live("click",function(){window.location=$(this).find("a").attr("href")});
$("#projectsNav a#prev:not(.disabled)",c).hover(function(){$(this).find("span").stop(true,false).animate({marginLeft:"10px"},200)},function(){$(this).find("span").stop(true,false).animate({marginLeft:"20px"},200)});$("#projectsNav a#next:not(.disabled)",c).hover(function(){$(this).find("span").stop(true,false).animate({marginLeft:"20px"},200)},function(){$(this).find("span").stop(true,false).animate({marginLeft:"14px"},200)});$("a.arrowLeft:not(.disabled)","#projectBox #photoArrow").hover(function(){$(this).find("span").stop(true,
false).animate({marginLeft:"20px"},200)},function(){$(this).find("span").stop(true,false).animate({marginLeft:"28px"},200)});$("a.arrowRight:not(.disabled)","#projectBox #photoArrow").hover(function(){$(this).find("span").stop(true,false).animate({marginLeft:"35px"},200)},function(){$(this).find("span").stop(true,false).animate({marginLeft:"28px"},200)});$("a.arrowLeft:not(.disabled)","#projectBox #projectNav").hover(function(){$(this).find("span.arrow").stop(true,false).animate({left:"15px"},200);
$(this).find("span.textHover").stop(true,false).fadeIn(200)},function(){$(this).find("span.arrow").stop(true,false).animate({left:"20px"},200);$(this).find("span.textHover").stop(true,false).fadeOut(200)});$("a.arrowRight:not(.disabled)","#projectBox #projectNav").hover(function(){$(this).find("span.arrow").stop(true,false).animate({left:"185px"},200);$(this).find("span.textHover").stop(true,false).fadeIn(200)},function(){$(this).find("span.arrow").stop(true,false).animate({left:"180px"},200);$(this).find("span.textHover").stop(true,
false).fadeOut(200)});$("a.arrowUp:not(.disabled)","#projectBox #projectNav").hover(function(){$(this).find("span.arrow").stop(true,false).animate({top:"20px"},200);$(this).find("span.textHover").stop(true,false).fadeIn(200)},function(){$(this).find("span.arrow").stop(true,false).animate({top:"26px"},200);$(this).find("span.textHover").stop(true,false).fadeOut(200)});$("a.arrowDown:not(.disabled)","#projectBox #projectNav").hover(function(){$(this).find("span.arrow").stop(true,false).animate({top:"31px"},
200);$(this).find("span.textHover").stop(true,false).fadeIn(200)},function(){$(this).find("span.arrow").stop(true,false).animate({top:"26px"},200);$(this).find("span.textHover").stop(true,false).fadeOut(200)});$("a.arrowLeft:not(.disabled)","#pageNav").hover(function(){$(this).parent().find("strong").attr("id",$(this).attr("rel"));$(this).find("span.arrow").stop(true,false).animate({left:"15px"},200)},function(){$(this).parent().find("strong").attr("id",$(this).attr("rev"));$(this).find("span.arrow").stop(true,
false).animate({left:"20px"},200)});$("a.arrowRight:not(.disabled)","#pageNav").hover(function(){$(this).parent().find("strong").attr("id",$(this).attr("rel"));$(this).find("span.arrow").stop(true,false).animate({left:"18px"},200)},function(){$(this).parent().find("strong").attr("id",$(this).attr("rev"));$(this).find("span.arrow").stop(true,false).animate({left:"14px"},200)});$("a.arrowUp:not(.disabled)","#pageNav").hover(function(){$(this).find("span.arrow").stop(true,false).animate({top:"20px"},
200);$(this).find("span.textHover").stop(true,false).fadeIn(200)},function(){$(this).find("span.arrow").stop(true,false).animate({top:"26px"},200);$(this).find("span.textHover").stop(true,false).fadeOut(200)})}function n(){k();Cufon.replace("#allProjects h1, #projectDetail h1, #aboutUs h1, #contacts h1, #contacts h2",{hover:true});a=$("#projectBox","#container");h=$("#projectShowDetail",a);d=$("#projectText",a);l=$("#projectPrevProject, #projectNextProject",a);e=$("#projectImage #photoWrap",a);f=
$("#projectPhotos li a",a);i=$("#projectPrevImage",a);j=$("#projectNextImage",a);h.click(function(b){b.preventDefault();if(a.hasClass("withInfo")){d.slideUp(1E3,function(){a.removeClass("withInfo");h.removeClass("arrowCross").addClass("arrowDown").attr("title","Detail projektu").html("Detail projektu<span class='arrow'></span><span class='text'></span><span class='textHover'></span><span class='bg'></span>")});$("html, body").animate({scrollTop:0},1E3)}else{a.addClass("withInfo");d.slideDown(1500);
$(this).blur().removeClass("arrowDown").addClass("arrowCross").attr("title","Zav\u0159\u00edt detail projektu").html("Zav\u0159\u00edt detail projektu<span class='cross'></span><span class='textClose'></span><span class='bg'></span>");$("html, body").animate({scrollTop:d.offset().top},2E3)}});$("#photoText span.absbg3",a).css({opacity:0});$("#photoText",a).hover(function(){$("span.absbg3",$(this)).stop(true,false).animate({opacity:1},500)},function(){$("span.absbg3",$(this)).stop(true,false).animate({opacity:0},
500)});if(e[0]){e.cycle({fx:"fade",speed:"800",timeout:8E3,prev:i,next:j,before:function(b,p){f.removeClass("active");b=$(p).attr("rev");$("#projectPhotos li a[rel="+b+"]",a).addClass("active")}});f.click(function(b){b.preventDefault();f.removeClass("active");$(this).addClass("active");b=parseFloat($(this).attr("rel"));e.cycle(b)})}}function o(){$("#container").height($(document.body).height());$(document.body).height()<=800?$("#container").addClass("smallResolution"):$("#container").removeClass("smallResolution")}
Cufon.replace("#allProjects h1, #projectDetail h1, #aboutUs h1, #contacts h1, #contacts h2",{hover:true});$("#navigation li").hover(function(){$(this).find("span.absbg").stop(true,false).animate({opacity:0.6},500)},function(){$(this).find("span.absbg").stop(true,false).animate({opacity:0},500)});var c,g;c=$("#hpProjects","#container");g=$("li",c);document.body.id=="hp"&&c.hide(0).delay(5E3).fadeIn(2500);k();var a,h,d,l,e,f,i,j;a=$("#projectBox","#container");h=$("#projectShowDetail",a);d=$("#projectText",
a);l=$("#projectPrevProject, #projectNextProject",a);e=$("#projectImage #photoWrap",a);f=$("#projectPhotos li a",a);i=$("#projectPrevImage",a);j=$("#projectNextImage",a);n();var m=$("#projectsNav","#projects #container");$("#prev",m);$("#next",m);$("#prev, #next",m).live("click",function(b){b.preventDefault();b.currentTarget.className!="disabled"&&c.load(b.currentTarget.href+" #projectList",k)});l.live("click",function(b){b.preventDefault();if(b.currentTarget.className!="disabled"){b=b.currentTarget.href;
$("#projectBoxWrap").load(b+" #projectBox",n)}});o();window.onresize=o;$(document).bind("keydown",function(b){if(b.keyCode==37)i.trigger("click");else b.keyCode==39&&j.trigger("click")});/*$("#contactBox .imgWrap a").mouseenter(function(){$(this).find("img").attr("src","/images/map-over.jpg")}).mouseleave(function(){$(this).find("img").attr("src","/images/map.jpg")})*/});function hideLoader(){$("#flashLoader:visible")[0]&&$("#flashLoader").fadeOut(200)};
