function getViewportSize(){var e=window,a="inner";return"innerWidth"in window||(a="client",e=document.documentElement||document.body),{width:e[a+"Width"],height:e[a+"Height"]}}function fixIE8rgba(){var $=jQuery;if(8===isOldIE()){var selectors=[".pi-tooltip"],$elements=$(selectors.join(","));$elements.each(function(){var $el=$(this),bg=$el.css("background"),rgba=bg.match(/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3})\)/),hex=rgba?rgba2hex(rgba[1],rgba[2],rgba[3],rgba[4]):"#000000";rgba&&hex&&$el.css("background","filter: progid:DXImageTransform.Microsoft.gradient(startColorStr="+hex+", EndColorStr="+hex+")")})}}function isOldIE(){var version=navigator.appVersion.match(/MSIE (\d)\.\d*/);return version?version[1]:!1}function rgb2hex(rgb){return rgb||(rgb="rgb(0,0,0)"),rgb=rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),"#"+hex(rgb[1])+hex(rgb[2])+hex(rgb[3])}function hex(x){return isNaN(x)?"00":hexDigits[(x-x%16)/16]+hexDigits[x%16]}function rgba2hex(r,g,b,a){if(r>255||g>255||b>255||a>255)throw"Invalid color component";return(256+r).toString(16).substr(1)+((1<<24)+(g<<16)|b<<8|a).toString(16).substr(1)}function getElementHeight($el){var h=0,vis=$el.css("visibility"),display=$el.css("display");return"none"==display||"none !important"==display?($el.css({visibility:"hidden",display:"block"}),h=$el.outerHeight(),$el.css({visibility:vis,display:display})):h=$el.outerHeight(),h}function PiImagesLoader($el,callback,delay){var o={},$=jQuery;o.$el=$el?"string"==typeof $el?jQuery($el):$el:0,o.$imgs=o.$el.find("img"),o.imgsQ=o.$imgs.length,o.imgsQ_loaded=0,o.delay=delay?delay:0,o.started=0,o.loaderShown=0,o.$loadingAnimation=0,o.$dots=0,o.s={c:{}},o.s.dotDistance=14,o.s.dotQuantity=3,o.s.dotAnimationSpeed=100,o.s.c.loading="pi-loader",o.s.c.dot="pi-loader-dot",o.s.c.dotActive="pi-loader-dot-active",o.callback=callback&&"function"==typeof callback?callback:function(){},o.addLoadingAnimation=function(){o.loaderShown=!0;for(var appendHtml='',i=0;i';appendHtml+="",$(appendHtml).appendTo(o.$el),o.$loadingAnimation=o.$el.find("."+o.s.c.loading),o.$dots=o.$loadingAnimation.find("."+o.s.c.dot),o.activeDotNum=0,requestAnimationFrame(o.loadingDotsAnimate,o.$el)},o.hideLoadingAnimation=function(){o.loaderShown=0,o.$dots.each(function(){$(this).removeClass(o.s.c.dotActive)}),o.$loadingAnimation.remove()},o.loadingDotsAnimate=function(time){if(o.$loadingAnimation){o.loadingAnimationStartTime||(o.loadingAnimationStartTime=time);var needToRedraw=time-o.loadingAnimationStartTime>=200?1:0;if(needToRedraw){o.loadingAnimationStartTime=time;var $currentDot=o.$dots.eq(o.activeDotNum),$previousDot=$currentDot.prev();$previousDot.get(0)||($previousDot=o.$dots.eq(o.s.dotQuantity-1)),$currentDot.addClass(o.s.c.dotActive),$previousDot.removeClass(o.s.c.dotActive),o.activeDotNum++,o.activeDotNum>=o.s.dotQuantity+1&&(o.activeDotNum=0)}requestAnimationFrame(o.loadingDotsAnimate)}},o.check_images_states=function(){o.$imgs.each(function(){var oldImg=new Image,newImg=new Image,imgSrc=$(this).attr("src");oldImg.src=imgSrc,oldImg.complete?o.image_was_loaded():(jQuery(newImg).load(function(){o.image_was_loaded()}).error(function(){o.image_was_loaded()}),newImg.src=imgSrc)}),o.addLoadingAnimation()},o.image_was_loaded=function(){o.imgsQ_loaded++,o.check_ready_state()},o.check_ready_state=function(){o.imgsQ!=o.imgsQ_loaded||o.started||(o.started=!0,setTimeout(function(){o.callback(),o.loaderShown&&o.hideLoadingAnimation()},o.delay))},o.init=function(){o.imgsQ>0?o.check_images_states():o.callback()},o.init()}var hexDigits=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"),piBounds={lg:1140,md:992,sm:768,xs:480,xs2:320};jQuery(function($){function checkBound(){var previousBound=window.piCurrentBound;window.piViewportSize=getViewportSize(),window.piViewportWidth=window.piViewportSize.width,window.piViewportHeight=window.piViewportSize.height,window.piViewportWidth>=piBounds.lg&&"lg"!=window.piCurrentBound?window.piCurrentBound="lg":window.piViewportWidth>=piBounds.md&&window.piViewportWidth=piBounds.sm&&window.piViewportWidth=piBounds.xs&&window.piViewportWidth=piBounds.xs2&&window.piViewportWidth$mainWrapperWidth-offset?$submenu.addClass(classLeftSide):$mainWrapperWidth-initialOffset>width&&$submenu.removeClass(classLeftSide)}var $w=$(window),$mainWrapperWidth=$("#pi-all").width(),mainWrapDifference=(window.piViewportWidth-$mainWrapperWidth)/2,classLeftSide="pi-submenu-left-side";$(".pi-submenu").each(function(){var timer,$el=$(this),initialOffset=$el.offset().left-mainWrapDifference;$w.on("resize",function(){clearTimeout(timer),timer=setTimeout(function(){$mainWrapperWidth=$("#pi-all").width(),mainWrapDifference=(window.piViewportWidth-$mainWrapperWidth)/2,checkMenus($el,initialOffset)},200)}),checkMenus($el,initialOffset)})}),jQuery(function($){function checkHeaderBlocks(){for(var i=0;i1?сlassFixedRows:сlassFixedRow,$w.scroll(function(){scrollTop=$w.scrollTop(),checkHeader()})}function checkHeader(){fixHeader(),$reducibleRow.length&&reduceHeader()}function fixHeader(){scrollTop>=headerTopOffset?"default"==stateFixed&&(requestAnimationFrame(function(){$b.addClass(сlassFixed)}),stateFixed="fixed"):"fixed"==stateFixed&&(requestAnimationFrame(function(){$b.removeClass(сlassFixed)}),stateFixed="default")}function reduceHeader(){var scrollTopExcess=scrollTop-headerTopOffset;scrollTopExcess>reduceTreshold&&"reduced"!=stateReduce?(requestAnimationFrame(function(){$reducibleRow.addClass(classReduced)}),stateReduce="reduced"):reduceTreshold>=scrollTopExcess&&"default"!=stateReduce&&(requestAnimationFrame(function(){$reducibleRow.removeClass(classReduced)}),stateReduce="default")}var $w=$(window),$b=$("body"),classRow="pi-section-w",сlassFixedRow="pi-header-row-fixed",сlassFixedRows="pi-header-rows-fixed",сlassFixed="",classReducible="pi-row-reducible",classReduced="pi-row-reduced",$stickyHeader=$(".pi-header-sticky"),$reducibleRow=$stickyHeader.find("."+classReducible),rowsQuantity=$stickyHeader.find("."+classRow).length,reduceTreshold=400,stateFixed="default",stateReduce="default",headerTopOffset=0,scrollTop=0;$stickyHeader.length&&(init(),checkHeader())}),jQuery(function($){function MobileMenus(){function init(){$("."+settings.classMenuItemHasSubmenu).each(function(){$(this).find(" > a").on("click",function(e){"lg"!=window.piCurrentBound&&e.preventDefault()})}),$(".pi-mobile-menu-toggler").each(function(){var $el=$(this);if(!$el.get(0).piMenuWasInitialized){$el.get(0).piMenuWasInitialized=1;var mobileMenu={$parentRowWrapper:null,$toggler:$el,$wrapper:null,$menu:null,height:null,top:null,state:0};mobileMenu.$parentRowWrapper=$(mobileMenu.$toggler.parents("."+settings.classParentRowWrapper)),mobileMenu.$wrapper=$(mobileMenu.$toggler.data("target")),mobileMenu.$menu=mobileMenu.$wrapper.find("."+settings.classMenu),mobileMenu.$menuElements=mobileMenu.$menu.find("li"),mobileMenu.height=mobileMenu.$menu.outerHeight(),mobileMenu.$toggler.click(function(){toggleMenu(mobileMenu)}),mobileMenu.$menuElements.each(function(){var $li=$(this);$li.get(0).$link=$li.find(" > a"),$li.get(0).$siblings=$li.siblings(),$li.get(0).$list=$li.find(" > ul"),$li.get(0).$list.length&&$li.get(0).$link.click(function(e){toggleSubmenu(mobileMenu,$li),e.preventDefault()})}),$d.bind("piBoundChanged",function(){mobileMenu.state&&mobileMenu.$toggler.is(":hidden")&&toggleMenu(mobileMenu)}),mobileMenus.push(mobileMenu)}}),$w.resize(function(){clearTimeout(resizeTmt),resizeTmt=setTimeout(function(){checkMobileSubmenuHeight()},100)}),checkMobileSubmenuHeight()}function toggleSubmenu(mobileMenu,$li){$li.get(0).$list.hasClass("pi-active")?(mobileMenu.height=mobileMenu.height-$li.get(0).listHeight,mobileMenu.$wrapper.height(mobileMenu.height),$li.get(0).$list.removeClass("pi-active"),$li.get(0).$list.animate({height:0},500,function(){changeParentsListHeight($li,$li.get(0).listHeight,"take")})):(mobileMenu.height=mobileMenu.height+$li.get(0).listHeight,mobileMenu.$wrapper.height(mobileMenu.height),$li.get(0).$list.addClass("pi-active"),$li.get(0).$list.animate({height:$li.get(0).listHeight},500,function(){changeParentsListHeight($li,$li.get(0).listHeight,"add"),$(this).height("auto")}),$li.get(0).$siblings.each(function(){$(this).find(" > ul.pi-active").length&&toggleSubmenu(mobileMenu,$(this))}))}function changeParentsListHeight($li,h,action){var parentLI=$li.parents("li").length?$li.parents("li").eq(0):null;parentLI&&parentLI.get(0).listHeight&&("add"==action?parentLI.get(0).listHeight+=h:parentLI.get(0).listHeight-=h,changeParentsListHeight(parentLI,h,action))}function checkMobileSubmenuHeight(){for(var i=0;i=documentHeight-footerHeight;scrollTop>=treshold?$arrow.addClass(classActive):$arrow.removeClass(classActive),nearFooter&&"lg"!=window.piCurrentBound?$arrow.addClass(classBottom):$arrow.removeClass(classBottom)}var scrollCheckTmt,$w=$(window),$d=$(document),$arrow=$(".pi-scroll-top-arrow"),classActive="pi-active",classBottom="pi-scroll-top-arrow-footer",footerHeight=100,treshold=400;$arrow.length&&($w.on("scroll resize",function(){clearTimeout(scrollCheckTmt),scrollCheckTmt=setTimeout(function(){checkArrow()},100)}),$arrow.on("click",function(){$arrow.removeClass(classActive)}))}),jQuery(function($){$(".pi-jump a,.pi-jump-bg a").each(function(){var $el=$(this);$el.append($el.find("i").clone())}),$(".pi-social-icons-big a i").wrap("")}),jQuery(function($){$(".pi-overlay-slide:not(.pi-caption-opened)").each(function(){var $caption=$(this),$parent=$caption.parents(".pi-img-w"),height=$caption.outerHeight(!0);$caption.hasClass("pi-show-heading")&&(height-=$caption.find("h2,h3,h4,h5,h6").eq(0).outerHeight(!0)+parseInt($caption.css("padding-top"),10)),$caption.css({bottom:-height,visibility:"visible"}),$parent.hover(function(){$caption.css({bottom:0})},function(){$caption.css({bottom:-height})})})}),jQuery(function($){$(".pi-contact-form").submit(function(){var $form=$(this),$error=$form.find(".pi-error-container"),action=$form.attr("action");return $error.slideUp(750,function(){$error.hide();var $name=$form.find(".form-control-name"),$email=$form.find(".form-control-email"),$companyName=$form.find(".form-control-company-name"),$phone=$form.find(".form-control-phone"),$budjet=$form.find(".form-control-budjet"),$comments=$form.find(".form-control-comments"),captchaEnabled="no"==$form.data("captcha")?0:1,$recaptcha=$form.find("#recaptcha_response_field"),$recaptcha_challenge=$form.find("#recaptcha_challenge_field");$.post(action,{name:$name.val(),email:$email.val(),companyName:$companyName.val(),phone:$phone.val(),budjet:$budjet.val(),comments:$comments.val(),captchaEnabled:captchaEnabled,recaptcha:$recaptcha.val(),recaptcha_challenge:$recaptcha_challenge.val()},function(data){$error.html(data),$error.slideDown("slow"),null!=data.match("success")&&($name.val(""),$email.val(""),$companyName.val(""),$phone.val(""),$budjet.val(""),$comments.val(""))})}),!1})}),jQuery(function($){function piColorboxInit(){colorboxNeeded=0;for(var i in breakpoints)if(breakpoints[i]==window.piCurrentBound){colorboxNeeded=1;break}colorboxNeeded&&!colorboxState?($colorboxLinks.each(function(){var $el=$(this),videoData=$el.data("videoSize"),videoSize=videoData?videoData.split(","):0,groupFromData=$el.data("colorboxGroup"),group=groupFromData?groupFromData:"pi-group";videoSize[0]?(videoSize[0]=parseInt(videoSize[0],10),videoSize[1]=parseInt(videoSize[1],10),"number"==typeof videoSize[0]&&"number"==typeof videoSize[1]&&$el.colorbox({rel:group,iframe:!0,innerWidth:videoSize[0],innerHeight:videoSize[1],maxWidth:"95%",maxHeight:"95%"})):$el.colorbox({rel:group,maxWidth:"95%",maxHeight:"95%"})}),colorboxState=1):!colorboxNeeded&&colorboxState&&($colorboxLinks.colorbox.remove(),colorboxState=0)}if($.fn.colorbox){var $d=$(document),$colorboxLinks=($(window),$(".pi-colorbox")),breakpoints=["sm","md","lg"],colorboxState=0,colorboxNeeded=0;$d.bind("piBoundChanged",piColorboxInit),piColorboxInit()}});