forked from fuselabs/echobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.min.js.download
1 lines (1 loc) · 23.4 KB
/
app.min.js.download
1
!function($,window,_){"use strict";var $doc=$(document),win=$(window),AnimationsArray=[];window.SITE={init:function(){var self=this,content=$("#wrapper"),pl=content.find(">.preloader");window.thb_init=!0,content.waitForImages(function(){TweenMax.to(pl,1,{autoAlpha:0,ease:Quart.easeOut,onComplete:function(){pl.css("display","none")}});for(var obj in self)if(self.hasOwnProperty(obj)){var _method=self[obj];void 0!==_method.selector&&void 0!==_method.init&&$(_method.selector).length>0&&_method.init()}})},logoColor:{selector:".header.style2, .header.style3",init:function(){var base=this,container=$(base.selector);container.midnight()}},headerStyle:{selector:".header",init:function(){var base=this,container=$(base.selector);container.hasClass("style1")&&($(".header_container").height(container.outerHeight()),win.scroll(function(){win.scrollTop()>$("#home-slider").outerHeight()?container.addClass("fixed"):container.removeClass("fixed")}).trigger("scroll"),win.resize(_.debounce(function(){$(".header_container").height(container.outerHeight())},30)))}},menu:{selector:"#mobile-menu",init:function(){var menu2=$("#mobile-menu.style2"),menu3=$("#mobile-menu.style3"),items2=menu2.find(".mobile-menu>li,.menu-footer p, .select-wrapper"),items3=menu3.find(".mobile-menu>li,.menu-footer p, .select-wrapper"),logo=menu3.find(".logoimg"),toggle=$(".mobile-toggle"),tlMainNav=(toggle.find("span"),new TimelineLite({paused:!0,onStart:function(){menu2.css("display","block")},onReverseComplete:function(){menu2.css("display","none")}})),tlMainNavStyle3=new TimelineLite({paused:!0,onStart:function(){menu3.css("display","block")},onReverseComplete:function(){menu3.css("display","none")}}),close=$(".panel-close"),links=menu2.add(menu3).find("a");$(".header").outerHeight(),$("#wpadminbar").outerHeight();AnimationsArray.push(tlMainNav),AnimationsArray.push(tlMainNavStyle3),tlMainNav.add(TweenLite.to(menu2,.5,{autoAlpha:1,ease:Quart.easeOut})).staggerFrom(items2,.1*items2.length,{y:"50",opacity:0,ease:Quart.easeOut},.1),tlMainNavStyle3.add(TweenLite.to(menu3,.5,{x:0,ease:Quart.easeOut})).add(TweenLite.from(logo,.5,{opacity:0,ease:Quart.easeOut})).staggerFrom(items3,.15*items3.length,{x:"-100",opacity:0,ease:Quart.easeOut},.1),toggle.on("click",function(){return toggle.data("toggled")?(tlMainNav.timeScale(1.6).reverse(),tlMainNavStyle3.timeScale(1.6).reverse(),toggle.data("toggled",!1)):(tlMainNav.timeScale(1).restart(),tlMainNavStyle3.timeScale(1).restart(),toggle.data("toggled",!0)),!1}),close.on("click",function(){return tlMainNav.timeScale(1.6).reverse(),tlMainNavStyle3.timeScale(1.6).reverse(),toggle.data("toggled",!1),!1}),links.on("click",function(){var _this=$(this),url=_this.attr("href"),hash=-1!==url.indexOf("#")?url.substring(url.indexOf("#")+1):"",pos=$("#"+hash).offset().top-$(".header").outerHeight()-$("#wpadminbar").outerHeight();return hash?(tlMainNav.timeScale(2).reverse(),tlMainNavStyle3.timeScale(2).reverse(),toggle.data("toggled",!1),TweenMax.to(window,win.height()/500,{scrollTo:{y:pos},ease:Quart.easeOut}),!1):!0})}},overlay:{selector:".overlay-effect .overlay",init:function(el){var base=this,container=$(base.selector),target=el?el.find(base.selector):container;target.each(function(){var _this=$(this),overlayInner=_this.find(".child"),overlayHover=new TimelineLite({paused:!0});TweenLite.set(overlayInner,{opacity:0,y:50}),overlayHover.add(TweenLite.to(_this,.5,{opacity:1,ease:Quart.easeOut})).add(TweenMax.staggerTo(overlayInner,.25,{y:0,opacity:1,ease:Quart.easeOut},.05),"-=0.25"),_this.hoverIntent(function(){overlayHover.timeScale(1).play()},function(){overlayHover.timeScale(1.6).reverse()})})}},onePageScroll:{selector:".full-menu, .mobile-menu",init:function(){var base=this,container=$(base.selector),links=container.find("a"),hh=$(".header").hasClass("style2")||$(".header").hasClass("style3")?0:$(".header").outerHeight(),ah=$("#wpadminbar").outerHeight();links.on("click",function(){var _this=$(this),url=_this.attr("href"),hash=-1!==url.indexOf("#")?url.substring(url.indexOf("#")+1):"",pos=$("#"+hash).offset().top-hh-ah;return hash?(TweenMax.to(window,win.height()/500,{scrollTo:{y:pos},ease:Quart.easeOut}),!1):!0})}},fullHeightContent:{selector:".full-height-content",init:function(){var base=this,container=$(base.selector);base.control(container),win.resize(_.debounce(function(){base.control(container)},50))},control:function(container){var h=$(".header"),a=$("#wpadminbar"),ah=a?a.outerHeight():0;container.each(function(){var _this=$(this),height=win.height()-h.outerHeight()-ah;_this.css("min-height",height)})}},carousel:{selector:".owl",init:function(){var base=this,container=$(base.selector);container.each(function(){var that=$(this),columns=that.data("columns"),navigation=(that.data("center")===!0,that.data("navigation")===!0),autoplay=that.data("autoplay")!==!1,pagination=that.data("pagination")===!0,args=(that.data("autowidth")===!0,that.data("bgcheck")?that.data("bgcheck"):!1,that.data("autowidth")!==!0,{slideSpeed:1e3,paginationSpeed:1e3,rewindSpeed:1e3,autoPlay:autoplay,goToFirst:!0,stopOnHover:!0,navigation:navigation,navigationText:["",""],pagination:pagination,paginationNumbers:!1,responsive:!0,items:columns,itemsDesktop:!1,itemsDesktopSmall:[980,3>columns?columns:3],itemsTablet:[768,2>columns?columns:2],itemsMobile:[479,1],itemsScaleUp:!1});that.data("owlCarousel")?that.data("owlCarousel").reinit(args):that.owlCarousel(args)})}},toggle:{selector:".toggle .title",init:function(){var base=this,container=$(base.selector);container.each(function(){var that=$(this);that.on("click",function(){that.hasClass("toggled")?that.removeClass("toggled").closest(".toggle").find(".inner").slideUp(200):that.addClass("toggled").closest(".toggle").find(".inner").slideDown(200)})})}},masonry:{selector:".masonry",init:function(){var base=this,container=$(base.selector);container.each(function(){var that=$(this),el=that.children(".item"),loadmore=$(that.data("loadmore")),filter=$(that.data("filters")),toggle=filter.find(".thb_toggle"),hr=filter.find("hr"),filters=filter.find(".filters"),select=filter.find(".filter-select"),org=[],page=1;if(TweenLite.set(el,{opacity:0,y:100}),that.imagesLoaded(function(){that.isotope({itemSelector:".item",transitionDuration:0,masonry:{columnWidth:".grid-sizer"}}).isotope("once","layoutComplete",function(i,l){org=_.pluck(l,"element")}),that.isotope("layout"),win.scroll(_.debounce(function(){that.is(":in-viewport")&&TweenMax.staggerTo(org,1,{y:0,opacity:1,ease:Quart.easeOut},.25)},50)).trigger("scroll"),loadmore.on("click",function(){var text=loadmore.text(),type=loadmore.data("type"),loading=loadmore.data("loading"),nomore=loadmore.data("nomore"),initial=loadmore.data("initial"),categories=loadmore.data("categories"),count=loadmore.data("count"),style=loadmore.data("style"),information=loadmore.data("information"),columns=loadmore.data("columns");return loadmore.text(loading).addClass("loading"),$.post(themeajax.url,{action:"thb_ajax",count:count,type:type,initial:initial,style:style,information:information,columns:columns,categories:categories,page:page++},function(data){var d=$.parseHTML($.trim(data)),l=d?d.length:0;""===data||"undefined"===data||"No More Posts"===data||"No $args array created"===data?(data="",loadmore.text(nomore).removeClass("loading").off("click").on("click",function(){return!1})):($(d).appendTo(that).hide().imagesLoaded(function(){$(d).show(),that.isotope("appended",$(d)),that.isotope("layout"),TweenMax.set($(d),{opacity:0,y:100}),TweenMax.staggerTo($(d),.25*l,{y:0,opacity:1,ease:Quart.easeOut,onComplete:function(){window.SITE.overlay.init($(d))}},.25),window.SITE.portfolioLightbox.init()}),count>l?loadmore.text(nomore).removeClass("loading"):loadmore.text(text).removeClass("loading"))}),!1})}),filter.length){var li=filters.find("li"),li_l=li.length,a=filters.find("a:not(.thb_toggle)"),tl=new TimelineMax({paused:!0});tl.to(toggle,0,{className:"+=active",ease:Quart.easeOut}).to(hr,.7,{scaleX:"1",borderTopColor:"#f0f0f0",ease:Quart.easeOut}).to(filters,.25,{autoAlpha:"1",height:"50",ease:Quart.easeOut}).staggerFromTo(li,.1*li_l,{x:50,opacity:0,ease:Quart.easeOut},{x:0,opacity:1,ease:Quart.easeOut},.07),toggle.on("click",function(){return toggle.data("toggled")?(tl.timeScale(1.2).reverse(),toggle.data("toggled",!1)):(tl.timeScale(1).restart(),toggle.data("toggled",!0)),!1}),select.on("change",function(){var _this=$(this),selector=_this.val();that.isotope("once","layoutComplete",function(x,y){var iso_in=_.pluck(y,"element"),iso_out=_.difference(_.pluck(x.items,"element"),iso_in),iso_ani=new TimelineMax;TweenLite.set(iso_in,{opacity:0,y:100}),iso_ani.staggerTo(iso_out,.1*iso_out.length,{y:100,autoAlpha:0,ease:Quart.easeOut},.1,!1,function(){TweenMax.set(iso_out,{display:"none"})}).staggerTo(iso_in,.1*iso_in.length,{y:0,autoAlpha:1,ease:Quart.easeOut},.1)}),that.isotope({filter:selector})}),a.on("click",function(){var _this=$(this),selector=_this.attr("data-filter");return a.removeClass("active"),_this.addClass("active"),that.isotope("once","layoutComplete",function(x,y){var iso_in=_.pluck(y,"element"),iso_out=_.difference(_.pluck(x.items,"element"),iso_in),iso_ani=new TimelineMax;TweenLite.set(iso_in,{opacity:0,y:100}),iso_ani.staggerTo(iso_out,.1*iso_out.length,{y:100,autoAlpha:0,ease:Quart.easeOut},.1,!1,function(){TweenMax.set(iso_out,{display:"none"})}).staggerTo(iso_in,.1*iso_in.length,{y:0,autoAlpha:1,ease:Quart.easeOut},.1)}),that.isotope({filter:selector}),!1})}})}},portfolioLightbox:{selector:".thb-portfolio",init:function(){var base=this,container=$(base.selector),wrapper=$("#wrapper"),ap=$("#ajax-placeholder");document.getElementById("ajax-placeholder");$.magnificPopup.close(),container.magnificPopup({delegate:".portfolio:visible a",closeMarkup:'<nav class="portfolio-header only-portfolio"><div class="row"><div class="small-12 columns text-center"><span class="prev"></span><button title="%title%" class="mfp-close"></button><span class="next"></span></div></nav>',closeBtnInside:!1,closeOnBgClick:!1,type:"ajax",fixedContentPos:!1,alignTop:!0,mainClass:"mfp-fade mfp-portfolio",midClick:!0,gallery:{enabled:!0},callbacks:{parseAjax:function(mfpResponse){ap.html(mfpResponse.data),mfpResponse.data=$(mfpResponse.data).find(".portfolio-post").add(ap.find('[data-type="vc_shortcodes-custom-css"]')).add(ap.find('[data-type="vc_custom-css"]')),ap.html("")},change:function(){},ajaxContentAdded:function(){win.scrollTop(0),window.SITE.carousel.init(),window.SITE.shareArticleDetail.init(),window.SITE.parallax_bg.refresh(),window.SITE.animation.init(),window.SITE.equalHeights.init(),window.SITE.fullHeightContent.init()},open:function(){$(".portfolio:visible a").length>1&&($(".portfolio-header.only-portfolio .prev").html(this.arrowLeft),$(".portfolio-header.only-portfolio .next").html(this.arrowRight)),wrapper.addClass("hide"),$(".mfp-wrap").css("top","0"),$(".mfp-bg").css("height","auto")},close:function(){wrapper.removeClass("hide"),window.SITE.parallax_bg.refresh(),window.SITE.contact.init(),window.SITE.carousel.init(),window.SITE.equalHeights.init(),win.trigger("resize")},afterClose:function(){}}})}},teamMember:{selector:".team_member",init:function(){var base=this,container=$(base.selector),wrapper=$("#wrapper");container.magnificPopup({closeMarkup:'<nav class="portfolio-header team-member-header"><div class="row"><div class="small-12 columns text-center"><span class="prev"></span><button title="%title%" class="mfp-close mfp-team-close"></button><span class="next"></span></div></nav>',closeBtnInside:!1,closeOnBgClick:!1,type:"ajax",fixedContentPos:!1,mainClass:"mfp-fade mfp-portfolio mfp-teammember",midClick:!0,alignTop:!0,gallery:{enabled:!0,preload:[0,2],navigateByImgClick:!0},callbacks:{parseAjax:function(mfpResponse){mfpResponse.data=$(mfpResponse.data).find(".team-member-post")},change:function(){},ajaxContentAdded:function(){win.scrollTop(0),window.SITE.carousel.init(),window.SITE.shareArticleDetail.init(),window.SITE.parallax_bg.refresh(),window.SITE.animation.init(),window.SITE.equalHeights.init(),window.SITE.fullHeightContent.init()},open:function(){$(".team_member").length>1&&($(".portfolio-header.team-member-header .prev").html(this.arrowLeft),$(".portfolio-header.team-member-header .next").html(this.arrowRight)),wrapper.addClass("hide"),$(".mfp-wrap").css("top","0"),$(".mfp-bg").css("height","auto")},close:function(){wrapper.removeClass("hide"),window.SITE.parallax_bg.refresh(),window.SITE.contact.init(),window.SITE.carousel.init(),window.SITE.equalHeights.init()},afterClose:function(){}}})}},shareArticleDetail:{selector:".share-post-link",init:function(){var base=this,container=$(base.selector);container.each(function(){var _this=$(this),social=_this.find(".social");social.on("click",function(){var left=screen.width/2-320,top=screen.height/2-220-100;return window.open($(this).attr("href"),"mywin","left="+left+",top="+top+",width=640,height=440,toolbar=0"),!1})})}},parallax_bg:{selector:"body",init:function(){var base=this;$(base.selector);$.stellar({horizontalScrolling:!1,verticalOffset:40,responsive:!0})},refresh:function(){$.stellar("refresh")}},magnificImage:{selector:'[rel="magnific"], .wp-caption a',init:function(){var stype,base=this,container=$(base.selector);container.each(function(){stype=$(this).hasClass("video")?"iframe":"image",$(this).magnificPopup({type:stype,closeOnContentClick:!0,fixedContentPos:!0,closeBtnInside:!1,closeMarkup:'<button title="%title%" class="mfp-close"></button>',mainClass:"mfp",removalDelay:250,overflowY:"scroll",image:{verticalFit:!1}})})}},magnificInline:{selector:'[rel="inline"]',init:function(){var base=this,container=$(base.selector);container.each(function(){var eclass=$(this).data("class")?$(this).data("class"):"";$(this).magnificPopup({type:"inline",midClick:!0,mainClass:"mfp "+eclass,removalDelay:250,closeBtnInside:!0,overflowY:"scroll",closeMarkup:'<button title="%title%" class="mfp-close"></button>'})})}},magnificGallery:{selector:'[rel="gallery"]',init:function(){var base=this,container=$(base.selector);container.each(function(){$(this).magnificPopup({delegate:"a",type:"image",closeOnContentClick:!0,fixedContentPos:!0,mainClass:"mfp",removalDelay:250,closeBtnInside:!1,overflowY:"scroll",gallery:{enabled:!0,navigateByImgClick:!1,preload:[0,1]},image:{verticalFit:!1,titleSrc:function(item){return item.el.attr("title")}}})})}},parsley:{selector:".comment-form, .wpcf7-form",init:function(){var base=this,container=$(base.selector);$.fn.parsley&&container.parsley()}},contact:{selector:".google_map",init:function(){var base=this,container=$(base.selector);container.each(function(){var mapstyle,that=$(this),mapzoom=that.data("map-zoom"),maplat=that.data("map-center-lat"),maplong=that.data("map-center-long"),pinlatlong=that.data("latlong"),pinimage=that.data("pin-image"),style=that.data("map-style");that.width();switch(style){case 0:break;case 1:mapstyle=[{featureType:"administrative",stylers:[{visibility:"off"}]},{featureType:"poi",stylers:[{visibility:"simplified"}]},{featureType:"road",stylers:[{visibility:"simplified"}]},{featureType:"water",stylers:[{visibility:"simplified"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]},{featureType:"landscape",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",stylers:[{visibility:"off"}]},{featureType:"road.local",stylers:[{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road.arterial",stylers:[{visibility:"off"}]},{featureType:"water",stylers:[{color:"#5f94ff"},{lightness:26},{gamma:5.86}]},{},{featureType:"road.highway",stylers:[{weight:.6},{saturation:-85},{lightness:61}]},{featureType:"road"},{},{featureType:"landscape",stylers:[{hue:"#0066ff"},{saturation:74},{lightness:100}]}];break;case 2:mapstyle=[{featureType:"water",elementType:"all",stylers:[{hue:"#e9ebed"},{saturation:-78},{lightness:67},{visibility:"simplified"}]},{featureType:"landscape",elementType:"all",stylers:[{hue:"#ffffff"},{saturation:-100},{lightness:100},{visibility:"simplified"}]},{featureType:"road",elementType:"geometry",stylers:[{hue:"#bbc0c4"},{saturation:-93},{lightness:31},{visibility:"simplified"}]},{featureType:"poi",elementType:"all",stylers:[{hue:"#ffffff"},{saturation:-100},{lightness:100},{visibility:"off"}]},{featureType:"road.local",elementType:"geometry",stylers:[{hue:"#e9ebed"},{saturation:-90},{lightness:-8},{visibility:"simplified"}]},{featureType:"transit",elementType:"all",stylers:[{hue:"#e9ebed"},{saturation:10},{lightness:69},{visibility:"on"}]},{featureType:"administrative.locality",elementType:"all",stylers:[{hue:"#2c2e33"},{saturation:7},{lightness:19},{visibility:"on"}]},{featureType:"road",elementType:"labels",stylers:[{hue:"#bbc0c4"},{saturation:-93},{lightness:31},{visibility:"on"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{hue:"#bbc0c4"},{saturation:-93},{lightness:-2},{visibility:"simplified"}]}];break;case 3:mapstyle=[{featureType:"poi",stylers:[{visibility:"off"}]},{stylers:[{saturation:-70},{lightness:37},{gamma:1.15}]},{elementType:"labels",stylers:[{gamma:.26},{visibility:"off"}]},{featureType:"road",stylers:[{lightness:0},{saturation:0},{hue:"#ffffff"},{gamma:0}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{lightness:20}]},{featureType:"road.highway",elementType:"geometry",stylers:[{lightness:50},{saturation:0},{hue:"#ffffff"}]},{featureType:"administrative.province",stylers:[{visibility:"on"},{lightness:-50}]},{featureType:"administrative.province",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"administrative.province",elementType:"labels.text",stylers:[{lightness:20}]}];break;case 4:mapstyle=[{featureType:"landscape",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{hue:"#00aaff"},{saturation:-100},{gamma:2.15},{lightness:12}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{visibility:"on"},{lightness:24}]},{featureType:"road",elementType:"geometry",stylers:[{lightness:57}]}];break;case 5:mapstyle=[{featureType:"landscape",stylers:[{hue:"#F1FF00"},{saturation:-27.4},{lightness:9.4},{gamma:1}]},{featureType:"road.highway",stylers:[{hue:"#0099FF"},{saturation:-20},{lightness:36.4},{gamma:1}]},{featureType:"road.arterial",stylers:[{hue:"#00FF4F"},{saturation:0},{lightness:0},{gamma:1}]},{featureType:"road.local",stylers:[{hue:"#FFB300"},{saturation:-38},{lightness:11.2},{gamma:1}]},{featureType:"water",stylers:[{hue:"#00B6FF"},{saturation:4.2},{lightness:-63.4},{gamma:1}]},{featureType:"poi",stylers:[{hue:"#9FFF00"},{saturation:0},{lightness:0},{gamma:1}]}];break;case 6:mapstyle=[{stylers:[{hue:"#2c3e50"},{saturation:250}]},{featureType:"road",elementType:"geometry",stylers:[{lightness:50},{visibility:"simplified"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]}];break;case 7:mapstyle=[{stylers:[{hue:"#16a085"},{saturation:0}]},{featureType:"road",elementType:"geometry",stylers:[{lightness:100},{visibility:"simplified"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]}];break;case 8:mapstyle=[{featureType:"all",stylers:[{hue:"#0000b0"},{invert_lightness:"true"},{saturation:-30}]}];break;case 9:mapstyle=[{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]}]}var centerlatLng=new google.maps.LatLng(maplat,maplong),mapOptions={center:centerlatLng,styles:mapstyle,zoom:mapzoom,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1,panControl:!0,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1},map=new google.maps.Map(that[0],mapOptions);google.maps.event.addListenerOnce(map,"tilesloaded",function(){if(pinimage.length>0){var pinimageLoad=new Image;pinimageLoad.src=pinimage,$(pinimageLoad).load(function(){base.setMarkers(map,pinlatlong,pinimage)})}else base.setMarkers(map,pinlatlong,pinimage)})})},setMarkers:function(map,pinlatlong,pinimage){function showPin(i){var latlong_array=pinlatlong[i].lat_long.split(","),marker=new google.maps.Marker({position:new google.maps.LatLng(latlong_array[0],latlong_array[1]),map:map,animation:google.maps.Animation.DROP,icon:pinimage,optimized:!1}),contentString='<div class="marker-info-win'+(pinlatlong[i].image?" with-image":"")+'">'+(pinlatlong[i].image?'<img src="'+pinlatlong[i].image+'" class="image" />':"")+'<div class="marker-inner-win"><h1 class="marker-heading">'+pinlatlong[i].title+"</h1><p>"+pinlatlong[i].information+"</p></div></div>",infowindow=new InfoBox({alignBottom:!0,content:contentString,disableAutoPan:!1,maxWidth:380,closeBoxMargin:"10px 10px 10px 10px",closeBoxURL:"http://www.google.com/intl/en_us/mapfiles/close.gif",pixelOffset:new google.maps.Size(-196,-73),zIndex:null,infoBoxClearance:new google.maps.Size(1,1)});infoWindows.push(infowindow),google.maps.event.addListener(marker,"click",function(marker,i){return function(){infoWindows[i].open(map,this)}}(marker,i))}for(var infoWindows=[],i=0;i+1<=pinlatlong.length;i++)setTimeout(showPin,250*i,i)}},equalHeights:{selector:"[data-equal]",init:function(){var base=this,container=$(base.selector);container.each(function(){var that=$(this),children=that.data("equal");that.waitForImages(function(){that.find(children).matchHeight(!0)})})}},animation:{selector:".animation",init:function(){var base=this,container=$(base.selector);base.control(container),win.scroll(function(){base.control(container)})},control:function(element){var t=-1;element.filter(":in-viewport").each(function(){var that=$(this);t++,setTimeout(function(){that.addClass("animate")},200*t)})}},toBottom:{selector:".mouse_scroll",init:function(){var base=this,container=$(base.selector);container.each(function(){var _this=$(this);_this.on("click",function(){var p=_this.parents(".row"),h=p.height();return TweenMax.to(window,1,{scrollTo:{y:p.scrollTop()+h},ease:Quart.easeOut}),!1})})}},toTop:{selector:"#scroll_totop",init:function(){var base=this,container=$(base.selector);container.on("click",function(){return TweenMax.to(window,win.height()/1e3,{scrollTo:{y:0},ease:Quart.easeOut}),!1}),win.scroll(_.debounce(function(){base.control()},50))},control:function(){var base=this,container=$(base.selector);$doc.height()-(win.scrollTop()+win.height())<300?TweenMax.to(container,.2,{autoAlpha:1,ease:Quart.easeOut}):TweenMax.to(container,.2,{autoAlpha:0,ease:Quart.easeOut})}}},$doc.ready(function(){window.thb_init||window.SITE.init()})}(jQuery,this,_);