function initPopuga(){"use strict";function e(){if($(".gallery-items").length){var i=$(".gallery-items").isotope({singleMode:!0,columnWidth:".grid-sizer, .grid-sizer-second, .grid-sizer-three",itemSelector:".gallery-item, .gallery-item-second, .gallery-item-three"});i.imagesLoaded(function(){i.isotope("layout")}),$(".gallery-filters").on("click touchstart","a.gallery-filter",function(e){e.preventDefault();var t=$(this).attr("data-filter");$(this).text();i.isotope({filter:t}),$(".gallery-filters a").removeClass("gallery-filter-active"),$(this).addClass("gallery-filter-active")})}$(".gallery-items").isotope("on","layoutComplete",function(e,t){t=e.length;$(".num-album").html(t)});var e=$(".gallery-item").length;$(".all-album , .num-album").html(e)}if($(".loader").fadeOut(500,function(){$("#main").animate({opacity:"1"},500)}),$(".bg").each(function(e){$(this).attr("data-bg")&&$(this).css("background-image","url("+$(this).data("bg")+")")}),$(".scroll-nav-wrap ").scrollToFixed({minWidth:1068,zIndex:112,marginTop:90}),$(".boxed-filter").scrollToFixed({minWidth:1068,zIndex:112,marginTop:60}),$(".fix-tab").scrollToFixed({minWidth:1068,zIndex:112,marginTop:170,removeOffsets:!0,limit:function(){return $(".limit-box").offset().top-$(".fix-tab").outerHeight(!0)}}),$(".fix-aside").scrollToFixed({minWidth:1258,zIndex:112,marginTop:110,removeOffsets:!0,limit:function(){return $(".limit-box").offset().top-$(".fix-aside").outerHeight(!0)}}),e(),$(window).on("load",function(){e()}),$(".gallery-item").on("touchstart",function(){$(this).trigger("hover")}).on("touchend",function(){$(this).trigger("hover")}),0<$(".portfolio-wrap").length)new Swiper(".portfolio-wrap .swiper-container",{slidesPerView:"auto",centeredSlides:!1,spaceBetween:10,grabCursor:!0,freeMode:!0,mousewheelControl:!0,mousewheelReleaseOnEdges:!0,mousewheelSensitivity:1,preloadImages:!0,updateOnImagesReady:!0,scrollbar:".swiper-scrollbar",pagination:".swiper-pagination",paginationType:"fraction",scrollbarHide:!1,nextButton:".swiper-button-next",prevButton:".swiper-button-prev"});if(0<$(".fs-gallery-wrap").length){var t=$(".fs-gallery-wrap").data("autoplayslider"),i=$(".fs-gallery-wrap").data("slidereffect");new Swiper(".fs-gallery-wrap .swiper-container",{autoplay:t,autoplayDisableOnInteraction:!1,pagination:".swiper-pagination",paginationClickable:!0,effect:i,speed:1e3,grabCursor:!0,nextButton:".swiper-button-next",prevButton:".swiper-button-prev",loop:!0,mousewheelControl:!1,mousewheelReleaseOnEdges:!0,mousewheelSensitivity:1})}new Swiper(".single-slider .swiper-container",{pagination:".swiper-pagination",paginationType:"fraction",effect:$(".single-slider").data("effects"),loop:!0,grabCursor:!0,autoHeight:!0,nextButton:".swiper-button-next",prevButton:".swiper-button-prev"}),new Swiper(".inline-carousel .swiper-container",{pagination:".swiper-pagination",slidesPerView:6,breakpoints:{1830:{slidesPerView:5},1585:{slidesPerView:4},1340:{slidesPerView:3},1199:{slidesPerView:3},1175:{slidesPerView:2},480:{slidesPerView:2}},paginationClickable:!0,spaceBetween:10,nextButton:".inline-car-control .swiper-button-next",prevButton:".inline-car-control .swiper-button-prev"});$(".image-popup , .single-popup-image").lightGallery({selector:"this",cssEasing:"cubic-bezier(0.25, 0, 0.25, 1)",download:!1,counter:!1});var n=$(".lightgallery"),a=n.data("looped");n.lightGallery({selector:".lightgallery a.popup-image , .lightgallery a.popgal",cssEasing:"cubic-bezier(0.25, 0, 0.25, 1)",download:!1,loop:a,counter:!1}),$(".filter-button").on("click touchstart",function(){$(".hid-filter").slideToggle(500)}),$(".stats").appear(function(){$(".num").countTo()}),$(".inline-facts").append(""),$(".dec-counter").each(function(){var e=$(this).parents(".inline-facts").find("div.num").data("num");$(this).text(e)}),$(".piechart-holder").appear(function(){$(this).find(".chart").each(function(){$(".chart").easyPieChart({barColor:"#F9C413",trackColor:"#404040",scaleColor:!1,size:"150",lineWidth:"40",lineCap:"butt",animate:3500,easing:"easeInBounce",onStep:function(e,t,i){$(this.el).find(".percent").text(Math.round(i))}})})}),$(".skillbar-box").appear(function(){$(this).find("div.skillbar-bg").each(function(){$(this).find(".custom-skillbar").delay(600).animate({width:$(this).attr("data-percent")},1500)})}),$(".nav-holder-wrap , .twitter-widget-wrap").perfectScrollbar();var r=$(".share-container");$(".show-share").on("click touchstart",function(e){return r.animate({top:0},550),!1}),$(".closeshare").on("click touchstart",function(e){return e.preventDefault(),r.animate({top:"-150px"},550),!1}),$(".share-container").share({networks:["facebook","pinterest","googleplus","twitter","linkedin"]}),$("ul.tabs li").on("click",function(){var e=$(this).attr("data-tab");return $("ul.tabs li").removeClass("current"),$(".tab-content").removeClass("current"),$(this).addClass("current"),$("#"+e).addClass("current"),!1}),$(".custom-scroll-link").on("click",function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")||location.hostname==this.hostname){var e=$(this.hash);if((e=e.length?e:$("[name="+this.hash.slice(1)+"]")).length)return $("html,body").animate({scrollTop:e.offset().top-70},{queue:!1,duration:1200,easing:"easeInOutExpo"}),!1}}),$(".scroll-nav ul").singlePageNav({filter:":not(.external)",updateHash:!1,offset:140,threshold:140,speed:1200,currentClass:"act-link"}),$(".to-top").on("click",function(e){return e.preventDefault(),$("html, body").animate({scrollTop:0},800),!1});var o=$(".background-youtube").data("vid"),l=$(".background-youtube").data("mv");$(".background-youtube").YTPlayer({fitToBackground:!0,videoId:o,pauseOnScroll:!0,mute:l,callback:function(){$(".background-video").data("ytPlayer").player}});var s=$(".background-vimeo").data("vim");$(".background-vimeo").append(''),$(".video-holder").height($(".media-container").height()),1024<$(window).width()?0<$(".video-holder").size()&&($(".media-container").height()/9*16>$(".media-container").width()?($(".background-vimeo iframe ").height($(".media-container").height()).width($(".media-container").height()/9*16),$(".background-vimeo iframe ").css({"margin-left":-1*$("iframe").width()/2+"px",top:"-75px","margin-top":"0px"})):($(".background-vimeo iframe ").width($(window).width()).height($(window).width()/16*9),$(".background-vimeo iframe ").css({"margin-left":-1*$("iframe").width()/2+"px","margin-top":-1*$("iframe").height()/2+"px",top:"50%"}))):($(window).width(),$(".video-holder").height($(".media-container").height()),$(".background-vimeo iframe ").height($(".media-container").height())),$(".video-container").css("width",$(window).width()+"px"),$(".video-container ").css("height",.5625*$(window).width()),$(".video-container").height()<$(window).height()&&($(".video-container ").css("height",$(window).height()+"px"),$(".video-container").css("width",1280/720*$(window).height())),$(".nav-holder nav li a.act-link").closest("li").addClass("actli"),$(".nav-holder nav li ul").parent("li").append(''),$(".nav-holder nav li").on("click",function(){$(this).each(function(){$(this).children("ul").stop().slideToggle(400)})}),$(".nav-button").on("click touchstart",function(){return $(this).parent(".nav-button-wrap").hasClass("vis-menbut")?($(".nav-holder-wrap").animate({left:0},550),$(".nav-button-wrap").removeClass("vis-menbut")):($(".nav-holder-wrap").animate({left:"-450px"},550),$(".nav-button-wrap").addClass("vis-menbut")),!1}),$(".filter-header").on("click",function(){return $(window).width()<1258&&$(".fixed-filter .gallery-filters").slideToggle(400),!1});var c=$(".search-form-wrap");function d(){c.removeClass("visserch")}$(".act-search").on("click",function(){c.addClass("visserch"),p()}),$(".close-search").on("click",function(){d()});var u=$(".twitter-widget-wrap"),h=$(".active-twitter");function p(){u.removeClass("vistwitt"),h.addClass("twittact")}if(h.on("click",function(){$(this).hasClass("twittact")?(d(),u.addClass("vistwitt"),h.removeClass("twittact")):p()}),0<$("#header-twitts").length){twitterFetcher.fetch({profile:{screenName:"katokli3mmm"},domId:"header-twitts",maxTweets:5,enableLinks:!0,showImages:!1})}}function initparallax(){var e={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return e.Android()||e.BlackBerry()||e.iOS()||e.Opera()||e.Windows()}};if(trueMobile=e.any(),null==trueMobile){var t=new Scrollax;t.reload(),t.init()}trueMobile&&$(".background-video").remove()}function wheel(e){var t=0;e.wheelDelta?t=e.wheelDelta/80:e.detail&&(t=-e.detail/3),handle(t),e.preventDefault&&e.preventDefault(),e.returnValue=!1}$(function(){initPopuga(),initparallax()}),$(document).ready(function(){0}),window.addEventListener&&window.addEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=wheel;var goUp=!0,end=null,interval=null;function handle(e){null==end&&(end=$(window).scrollTop()),end-=50*e,goUp=0=$(window).prop("scrollHeight")-$(window).height()||goUp&&-1