function slider(n,t){$(n).bxSlider({mode:"vertical",speed:1e3,useCSS:!1,adaptiveHeight:!0,hideControlOnEnd:!0,infiniteLoop:!0,slideWidth:490,pagerCustom:t})}function renderCaptcha(){grecaptcha.render("captcha",{sitekey:"6LeQ6xEUAAAAAGgzNOLWbBsO8OrVx81yxvdv6pTu"})}function resizeWorkControl(){if(showWork(),$("#main_menu").length){var n,t;$("#main_menu figure").on("mouseover",function(){n=$(this).find("figcaption").attr("data-hover");t=$(this).find("figcaption").text();$(this).find("figcaption").text(n)});$("#main_menu figure").on("mouseout",function(){$(this).find("figcaption").text(t).removeAttr("style")})}}function showWorkLeks(){var n=$("#wrapper .works");$(window).width()<=1300&&(n.find(".work").hide(),n.find(".work:lt(15)").show());$(window).width()>=1301&&(n.find(".work").hide(),n.find(".work:lt(15)").show());$(window).width()>=1401&&(n.find(".work").hide(),n.find(".work:lt(12)").show());$(window).width()>=1501&&(n.find(".work").hide(),n.find(".work:lt(20)").show());$(window).width()>=1601&&(n.find(".work").hide(),n.find(".work:lt(16)").show());$(window).width()>=1701&&(n.find(".work").hide(),n.find(".work:lt(16)").show());$(window).width()>=1801&&(n.find(".work").hide(),n.find(".work:lt(25)").show());$(window).width()>=1901&&(n.find(".work").hide(),n.find(".work:lt(20)").show());$(window).resize(function(){$(window).width()<=1300&&(n.find(".work").hide(),n.find(".work:lt(15)").show());$(window).width()>=1301&&(n.find(".work").hide(),n.find(".work:lt(15)").show());$(window).width()>=1401&&(n.find(".work").hide(),n.find(".work:lt(12)").show());$(window).width()>=1501&&(n.find(".work").hide(),n.find(".work:lt(20)").show());$(window).width()>=1601&&(n.find(".work").hide(),n.find(".work:lt(16)").show());$(window).width()>=1701&&(n.find(".work").hide(),n.find(".work:lt(16)").show());$(window).width()>=1801&&(n.find(".work").hide(),n.find(".work:lt(25)").show());$(window).width()>=1901&&(n.find(".work").hide(),n.find(".work:lt(20)").show());$(window).width()>=2001&&n.find(".work").show()})}function showWork(){var n=$(".works"),i=".works .work",f=20,t,r,u,o,s;if(n.length==0&&(n=$(".pictures"),i=".pictures .item",f=9),n.length==0&&(n=$(".list_articles"),i=".list_articles .post",f=9),n.length!=0){t=window.innerWidth>0?window.innerWidth:screen.width;i==".works .work"?t>=1801?r=n.width()*.2:t>=1501&&t<=1800?r=n.width()*.25:t>=1201&&t<=1500?r=n.width()*.333:t<1200&&(r=n.width()*.33333):i==".pictures .item"?(r=n.width()*.495,t>=2401&&t<=2800?r=n.width()*.25:t>=1580&&t<=2400&&(r=n.width()*.33333)):i==".list_articles .post"&&(r=n.width()*.5,t>=2401&&t<=2800?r=n.width()*.25:t>=1580&&t<=2400&&(r=n.width()*.33333));u=0;i==".list_articles .post"?u=averageWorksHeight(i):(o=averageWorksWidth(i)/averageWorksHeight(i),u=r/o);var h=$("#sidebar").height(),c=Math.round(Math.round(h+Math.round(u/2))/u),l=Math.round(Math.round(n.width())/r),e=n.children(i).length;e<=f?showWorksForPage(c*l,i):(s=t>=1501?e:3*Math.floor(e/3),showWorksForPage(s,i))}}function showWorksForPage(n,t){var r=$(t),i;r.hide();i=$(t+":lt("+n+")");i.show()}function averageWorksWidth(n){var t=0,i=0,r=$(n);return r.each(function(){var n=$(this).outerWidth(!0);n>200?(t+=n,i++):(t+=200,i++)}),t/i}function averageWorksHeight(n){var t=0,i=0,r=$(n);return r.each(function(){var n=$(this).outerHeight(!0);n>100?(t+=n,i++):(t+=100,i++)}),t/i}function formReset(){$(".thank-you").hide();$("#form-contact").animate({opacity:"1"},0)}function formReset(){$(".thank-you").hide();$("#form-contact").animate({opacity:"1"},0)}$(document).ready(function(){$("ul,ol").each(function(){$("li:last",this).addClass("last");$("li:first",this).addClass("first")});$("a[href=#]").click(function(n){n.preventDefault()});$("input[data-placeholder], textarea[data-placeholder]").each(function(){var n=$(this).attr("data-placeholder");$(this).val()!==undefined&&$(this).val().length>0&&$(this).val()!=n?$(this).removeClass("placeholder"):($(this).val(n),$(this).addClass("placeholder"));$(this).focusin(function(){$(this).removeClass("placeholder");($(this).val()===undefined||$(this).val()==n)&&$(this).val("")});$(this).focusout(function(){($(this).val()===undefined||$(this).val()==""||$(this).val()==n)&&($(this).val(n),$(this).addClass("placeholder"))})});$("#main_menu a").each(function(n,t){var u=$(t),i=u.children("figure"),r=i.children("img"),f=i.attr("class").replace(" ","-")+".png",e=i.attr("class").replace(" active","")+"-hover.gif";r.attr("src","/Content/site/images/"+f);u.hover(function(){r.attr("src","/Content/site/images/"+e)},function(){r.attr("src","/Content/site/images/"+f)})});$(".title h2,.title .h2").hover(function(){$(this).children("span").addClass("hover").stop().animate({marginLeft:50},{duration:500,queue:!1});$(this).parents(".title").find(".shadow").stop().animate({marginLeft:50},{duration:500,queue:!1});$(this).parents(".title").find(".icon").stop().fadeIn(500).animate({marginLeft:0},{duration:500,queue:!1})},function(){$(this).children("span").removeClass("hover").stop().animate({marginLeft:0},{duration:300,queue:!1});$(this).parents(".title").find(".shadow").stop().animate({marginLeft:0},{duration:500,queue:!1});$(this).parents(".title").find(".icon").stop().fadeOut(200).animate({marginLeft:50},{duration:200,queue:!1})});$(".pagination ul li.prev a span,.pagination ul li.next a span").hover(function(){$(this).stop().animate({opacity:0},300)},function(){$(this).stop().animate({opacity:1},300)});slider("#everything",".s_index_two");slider("#own_projects",".s_index_one");slider("#jobs",".s_index_four");slider("#exhibition","none");slider("#press_pras",".s_index_five");slider("#most_recent",".s_index_three");$(".pictures").on("mouseover"," .wrapper_image",function(){$(this).find(".show_text").stop().fadeIn()});$(".pictures").on("mouseout"," .wrapper_image",function(){$(this).find(".show_text").stop().fadeOut()});$(".item_menu a").hover(function(){$(this).parent(".item_menu").addClass("hover").find("em").hide();$(this).find("span").stop().fadeIn()},function(){$(this).parent(".item_menu").removeClass("hover").find("em").stop().fadeIn();$(this).find("span").hide()});$(".link_pras_android a").hover(function(){$(this).parent(".link_pras_android").css({zIndex:"13"})},function(){$(this).parent(".link_pras_android").css({zIndex:"10"})});$("#command").length&&($("#command").smoothDivScroll({mousewheelScrolling:"allDirections",touchScrolling:!0,startAtElementId:"first",autoScrollingInterval:15}),$("#command .info").everyTime(500,"timer",function(){$(this).toggleClass("puls")}),$("#command .info").hover(function(){$(this).find(".show").fadeIn().find(".bg").animate({width:"172px"},1200);$(this).stopTime("timer")},function(){$(this).find(".show").fadeOut().find(".bg").animate({width:"0"},1200);$(this).everyTime(1e3,"timer",function(){$(this).toggleClass("puls")})}));$(".show-popup").on("click",function(){var n=$(document).scrollTop();return $(".popup").css({top:n}),$("#shadow").fadeIn(300),$(".popup").fadeIn(300),!1});$(".popup .icon-close").on("click",function(){return $("#shadow").fadeOut(300),formReset(),$(".popup").fadeOut(300),!1});$(document).keyup(function(n){n.keyCode==27&&($("#shadow").fadeOut(300),formReset(),$(".popup").fadeOut(300))});$("#shadow").click(function(n){$("#shadow").fadeOut(300);$(".popup").fadeOut(300);formReset();n.preventDefault()});$(".fancybox").length>0&&$(".fancybox").fancybox({nextEffect:"fade",padding:[5,5,5,5],helpers:{title:{type:"over"},overlay:{locked:!1}},tpl:{next:'<a class="fancybox-nav fancybox-next"><\/a>',prev:'<a class="fancybox-nav fancybox-prev"><\/a>'},prevEffect:"none",nextEffect:"none"});$("#btn-more-pictures").click(function(){Information.HISTORY_LINK=Information.HISTORY_LINK.replace(Information.PAGE,Information.PAGE+1);window.history.pushState(null,null,Information.HISTORY_LINK);Information.PAGE++;var n=$(this),t=n.attr("data-count");$.ajax({type:"PUT",url:Information.LINK,data:"count="+t,success:function(t){t.RemoveButton?n.parent().remove():n.attr("data-count",t.CountPictures);$elements=$(t.ListPictures);$("#preloader").children(".pictures").append($elements.animate({opacity:0},0).animate({opacity:1},1e3));showWork()}})});$("#btn-more-projects").click(function(){Information.HISTORY_LINK=Information.HISTORY_LINK.replace(Information.PAGE,Information.PAGE+1);window.history.pushState(null,null,Information.HISTORY_LINK);Information.PAGE++;var n=$(this),t=n.attr("data-count");$.ajax({type:"PUT",url:Information.LINK,data:"count="+t,success:function(t){t.RemoveButton?n.parent().remove():n.attr("data-count",t.CountProjects);$elements=$(t.ListWorks);$(".content").children(".list-projects").append($elements.animate({opacity:0},0).animate({opacity:1},1e3));showWork()}})});$("#btn-more-press").click(function(){Information.HISTORY_LINK=Information.HISTORY_LINK.replace(Information.PAGE,Information.PAGE+1);window.history.pushState(null,null,Information.HISTORY_LINK);Information.PAGE++;var n=$(this),t=n.attr("data-count");$.ajax({type:"PUT",url:Information.LINK,data:"count="+t,success:function(t){t.RemoveButton?n.parent().remove():n.attr("data-count",t.CountPress);$elements=$(t.ListWorks);$(".content").children(".list_articles").append($elements.animate({opacity:0},0).animate({opacity:1},1e3));showWork()}})});$("#btn-more-works").click(function(){Information.HISTORY_LINK=Information.HISTORY_LINK.replace(Information.PAGE,Information.PAGE+1);window.history.pushState(null,null,Information.HISTORY_LINK);Information.PAGE++;var n=$(this),t=n.attr("data-count"),i=n.attr("data-person");$.ajax({type:"PUT",url:Information.LINK,data:"count="+t+"&personId="+i,success:function(t){t.RemoveButton?n.parent().remove():n.attr("data-count",t.CountWorks);$elements=$(t.ListWorks);$("#preloader").children(".works").append($elements.animate({opacity:0},0).animate({opacity:1},1e3));showWork()}})});$("#btn-more-news").click(function(){Information.HISTORY_LINK=Information.HISTORY_LINK.replace(Information.PAGE,Information.PAGE+1);window.history.pushState(null,null,Information.HISTORY_LINK);Information.PAGE++;var n=$(this),t=n.attr("data-count");$.ajax({type:"PUT",url:Information.LINK,data:"count="+t,success:function(t){t.RemoveButton?n.parent().remove():n.attr("data-count",t.CountNews);$elements=$(t.ListWorks);$("#preloader").children(".pictures").append($elements.animate({opacity:0},0).animate({opacity:1},1e3));showWork()}})});$("#btn-more-innerworks").click(function(){Information.HISTORY_LINK=Information.HISTORY_LINK.replace(Information.PAGE,Information.PAGE+1);window.history.pushState(null,null,Information.HISTORY_LINK);Information.PAGE++;var n=$(this),t=n.attr("data-count"),i=n.attr("data-url");$.ajax({type:"PUT",url:Information.LINK,data:"count="+t+"&url="+i,success:function(t){t.RemoveButton?n.parent().remove():n.attr("data-count",t.CountWorks);$elements=$(t.ListWorks);$("#preloader").children(".works").append($elements.animate({opacity:0},0).animate({opacity:1},1e3));showWork()}})})});$(window).load(function(){resizeWorkControl();$(".works").animate({opacity:1},1e3);$("#preloader").addClass("end");$("#command").animate({opacity:1},100)});$(window).resize(showWork);$("#example-click").on("click",function(){var n=$("#form-order").find("input[type=text]"),t=$("#form-order").find("textarea");return $.each(n,function(n,t){$(t).val()==$(t).data("placeholder")&&$(t).val(null)}),$.each(t,function(n,t){$(t).text()==$(t).data("placeholder")&&$(t).text(null)}),$("#form-order").valid()&&$.ajax({type:"POST",data:$("#form-order").serialize(),url:"/Interface/SendOrder/",success:function(n){n==="True"&&($("#form-order")[0].reset(),$("#form-contact").animate({opacity:"0"},1e3),$(".thank-you").fadeIn(1e3))}}),!1});$("#form-order").length>0&&($(".captcha").find("a").prop("href","#"),$(".captcha").find("a").prop("onclick","return false"),$.validator.setDefaults({highlight:function(n){elemForm=$(n).closest(".form-line").addClass("error")},unhighlight:function(n){$(n).closest(".form-line").removeClass("error")}}))