(function(a){var b={initialised:false,mobile:false,container:a("#portfolio-item-container"),blogContainer:a("#blog-item-container"),portfolioElAnimation:true,init:function(){if(!this.initialised){this.initialised=true}else{return}
this.checkMobile();this.pageHeaderTitleAlign();this.menuHover();this.stickyMenu();this.mobileMenuDropdownFix();this.navbarBtnClassToggle();this.headerSearchFormFix();this.headerSearchFormClose();this.toggleBtn();this.toggleOverlayClick();this.fullHeight();this.sideMenuCollapse();this.ratings();this.collapseArrows();this.scrollToTopAnimation();this.scrollToClass();this.menuOnClick();this.productZoomImage();this.filterColorBg();this.selectBox();this.boostrapSpinner();this.dateTimePicker();this.tooltip();this.popover();this.servicesHover();this.countTo();this.progressBars();this.registerKnob();this.flickerFeed();this.attachBg();this.parallax();this.twitterFeed();this.tabLavaHover();this.videoBg();if(a.fn.owlCarousel){this.owlCarousels()}
if(a.fn.magnificPopup){this.newsletterPopup();this.lightBox()}
if(a.fn.mediaelementplayer){this.mediaElement()}
if(a.fn.noUiSlider){this.priceSlider()}
var c=this;if(typeof imagesLoaded==="function"){imagesLoaded(c.container,function(){c.isotopeActivate();c.isotopeFilter();c.infiniteScroll(a("#portfolio-item-container"),".portfolio-item")});imagesLoaded(c.blogContainer,function(){c.blogMasonry();c.infiniteScroll(a("#blog-item-container"),".entry")})}},checkMobile:function(){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){this.mobile=true}else{this.mobile=false}},navbarBtnClassToggle:function(){a("#main-navbar-container").on("show.bs.collapse hide.bs.collapse",function(c){a(".navbar-toggle").toggleClass("opened")})},toggleBtn:function(){var c=this;a(".btn-toggle").on("click",function(d){a(this).toggleClass("opened");if(a(this).hasClass("side-menu-btn")){c.toggleClassSideMenu()}
d.preventDefault()})},toggleOverlayClick:function(){var c=this;a(".boss-menu-overlay").on("click",function(d){a(".side-menu, .btn-toggle.side-menu-btn").toggleClass("opened");d.preventDefault()})},toggleClassSideMenu:function(){a(".side-menu").toggleClass("opened")},fullHeight:function(){a(".fullheight").each(function(){var c=a(window).height();a(this).css("height",c)})},pageHeaderTitleAlign:function(){if(a(".page-header-welcome.fullheight")){var f=a(window).height(),d=a("#header").find(".navbar").outerHeight(),e=a(".page-header-welcome.fullheight").find("h1").height(),c=(f-(d+e+150))/ 2;a(".page-header-welcome.fullheight").find("h1").css("padding-top",c)}},menuHover:function(){if(Modernizr.mq("only all and (min-width: 768px)")&&!Modernizr.touch){if(a.fn.hoverIntent){a("#header").find(".navbar-nav").hoverIntent({over:function(){var c=a(this);if(c.find("ul, div").length){c.addClass("open");c.find(".dropdown-toggle").addClass("disabled")}},out:function(){var c=a(this);if(c.hasClass("open")){c.removeClass("open");c.find(".dropdown-toggle").removeClass("disabled")}},selector:"li",timeout:145,interval:55})}}},mobileMenuDropdownFix:function(){if(Modernizr.mq("only all and (max-width: 767px)")||Modernizr.touch){a(".navbar-nav").find(".dropdown-toggle").on("click",function(c){var d=a(this).closest("li");d.siblings().removeClass("open").find("li").removeClass("open");d.toggleClass("open");c.preventDefault();c.stopPropagation()})}},stickyMenu:function(){if(a.fn.waypoint&&a(window).width()>=992){a(".sticky-menu").waypoint("sticky",{stuckClass:"fixed",offset:-300})}},destroyStickyMenu:function(){if(a.fn.waypoint&&a(window).width()<=991){a(".sticky-menu").waypoint("unsticky")}},headerSearchFormFix:function(){a("[data-target='#header-search-form']").on("click",function(c){if(a(".sticky-menu").hasClass("fixed")){a("#header-search-form").toggleClass("fixed")}
c.preventDefault()})},headerSearchScrollFix:function(){if(a("#header-search-form").hasClass("fixed")){var c=a(window).scrollTop();if(c<=300){a("#header-search-form").removeClass("fixed")}}},headerSearchFormClose:function(){a("body").on("click",function(c){if(a("#header-search-form").hasClass("in")&&!a(c.target).closest("#header-search-form").length){a("#header-search-form").collapse("hide").removeClass("fixed");c.preventDefault()}})},sideMenuCollapse:function(){a(".side-menu").find(".navbar-nav").find("a").on("click",function(c){if(a(this).siblings("ul").length){a(this).siblings("ul").slideToggle(400,function(){a(this).closest("li").toggleClass("open")});c.preventDefault()}else{return}})},sideMenuScrollbar:function(){if(a.fn.niceScroll){var e=a(".side-menu"),d;if(e.hasClass("navbar-default")){d="#7a7a7a"}else{if(e.hasClass("navbar-inverse")){d="#9a9a9a"}else{d="#505050"}}
if(e.data("railalign")){var c=e.data("railalign")}
a(".side-menu-wrapper").niceScroll({zindex:9999,autohidemode:true,background:"rgba(0,0,0, 0.03)",cursorcolor:d,cursorwidth:"6px",cursorborder:"1px solid transparent",cursorborderradius:"4px",railalign:c})}},collapseArrows:function(){a(".category-widget-btn").on("click",function(d){var c=a(this),f=c.closest("li");if(f.hasClass("open")){f.find("ul").slideUp(400,function(){f.removeClass("open")})}else{f.find("ul").slideDown(400,function(){f.addClass("open")})}
d.preventDefault()})},twitterFeed:function(){if(a.fn.tweet&&a(".twitter-feed-widget").length){a(".twitter-feed-widget").tweet({modpath:"./js/twitter/",avatar_size:"",count:3,username:"eonythemes",loading_text:"searching twitter...",join_text:"",retweets:false,template:'
'})}},tabLavaHover:function(){if(a.fn.lavalamp){a(".nav-tabs-lava").lavalamp({setOnClick:true,duration:500,autoUpdate:true});a(".nav-tabs-border").lavalamp({setOnClick:true,duration:300,autoUpdate:true})}},ratings:function(){a.each(a(".ratings-result"),function(){var c=a(this),e=c.closest(".ratings").width(),f=a(this).data("result"),d=(e / 100)*f;a(this).css("width",d)})},owlCarousels:function(){var c=this;a(".owl-carousel.shop-arrivals-carousel-sm").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3}}});a(".owl-carousel.shop-popular-carousel-lg").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.shop-trend-carousel-lg").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.shop-blog-carousel-lg").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.shop-latest-carousel").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4},1200:{items:5}}});a(".owl-carousel.shop-popular-carousel").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4},1200:{items:5}}});a(".owl-carousel.shop-latest-carousel-sm").owlCarousel({loop:false,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.shop-popular-carousel-sm").owlCarousel({loop:false,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.team-carousel-index9").owlCarousel({loop:false,margin:25,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.our-clients-smaller").owlCarousel({loop:false,margin:10,responsiveClass:true,nav:false,navText:['',''],dots:true,responsive:{0:{items:2},480:{items:3},768:{items:4},992:{items:3},1200:{items:3}}});a(".owl-carousel.portfolio-showcase-carousel").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:4000,responsive:{0:{items:2},480:{items:2},768:{items:3},992:{items:4},1500:{items:4}}});a(".owl-carousel.our-clients-small").owlCarousel({loop:false,margin:10,responsiveClass:true,nav:false,navText:['',''],dots:false,responsive:{0:{items:2},480:{items:3},768:{items:4},992:{items:3},1200:{items:3}}});a(".owl-carousel.home-blogposts-carousel").owlCarousel({loop:true,margin:15,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:15000,responsive:{0:{items:1},480:{items:2},768:{items:2},992:{items:3}}});a(".owl-carousel.home-clients-carousel").owlCarousel({loop:true,margin:10,responsiveClass:true,nav:false,navText:['',''],dots:false,autoplay:true,autoplayTimeout:4000,responsive:{0:{items:2},480:{items:3},768:{items:4},992:{items:5}}});a(".owl-carousel.home-team-carousel").owlCarousel({loop:true,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4},1200:{items:5}}});a(".owl-carousel.our-clients").owlCarousel({loop:false,margin:10,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:2},480:{items:3},768:{items:4},992:{items:5},1200:{items:6}}});a(".owl-carousel.magazine-top-carousel-lg").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:12000,responsive:{0:{items:1},600:{items:2},992:{items:3},1200:{items:4}}});a(".owl-carousel.magazine-top-carousel").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:false,navText:['',''],dots:true,autoplay:true,autoplayTimeout:12000,responsive:{0:{items:1},600:{items:2},992:{items:3}}});a(".owl-carousel.mpopular-posts").owlCarousel({loop:true,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},600:{items:2},992:{items:3}}});a(".owl-carousel.mdontmiss-posts").owlCarousel({loop:true,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:13000,responsive:{0:{items:1},600:{items:2},992:{items:3}}});a(".owl-carousel.mbigger-posts").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:15000,items:1});a(".owl-carousel.mmostrated-posts").owlCarousel({loop:true,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:13000,responsive:{0:{items:1},600:{items:2},992:{items:3}}});a(".owl-carousel.home-blog-carousel").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:false,navText:['',''],dots:true,autoplay:true,autoplayTimeout:12000,responsive:{0:{items:1},600:{items:2},992:{items:3},1500:{items:4}}});a(".owl-carousel.team-member-carousel").owlCarousel({loop:false,margin:25,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4},1200:{items:5}}});a(".owl-carousel.team-member-carousel-sm").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:2},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.team-member-carousel-main").owlCarousel({loop:true,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:3000,responsive:{0:{items:2},480:{items:2},768:{items:3},992:{items:4}}});a(".owl-carousel.aboutus-slider").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:false,navText:['',''],dots:true,autoplay:true,autoplayTimeout:5000,items:1});a(".owl-carousel.aboutus-carousel").owlCarousel({loop:true,margin:0,stagePadding:50,responsiveClass:true,nav:false,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},992:{items:3,stagePadding:100}}});a(".owl-carousel.testimonial-slider").owlCarousel({loop:true,autoplay:true,autoplayTimeout:6000,margin:0,responsiveClass:true,nav:false,navText:['',''],dots:true,items:1});a(".owl-carousel.testimonial-carousel").owlCarousel({loop:true,margin:10,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:9000,responsive:{0:{items:1},992:{items:2}}});a(".owl-carousel.testimonial-carousel2").owlCarousel({loop:true,margin:10,responsiveClass:true,nav:false,navText:['',''],dots:true,autoplay:true,autoplayTimeout:9000,responsive:{0:{items:1},992:{items:2}}});a(".owl-carousel.product-gallery-lg").owlCarousel({loop:false,margin:6,responsiveClass:true,nav:false,dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:3},480:{items:4},768:{items:5},992:{items:6}}});a(".owl-carousel.related-products-carousel").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4},1200:{items:5}}});a(".owl-carousel.product-gallery-sm").owlCarousel({loop:false,margin:6,responsiveClass:true,nav:false,dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:3},480:{items:4},768:{items:4},1200:{items:5}}});a(".owl-carousel.related-products-carousel2").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:3},1200:{items:4}}});a(".owl-carousel.portfolio-related-carousel").owlCarousel({loop:false,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:false,autoplayTimeout:5000,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,}}});a(".owl-carousel.portfolio-star-carousel").owlCarousel({loop:true,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:5000,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,}}});a(".owl-carousel.pt_magazine").owlCarousel({loop:true,margin:0,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:5000,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:3,}}});a(".owl-carousel.portfolio-other-carousel").owlCarousel({loop:false,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,},1200:{items:5,}}});a(".owl-carousel.portfolio-similiar-carousel").owlCarousel({loop:false,margin:30,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,}}});a(".owl-carousel.portfolio-popular-carousel").owlCarousel({loop:false,margin:2,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,}}});a(".owl-carousel.portfolio-rated-carousel").owlCarousel({loop:false,margin:15,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,}}});a(".owl-carousel.portfolio-liked-carousel").owlCarousel({loop:false,margin:0,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:4,}}});a(".owl-carousel.our-partners").owlCarousel({loop:true,autoplay:true,autoplayTimeout:4000,margin:10,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:2,},480:{items:2},768:{items:4,},992:{items:4,},1200:{items:5,}}});a(".owl-carousel.our-trainers").owlCarousel({loop:true,autoplay:true,autoplayTimeout:4000,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},768:{items:3,},992:{items:3,},1200:{items:4,}}});a(".owl-carousel.branch-news").owlCarousel({loop:true,autoplay:true,autoplayTimeout:8000,margin:10,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:1},768:{items:1,},992:{items:1,},1200:{items:1,}}});a(".owl-carousel.blog-related-carousel").owlCarousel({loop:false,margin:15,responsiveClass:true,nav:true,navText:['',''],dots:false,responsive:{0:{items:1,},480:{items:2},1200:{items:3,}}});a(".owl-carousel.wishlist-suggestion-carousel").owlCarousel({loop:false,margin:20,responsiveClass:true,nav:true,navText:['',''],dots:false,autoplay:true,autoplayTimeout:10000,responsive:{0:{items:1},480:{items:2},768:{items:3},992:{items:4},1200:{items:5}}})},scrollTopBtnAppear:function(){var d=a(window).scrollTop(),c=a("#scroll-top");if(d>=300){c.addClass("fixed")}else{c.removeClass("fixed")}},scrollToAnimation:function(g,f,c){var h=a(this).attr("href"),j=false;if(!a(h).length){if(h==="#header"||h==="#top"||h==="#wrapper"){i=0;j=true}else{return}}else{var d=a(h),i=f?(d.offset().top+f):d.offset().top}
if(h||j){a("html, body").animate({scrollTop:i},g||1200);c.preventDefault()}},scrollToTopAnimation:function(){var c=this;a("#scroll-top").on("click",function(d){c.scrollToAnimation.call(this,1200,0,d)})},scrollToClass:function(){var c=this;a(".scroll-btn, .section-btn, .scrollto").on("click",function(d){var f=a(this).data("offset");c.scrollToAnimation.call(this,1200,f,d)})},menuOnClick:function(){var c=this;a(".navbar-nav").find("a").on("click",function(d){var f=a(this).attr("href");if(f.indexOf("#")===-1||!a(f).length){return}
c.scrollToAnimation.call(this,1200,0,d)})},priceSlider:function(){a("#price-range").noUiSlider({range:[0,1000],start:[100,900],handles:2,connect:true,serialization:{to:[a("#price-range-low"),a("#price-range-high")]}})},filterColorBg:function(){a(".filter-color-box").each(function(){var c=a(this),d=c.data("bgcolor");c.css("background-color",d)})},productZoomImage:function(){var c=this;if(a.fn.elevateZoom){a("#product-zoom").elevateZoom({responsive:true,zoomType:"inner",borderColour:"#e1e1e1",zoomWindowPosition:1,zoomWindowOffetx:30,cursor:"crosshair",zoomWindowFadeIn:400,zoomWindowFadeOut:250,lensBorderSize:3,lensOpacity:1,lensColour:"rgba(255, 255, 255, 0.5)",lensShape:"square",lensSize:200,scrollZoom:true});a(".product-gallery").find("a").on("click",function(f){var g=a("#product-zoom").data("elevateZoom"),h=a(this).data("image"),d=a(this).data("zoom-image");g.swaptheimage(h,d);f.preventDefault()})}},selectBox:function(){if(a.fn.selectbox){a(".selectbox").selectbox({effect:"fade"})}},boostrapSpinner:function(){if(a.fn.TouchSpin){a(".vertical-spinner").TouchSpin({verticalbuttons:true});a(".horizontal-spinner").TouchSpin()}},dateTimePicker:function(){if(a.fn.datetimepicker){a(".form-datetime").datetimepicker({weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1});a(".form-date").datetimepicker({weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,minView:2,forceParse:0});a(".form-time").datetimepicker({weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:1,minView:0,maxView:1,forceParse:0})}},tooltip:function(){if(a.fn.tooltip){a(".add-tooltip").tooltip()}},popover:function(){if(a.fn.popover){a(".add-popover").popover({trigger:"focus"})}},servicesHover:function(){a(".service-hover").on("mouseover",function(){a.each(a(this).find(".service-icon, .service-title, p"),function(){var c=a(this).data("hover-anim");a(this).addClass("animated "+c)})}).on("mouseleave",function(){a.each(a(this).find(".service-icon, .service-title, p"),function(){var c=a(this).data("hover-anim");a(this).removeClass("animated "+c)})})},countTo:function(){if(a.fn.countTo){if(a.fn.waypoint){a(".count").waypoint(function(){a(this).countTo()},{offset:function(){return(a(window).height()-100)},triggerOnce:true})}else{a(".count").countTo()}}else{a(".count").each(function(){var c=a(this),d=c.data("to");c.text(d)})}},newsletterPopup:function(){if(document.getElementById("newsletter-popup-form")){jQuery.magnificPopup.open({items:{src:"#newsletter-popup-form"},type:"inline"},0)}},lightBox:function(){a(".popup-gallery").magnificPopup({delegate:".zoom-item",type:"image",closeOnContentClick:false,closeBtnInside:false,mainClass:"mfp-with-zoom mfp-img-mobile",image:{verticalFit:true,titleSrc:function(c){return c.el.attr("title")+' source →'}},gallery:{enabled:true},zoom:{enabled:true,duration:400,opener:function(c){return c.find("img")}}});a(".popup-image").magnificPopup({type:"image",closeOnContentClick:true,closeBtnInside:false,fixedContentPos:true,mainClass:"mfp-with-zoom mfp-img-mobile",image:{verticalFit:true},zoom:{enabled:true,duration:400}});a(".popup-iframe").magnificPopup({disableOn:700,type:"iframe",mainClass:"mfp-fade",removalDelay:160,preloader:false,fixedContentPos:false})},videoBg:function(){if(!this.mobile){if(a.fn.mb_YTPlayer){a(".player").mb_YTPlayer()}else{return}}},progressBars:function(){var c=this;if(a.fn.waypoint){a(".progress-animate").waypoint(function(){if(!a(this).hasClass("circle-progress")){var d=a(this),f=a(this).data("width"),e=d.find(".progress-text, .progress-tooltip");d.css({width:f+"%"},400);setTimeout(function(){e.fadeIn(400,function(){d.removeClass("progress-animate")})},100)}else{c.animateKnob()}},{offset:function(){return(a(window).height()-10)}})}else{a(".progress-animate").each(function(){var d=a(this),f=a(this).data("width"),e=d.find(".progress-text");d.css({width:f+"%"},400);e.fadeIn(500)})}},registerKnob:function(){if(a.fn.knob){a(".knob").knob({bgColor:"#eaeaea"});a(".knob.whitebg").knob({bgColor:"#fff"})}},animateKnob:function(){if(a.fn.knob){a(".knob").each(function(){var c=a(this),f=c.closest(".progress-animate"),e=c.data("animateto"),d=c.data("animatespeed");c.animate({value:e},{duration:d,easing:"swing",progress:function(){c.val(Math.round(this.value)).trigger("change")},complete:function(){f.removeClass("progress-animate")}})})}},mediaElement:function(){a("video, audio").mediaelementplayer()},scrollAnimations:function(){if(typeof WOW==="function"){new WOW({boxClass:"wow",animateClass:"animated",offset:0}).init()}},flickerFeed:function(){if(a.fn.jflickrfeed){a("ul.flickr-widget-two").jflickrfeed({limit:8,qstrings:{id:"54297118@N03"},itemTemplate:'
'});a("ul.flickr-widget-three").jflickrfeed({limit:15,qstrings:{id:"54297118@N03"},itemTemplate:'
'})}},attachBg:function(){var c=a("[data-bgattach]");a.each(c,function(){if(a(this).data("bgattach")){a(this).css("background-image","url("+a(this).data("bgattach")+")")}})},parallax:function(){if(!this.mobile&&typeof skrollr==="object"){skrollr.init({forceHeight:false})}
if(this.mobile){a(".parallax, .parallax-fixed").css("background-attachment","initial")}},isotopeActivate:function(){if(a.fn.isotope){var c=this.container,d=c.data("layoutmode");c.isotope({itemSelector:".portfolio-item",layoutMode:(d)?d:"masonry",transitionDuration:0})}},isotopeReinit:function(){if(a.fn.isotope){this.container.isotope("destroy");this.isotopeActivate()}},isotopeFilter:function(){var d=this,c=a("#portfolio-filter");c.find("a").on("click",function(g){var f=a(this),h=f.attr("data-filter");c.find(".active").removeClass("active");d.container.isotope({filter:h,transitionDuration:"0.8s"});f.closest("li").addClass("active");g.preventDefault()})},blogMasonry:function(){var c=this.blogContainer;c.isotope({itemSelector:".entry",lasyoutMode:"fitRows",masonry:{gutter:15},transitionDuration:0})},blogMasonryRefresh:function(){this.blogContainer.isotope("layout")},infiniteScroll:function(c,d){if(a.fn.infinitescroll){c.infinitescroll({navSelector:"#page-nav",nextSelector:"#page-nav a:first",itemSelector:d,loading:{msgText:"Loading Posts...",finishedMsg:"No more post to load.",img:"//eonythemes.com/themes/t/images/load.GIF"}},function(e){c.isotope("appended",a(e)).isotope("layout")});if(a("#infinite-trigger").length){a(window).unbind(".infscr");a("#infinite-trigger").on("click",function(f){c.infinitescroll("retrieve");f.preventDefault()});a(document).ajaxError(function(f,h,g){if(h.status==404){a("a#infinite-trigger").addClass("disabled")}})}}}};b.init();a(window).on("load",function(){b.sideMenuScrollbar();if(b.blogContainer.length){b.blogMasonryRefresh()}});a(window).on("scroll",function(){b.scrollTopBtnAppear();b.headerSearchScrollFix()});if(a.event.special.debouncedresize){a(window).on("debouncedresize",function(){b.fullHeight();b.destroyStickyMenu()})}else{a(window).on("resize",function(){b.fullHeight();b.destroyStickyMenu()})}})(jQuery);var wow=new WOW({boxClass:'wow',animateClass:'animated',offset:0,mobile:true,live:true,callback:function(box){},scrollContainer:null});wow.init();if($('#owl-slider-hero').length){$("#owl-slider-hero").owlCarousel({navigation:false,slideSpeed:2000,paginationSpeed:400,autoPlay:5000,singleItem:true});$('.slider-navigation').find('li').on('click',function(){$('.slider-navigation li').removeClass('active')
$(this).addClass('active');var a=$(this).index();$("#owl-slider-hero").trigger('owl.goTo',a)});setInterval(function(){var i=$('#owl-slider-hero .owl-pagination .owl-page.active ').index();$('.slider-navigation li').removeClass('active')
$('.slider-navigation li').eq(i).addClass('active');},1000);}
(function(ROOT,struct,undefined){"use strict";var VERSION='2.3.2';var lastTime=0,nextFrame=ROOT.requestAnimationFrame||ROOT.webkitRequestAnimationFrame||ROOT.mozRequestAnimationFrame||ROOT.msRequestAnimationFrame||function(callback){var currTime=+new Date,delay=Math.max(1000/60,1000/60-(currTime-lastTime));lastTime=currTime+delay;return setTimeout(callback,delay);},cancelFrame=ROOT.cancelAnimationFrame||ROOT.webkitCancelAnimationFrame||ROOT.webkitCancelRequestAnimationFrame||ROOT.mozCancelRequestAnimationFrame||ROOT.msCancelRequestAnimationFrame||clearTimeout,DOC=ROOT.document,divstyle=DOC.createElement('div').style,cssVendor=function(){var tests="-webkit- -moz- -o- -ms-".split(" "),prop;while(prop=tests.shift()){if(camelCase(prop+'transform')in divstyle){return prop;}}
return'';}(),opacity=cssTest('opacity'),transform=cssTest('transform'),perspective=cssTest('perspective'),transformStyle=cssTest('transform-style'),transformOrigin=cssTest('transform-origin'),backfaceVisibility=cssTest('backface-visibility'),preserve3d=transformStyle&&function(){divstyle[transformStyle]='preserve-3d';return divstyle[transformStyle]=='preserve-3d';}(),toString=Object.prototype.toString,slice=[].slice,class2type={},event2type={},event2code={click:4,mousewheel:5,dommousescroll:5,keydown:6},POINTERTYPES={2:'touch',3:'pen',4:'mouse',pen:'pen'},STARTEVENT=[],MOVEEVENT=[],EVENT=function(){var ret={},states={start:1,down:1,move:2,end:3,up:3,cancel:3};each("mouse touch pointer MSPointer-".split(" "),function(prefix){var _prefix=/pointer/i.test(prefix)?'pointer':prefix;ret[_prefix]=ret[_prefix]||{};POINTERTYPES[_prefix]=_prefix;each(states,function(endfix,code){var ev=camelCase(prefix+endfix);ret[_prefix][ev]=code;event2type[ev.toLowerCase()]=_prefix;event2code[ev.toLowerCase()]=code;if(code==1){STARTEVENT.push(ev);}else{MOVEEVENT.push(ev);}});});return ret;}(),POINTERS={touch:{},pointer:{},mouse:{}},EASE={linear:function(t,b,c,d){return c*t/d+b;},ease:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},'ease-in':function(t,b,c,d){return c*(t/=d)*t*t+b;},'ease-out':function(t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},'ease-in-out':function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},bounce:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}}},TRANSITION={fade:function(cpage,cp,tpage,tp){if(opacity){cpage.style.opacity=1-Math.abs(cp);if(tpage){tpage.style.opacity=Math.abs(cp);}}else{cpage.style.filter='alpha(opacity='+(1-Math.abs(cp))*100+')';if(tpage){tpage.style.filter='alpha(opacity='+Math.abs(cp)*100+')';}}}};each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(name){class2type["[object "+name+"]"]=name.toLowerCase();});each("X Y ".split(" "),function(name){var XY={X:'left',Y:'top'},fire3D=perspective?' translateZ(0)':'';TRANSITION['scroll'+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction];transform?cpage.style[transform]='translate'+prop+'('+cp*100+'%)'+fire3D:cpage.style[XY[prop]]=cp*100+'%';if(tpage){transform?tpage.style[transform]='translate'+prop+'('+tp*100+'%)'+fire3D:tpage.style[XY[prop]]=tp*100+'%';}}
TRANSITION['scroll3d'+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction],fix=cp<0?-1:1,abscp=Math.abs(cp),deg;if(perspective){if(abscp<.05){deg=abscp*1200;cp=0;tp=fix*-1;}else if(abscp<.95){deg=60;cp=(cp-.05*fix)/.9;tp=(tp+.05*fix)/.9;}else{deg=(1-abscp)*1200;cp=fix;tp=0;}
cpage.parentNode.style[transform]='perspective(1000px) rotateX('+deg+'deg)';cpage.style[transform]='translate'+prop+'('+cp*100+'%)';if(tpage){tpage.style[transform]='translate'+prop+'('+tp*100+'%)';}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['slide'+name]=function(cpage,cp,tpage,tp){TRANSITION['slideCoverReverse'+name].apply(this,arguments);}
TRANSITION['flow'+name]=function(cpage,cp,tpage,tp){TRANSITION['flowCoverIn'+name].apply(this,arguments);}
TRANSITION['slice'+name]=function(){var createWrap=function(node,container){var wrap=DOC.createElement('div');wrap.style.cssText='position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;';wrap.appendChild(node);container.appendChild(wrap);},fixBlock=function(cpage,tpage,pages,container){each(pages,function(page){if(page.parentNode==container)return;if(cpage!=page&&tpage!=page){page.parentNode.style.display='none';}else{page.parentNode.style.display='block';}});};return function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction],len=prop=='X'?'width':'height',total=this.container[camelCase('client-'+len)],m=Math.abs(cp)*100,n=Math.abs(tp)*100,end=cp==0||tp==0;cpage.style[len]=end?'100%':total+'px';if(cpage.parentNode==this.container){createWrap(cpage,this.container);}
cpage.parentNode.style.zIndex=cp>0?0:1;cpage.parentNode.style[len]=(Math.min(cp,0)+1)*100+'%';if(tpage){tpage.style[len]=end?'100%':total+'px';if(tpage.parentNode==this.container){createWrap(tpage,this.container);}
tpage.parentNode.style.zIndex=cp>0?1:0;tpage.parentNode.style[len]=(Math.min(tp,0)+1)*100+'%';}
fixBlock(cpage,tpage,this.pages,this.container);}}();TRANSITION['flip'+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][1-this.direction],fix=prop=='X'?-1:1;if(perspective){cpage.style[backfaceVisibility]='hidden';cpage.style[transform]='perspective(1000px) rotate'+prop+'('+cp*180*fix+'deg)'+fire3D;if(tpage){tpage.style[backfaceVisibility]='hidden';tpage.style[transform]='perspective(1000px) rotate'+prop+'('+tp*180*fix+'deg)'+fire3D;}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['flip3d'+name]=function(){var inited;return function(cpage,cp,tpage,tp){var prop=name||['X','Y'][1-this.direction],fe=prop=='X'?-1:1,fix=fe*(cp<0?1:-1),zh=cpage['offset'+(prop=='X'?'Height':'Width')]/2;if(preserve3d){if(!inited){inited=true;cpage.parentNode.parentNode.style[perspective]='1000px';cpage.parentNode.style[transformStyle]='preserve-3d';}
cpage.parentNode.style[transform]='translateZ(-'+zh+'px) rotate'+prop+'('+cp*90*fe+'deg)';cpage.style[transform]='rotate'+prop+'(0) translateZ('+zh+'px)';if(tpage){tpage.style[transform]='rotate'+prop+'('+(fix*90)+'deg) translateZ('+zh+'px)';}}else TRANSITION['scroll'+name].apply(this,arguments);}}();TRANSITION['flipClock'+name]=function(){var createWrap=function(node,container,prop,off){var wrap=node.parentNode,len=prop=='X'?'height':'width',pos=prop=='X'?'top':'left',origin=['50%',(off?0:100)+'%'][prop=='X'?'slice':'reverse']().join(' ');if(!wrap||wrap==container){wrap=DOC.createElement('div');wrap.style.cssText='position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;display:none;';wrap.style[transformOrigin]=origin;wrap.style[backfaceVisibility]='hidden';wrap.appendChild(node);container.appendChild(wrap);}
wrap.style[len]='50%';wrap.style[pos]=off*100+'%';node.style[len]='200%';node.style[pos]=-off*200+'%';return wrap;},fixBlock=function(cpage,tpage,pages,container){each(pages,function(page){if(page.parentNode==container)return;if(cpage!=page&&tpage!=page){page.parentNode.style.display=page._clone.parentNode.style.display='none';}else{page.parentNode.style.display=page._clone.parentNode.style.display='block';}});};return function(cpage,cp,tpage,tp){var prop=name||['X','Y'][1-this.direction],isSelf=this.pages[this.current]==cpage,zIndex=Number(Math.abs(cp)<.5),fix=prop=='X'?1:-1,m,n;if(perspective){createWrap(cpage,this.container,prop,0);createWrap(cpage._clone||(cpage._clone=cpage.cloneNode(true)),this.container,prop,.5);m=n=-cp*180*fix;cp>0?n=0:m=0;cpage.parentNode.style.zIndex=cpage._clone.parentNode.style.zIndex=zIndex;cpage.parentNode.style[transform]='perspective(1000px) rotate'+prop+'('+m+'deg)';cpage._clone.parentNode.style[transform]='perspective(1000px) rotate'+prop+'('+n+'deg)';if(tpage){createWrap(tpage,this.container,prop,0);createWrap(tpage._clone||(tpage._clone=tpage.cloneNode(true)),this.container,prop,.5);m=n=-tp*180*fix;cp>0?m=0:n=0;tpage.parentNode.style.zIndex=tpage._clone.parentNode.style.zIndex=1-zIndex;tpage.parentNode.style[transform]='perspective(1000px) rotate'+prop+'('+m+'deg)';tpage._clone.parentNode.style[transform]='perspective(1000px) rotate'+prop+'('+n+'deg)';}
fixBlock(cpage,tpage,this.pages,this.container);if(0==cp||tp==0){cpage=this.pages[this.current];cpage.style.height=cpage.style.width=cpage.parentNode.style.height=cpage.parentNode.style.width='100%';cpage.style.top=cpage.style.left=cpage.parentNode.style.top=cpage.parentNode.style.left=0;cpage.parentNode.style.zIndex=2;}}else TRANSITION['scroll'+name].apply(this,arguments);}}();TRANSITION['flipPaper'+name]=function(){var backDiv;return function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction],len=prop=='X'?'width':'height',m=Math.abs(cp)*100;if(!backDiv){backDiv=DOC.createElement('div');backDiv.style.cssText='position:absolute;z-index:2;top:0;left:0;height:0;width:0;background:no-repeat #fff;';try{backDiv.style.backgroundImage=cssVendor+'linear-gradient('+(prop=='X'?'right':'bottom')+', #aaa 0,#fff 20px)';}catch(e){}
this.container.appendChild(backDiv);}
TRANSITION['slice'+name].apply(this,arguments);backDiv.style.display=cp==0||tp==0?'none':'block';backDiv.style.width=backDiv.style.height='100%';backDiv.style[len]=(cp<0?m:100-m)+'%';backDiv.style[XY[prop]]=(cp<0?100-2*m:2*m-100)+'%';}}();TRANSITION['zoom'+name]=function(cpage,cp,tpage,tp){var zIndex=Number(Math.abs(cp)<.5);if(transform){cpage.style[transform]='scale'+name+'('+Math.abs(1-Math.abs(cp)*2)+')'+fire3D;cpage.style.zIndex=zIndex;if(tpage){tpage.style[transform]='scale'+name+'('+Math.abs(1-Math.abs(cp)*2)+')'+fire3D;tpage.style.zIndex=1-zIndex;}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['bomb'+name]=function(cpage,cp,tpage,tp){var zIndex=Number(Math.abs(cp)<.5),val=Math.abs(1-Math.abs(cp)*2);if(transform){cpage.style[transform]='scale'+name+'('+(2-val)+')'+fire3D;cpage.style.opacity=zIndex?val:0;cpage.style.zIndex=zIndex;if(tpage){tpage.style[transform]='scale'+name+'('+(2-val)+')'+fire3D;tpage.style.opacity=zIndex?0:val;tpage.style.zIndex=1-zIndex;}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['skew'+name]=function(cpage,cp,tpage,tp){var zIndex=Number(Math.abs(cp)<.5);if(transform){cpage.style[transform]='skew'+name+'('+cp*180+'deg)'+fire3D;cpage.style.zIndex=zIndex;if(tpage){tpage.style[transform]='skew'+name+'('+tp*180+'deg)'+fire3D;tpage.style.zIndex=1-zIndex;}}else TRANSITION['scroll'+name].apply(this,arguments);}
each(" Reverse In Out".split(" "),function(type){TRANSITION['scrollCover'+type+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction],zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0),cr=100,tr=100;zIndex?cr=20:tr=20;transform?cpage.style[transform]='translate'+prop+'('+cp*cr+'%)'+fire3D:cpage.style[XY[prop]]=cp*cr+'%';cpage.style.zIndex=1-zIndex;if(tpage){transform?tpage.style[transform]='translate'+prop+'('+tp*tr+'%)'+fire3D:tpage.style[XY[prop]]=tp*tr+'%';tpage.style.zIndex=zIndex;}}
TRANSITION['slideCover'+type+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction],zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0);if(transform){cpage.style[transform]='translate'+prop+'('+cp*(100-zIndex*100)+'%) scale('+((1-Math.abs(zIndex&&cp))*.2+.8)+')'+fire3D;cpage.style.zIndex=1-zIndex;if(tpage){tpage.style[transform]='translate'+prop+'('+tp*zIndex*100+'%) scale('+((1-Math.abs(zIndex?0:tp))*.2+.8)+')'+fire3D;tpage.style.zIndex=zIndex;}}else TRANSITION['scrollCover'+type+name].apply(this,arguments);}
TRANSITION['flowCover'+type+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][this.direction],zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0);if(transform){cpage.style[transform]='translate'+prop+'('+cp*(100-zIndex*50)+'%) scale('+((1-Math.abs(cp))*.5+.5)+')'+fire3D;cpage.style.zIndex=1-zIndex;if(tpage){tpage.style[transform]='translate'+prop+'('+tp*(50+zIndex*50)+'%) scale('+((1-Math.abs(tp))*.5+.5)+')'+fire3D;tpage.style.zIndex=zIndex;}}else TRANSITION['scrollCover'+type+name].apply(this,arguments);}
TRANSITION['flipCover'+type+name]=function(cpage,cp,tpage,tp){var prop=name||['X','Y'][1-this.direction],zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0);if(perspective){zIndex?cp=0:tp=0;cpage.style[transform]='perspective(1000px) rotate'+prop+'('+cp*-90+'deg)'+fire3D;cpage.style.zIndex=1-zIndex;if(tpage){tpage.style[transform]='perspective(1000px) rotate'+prop+'('+tp*-90+'deg)'+fire3D;tpage.style.zIndex=zIndex;}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['skewCover'+type+name]=function(cpage,cp,tpage,tp){var zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0);if(transform){zIndex?cp=0:tp=0;cpage.style[transform]='skew'+name+'('+cp*90+'deg)'+fire3D;cpage.style.zIndex=1-zIndex;if(tpage){tpage.style[transform]='skew'+name+'('+tp*90+'deg)'+fire3D;tpage.style.zIndex=zIndex;}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['zoomCover'+type+name]=function(cpage,cp,tpage,tp){var zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0);if(transform){zIndex?cp=0:tp=0;cpage.style[transform]='scale'+name+'('+(1-Math.abs(cp))+')'+fire3D;cpage.style.zIndex=1-zIndex;if(tpage){tpage.style[transform]='scale'+name+'('+(1-Math.abs(tp))+')'+fire3D;tpage.style.zIndex=zIndex;}}else TRANSITION['scroll'+name].apply(this,arguments);}
TRANSITION['bombCover'+type+name]=function(cpage,cp,tpage,tp){var zIndex=Number(type=='In'||!type&&cp<0||type=='Reverse'&&cp>0);if(transform){zIndex?cp=0:tp=0;cpage.style[transform]='scale'+name+'('+(1+Math.abs(cp))+')'+fire3D;cpage.style.zIndex=1-zIndex;if(tpage){tpage.style[transform]='scale'+name+'('+(1+Math.abs(tp))+')'+fire3D;tpage.style.zIndex=zIndex;}
TRANSITION.fade.apply(this,arguments);}else TRANSITION['scroll'+name].apply(this,arguments);}});});function type(obj){if(obj==null){return obj+"";}
return typeof obj=='object'||typeof obj=='function'?class2type[toString.call(obj)]||"object":typeof obj;}
function isArrayLike(elem){var tp=type(elem);return!!elem&&tp!='function'&&tp!='string'&&(elem.length===0||elem.length&&(elem.nodeType==1||(elem.length-1)in elem));}
function camelCase(str){return(str+'').replace(/^-ms-/,'ms-').replace(/-([a-z]|[0-9])/ig,function(all,letter){return(letter+'').toUpperCase();});}
function cssTest(name){var prop=camelCase(name),_prop=camelCase(cssVendor+prop);return(prop in divstyle)&&prop||(_prop in divstyle)&&_prop||'';}
function isFunction(func){return type(func)=='function';}
function pointerLength(obj){var len=0,key;if(type(obj.length)=='number'){len=obj.length;}else if('keys'in Object){len=Object.keys(obj).length;}else{for(key in obj){if(obj.hasOwnProperty(key)){len++;}}}
return len;}
function pointerItem(obj,n){return'item'in obj?obj.item(n):function(){var i=0,key;for(key in this){if(i++==n){return this[key];}}}.call(obj,n);}
function each(arr,iterate){if(isArrayLike(arr)){if(type(arr.forEach)=='function'){return arr.forEach(iterate);}
var i=0,len=arr.length,item;for(;i0?-1:1):fixIndex),tpage=this.pages[tIndex],target=index>current?-1:1,_tpage=cpage;cancelFrame(this.timer);if(fixIndex==current){target=0;_tpage=tpage;}else if(tpage.style.display=='none'){percent=0;}
this.fixBlock(current,tIndex);this.fire('before',current,fixIndex);this.current=fixIndex;duration*=Math.abs(target-percent);this.latestTime=stime+duration;ani();function ani(){var offset=Math.min(duration,+new Date-stime),s=duration?ease(offset,0,1,duration):1,cp=(target-percent)*s+percent;self.fixUpdate(cp,current,tIndex);if(offset==duration){if(_tpage){_tpage.style.display='none';}
delete self.timer;self.fire('after',fixIndex,current);}else{self.timer=nextFrame(ani);}}
return this;},prev:function(){return this.slide(this.current-1);},next:function(){return this.slide(this.current+1);},play:function(){this.playing=true;return this.firePlay();},firePlay:function(){var self=this;if(this.playing){this.playTimer=setTimeout(function(){self.slide((self.current+1)%(self.loop?Infinity:self.length));},this.interval);}
return this;},pause:function(){this.playing=false;clearTimeout(this.playTimer);return this;},fixIndex:function(index){return this.length>1&&this.loop?(this.length+index)%this.length:index;},fixBlock:function(cIndex,tIndex){each(this.pages,function(page,index){if(cIndex!=index&&tIndex!=index){page.style.display='none';}else{page.style.display='block';}});return this;},fixUpdate:function(cPer,cIndex,tIndex){var pageData=this.pageData,cpage=this.pages[cIndex],tpage=this.pages[tIndex],tPer;pageData[cIndex].percent=cPer;if(tpage){tPer=pageData[tIndex].percent=cPer>0?cPer-1:1+cPer;}
return this.fire('update',cpage,cPer,tpage,tPer);},getPercent:function(index){var pdata=this.pageData[index==null?this.current:index];return pdata&&(pdata.percent||0);},getOffsetParent:function(){var position=getStyle(this.container,'position');if(position&&position!='static'){return this.container;}
return this.container.offsetParent||DOC.body;},handleEvent:function(oldEvent){var ev=filterEvent(oldEvent),canDrag=ev.button<1&&ev.length<2&&(!this.pointerType||this.pointerType==ev.eventType)&&(this.mouse||ev.pointerType!='mouse');switch(ev.eventCode){case 2:if(canDrag&&this.rect){var cIndex=this.current,dir=this.direction,rect=[ev.clientX,ev.clientY],_rect=this.rect,offset=rect[dir]-_rect[dir],cpage=this.pages[cIndex],total=this.offsetParent[dir?'clientHeight':'clientWidth'],tIndex,percent;if(this.drag==null&&_rect.toString()!=rect.toString()){this.drag=Math.abs(offset)>=Math.abs(rect[1-dir]-_rect[1-dir]);this.drag&&this.fire('dragStart',ev);}
if(this.drag){percent=this.percent+(total&&offset/total);if(!this.pages[tIndex=this.fixIndex(cIndex+(percent>0?-1:1))]){percent/=Math.abs(offset)/total+2;}
this.fixBlock(cIndex,tIndex);this.fire('dragMove',ev);this.fixUpdate(percent,cIndex,tIndex);this._offset=offset;ev.preventDefault();}}
break;case 1:case 3:if(canDrag){var self=this,index=this.current,percent=this.getPercent(),isDrag,offset,tm,nn;if(ev.length&&(ev.eventCode==1||this.drag)){nn=ev.target.nodeName.toLowerCase();clearTimeout(this.eventTimer);if(!this.pointerType){this.pointerType=ev.eventType;}
if(this.timer){cancelFrame(this.timer);delete this.timer;}
this.rect=[ev.clientX,ev.clientY];this.percent=percent;this.time=+new Date;this.offsetParent=this.getOffsetParent();if(ev.eventType!='touch'&&(nn=='a'||nn=='img')){ev.preventDefault();}}else if(tm=this.time){offset=this._offset;isDrag=this.drag;each("rect drag time percent _offset offsetParent".split(" "),function(prop){delete self[prop];});if(isDrag){if(+new Date-tm<500&&Math.abs(offset)>20||Math.abs(percent)>.5){index+=offset>0?-1:1;}
this.fire('dragEnd',ev);ev.preventDefault();}
if(percent){this.slide(index);}else if(isDrag){this.firePlay();}
this.eventTimer=setTimeout(function(){delete self.pointerType;},400);}}
break;case 4:if(this.timer){ev.preventDefault();}
break;case 5:ev.preventDefault();if(this.isStatic()&&+new Date-this.latestTime>Math.max(1000-this.duration,0)){var wd=ev.wheelDelta||-ev.detail;Math.abs(wd)>=3&&this[wd>0?'prev':'next']();}
break;case 6:var nn=ev.target.nodeName.toLowerCase();if(this.isStatic()&&nn!='input'&&nn!='textarea'&&nn!='select'){switch(ev.keyCode||ev.which){case 33:case 37:case 38:this.prev();break;case 32:case 34:case 39:case 40:this.next();break;case 35:this.slide(this.length-1);break;case 36:this.slide(0);break;}}
break;}},destroy:function(){var pageData=this.pageData;offListener(this.container,STARTEVENT.join(" ")+" click"+(this.mousewheel?" mousewheel DOMMouseScroll":""),this.handler);offListener(DOC,MOVEEVENT.join(" ")+(this.arrowkey?" keydown":""),this.handler);each(this.pages,function(page,index){page.style.cssText=pageData[index].cssText;});this.container.removeChild(this.comment);this.length=0;return this.pause();},append:function(elem,index){if(null==index){index=this.pages.length;}
this.pageData.splice(index,0,{percent:0,cssText:elem.style.cssText});this.pages.splice(index,0,elem);this.container.appendChild(this.initStyle(elem));this.length=this.pages.length;if(index<=this.current){this.current++;}
return this;},prepend:function(elem){return this.append(elem,0);},insertBefore:function(elem,index){return this.append(elem,index-1);},insertAfter:function(elem,index){return this.append(elem,index+1);},remove:function(index){this.container.removeChild(this.pages[index]);this.pages.splice(index,1);this.pageData.splice(index,1);this.length=this.pages.length;if(index<=this.current){this.slide(this.current=Math.max(0,this.current-1));}
return this;}}
each("Ease Transition".split(" "),function(name){struct['add'+name]=struct.prototype['add'+name];});if(typeof define=='function'&&define.amd){define('pageSwitch',function(){return struct;});}else ROOT.pageSwitch=struct;})(window,function(wrap,config){if(!(this instanceof arguments.callee)){return new arguments.callee(wrap,config);}
this.container=typeof wrap=='string'?document.getElementById(wrap):wrap;this.init(config||{});});var reg=location.search.match(/ts=([^&]*)/),ts=reg&®[1]||'scroll3d',a=new pageSwitch('pages',{duration:1000,start:0,direction:1,loop:true,ease:'ease',transition:ts,freeze:false,mouse:true,mousewheel:true,arrowkey:true});navs=document.getElementById('navs').getElementsByTagName('a');a.on('before',function(m,n){navs[m].className='';navs[n].className='active';});i=0;for(;i