var spv,examplesSwiper,val,select;if(function(){var t=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1},n=[].slice;(function(n,t){return typeof define=="function"&&define.amd?define("waypoints",["jquery"],function(i){return t(i,n)}):t(n.jQuery,n)})(this,function(i,r){var a,b,v,o,k,h,s,y,u,f,p,w,d,l,c,e;return a=i(r),y=t.call(r,"ontouchstart")>=0,o={horizontal:{},vertical:{}},k=1,s={},h="waypoints-context-id",p="resize.waypoints",w="scroll.waypoints",d=1,l="waypoints-waypoint-ids",c="waypoint",e="waypoints",b=function(){function n(n){var t=this;this.$element=n,this.element=n[0],this.didResize=!1,this.didScroll=!1,this.id="context"+k++,this.oldScroll={x:n.scrollLeft(),y:n.scrollTop()},this.waypoints={horizontal:{},vertical:{}},n.data(h,this.id),s[this.id]=this,n.bind(w,function(){var n;if(!(t.didScroll||y))return t.didScroll=!0,n=function(){return t.doScroll(),t.didScroll=!1},r.setTimeout(n,i[e].settings.scrollThrottle)}),n.bind(p,function(){var n;if(!t.didResize)return t.didResize=!0,n=function(){return i[e]("refresh"),t.didResize=!1},r.setTimeout(n,i[e].settings.resizeThrottle)})}return n.prototype.doScroll=function(){var n,t=this;return n={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},!y||n.vertical.oldScroll&&n.vertical.newScroll||i[e]("refresh"),i.each(n,function(n,r){var e,f,u;return u=[],f=r.newScroll>r.oldScroll,e=f?r.forward:r.backward,i.each(t.waypoints[n],function(n,t){var i,f;return r.oldScroll<(i=t.offset)&&i<=r.newScroll?u.push(t):r.newScroll<(f=t.offset)&&f<=r.oldScroll?u.push(t):void 0}),u.sort(function(n,t){return n.offset-t.offset}),f||u.reverse(),i.each(u,function(n,t){if(t.options.continuous||n===u.length-1)return t.trigger([e])})}),this.oldScroll={x:n.horizontal.newScroll,y:n.vertical.newScroll}},n.prototype.refresh=function(){var r,t,n,u=this;return n=i.isWindow(this.element),t=this.$element.offset(),this.doScroll(),r={horizontal:{contextOffset:n?0:t.left,contextScroll:n?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:n?0:t.top,contextScroll:n?0:this.oldScroll.y,contextDimension:n?i[e]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}},i.each(r,function(n,t){return i.each(u.waypoints[n],function(n,r){var u,e,f,o,s;if(u=r.options.offset,f=r.offset,e=i.isWindow(r.element)?0:r.$element.offset()[t.offsetProp],i.isFunction(u)?u=u.apply(r.element):typeof u=="string"&&(u=parseFloat(u),r.options.offset.indexOf("%")>-1&&(u=Math.ceil(t.contextDimension*u/100))),r.offset=e-t.contextOffset+t.contextScroll-u,(!r.options.onlyOnScroll||f==null)&&r.enabled)return f!==null&&f<(o=t.oldScroll)&&o<=r.offset?r.trigger([t.backward]):f!==null&&f>(s=t.oldScroll)&&s>=r.offset?r.trigger([t.forward]):f===null&&t.oldScroll>=r.offset?r.trigger([t.forward]):void 0})})},n.prototype.checkEmpty=function(){if(i.isEmptyObject(this.waypoints.horizontal)&&i.isEmptyObject(this.waypoints.vertical))return this.$element.unbind([p,w].join(" ")),delete s[this.id]},n}(),v=function(){function n(n,t,r){var u,f;r=i.extend({},i.fn[c].defaults,r),r.offset==="bottom-in-view"&&(r.offset=function(){var n;return n=i[e]("viewportHeight"),i.isWindow(t.element)||(n=t.$element.height()),n-i(this).outerHeight()}),this.$element=n,this.element=n[0],this.axis=r.horizontal?"horizontal":"vertical",this.callback=r.handler,this.context=t,this.enabled=r.enabled,this.id="waypoints"+d++,this.offset=null,this.options=r,t.waypoints[this.axis][this.id]=this,o[this.axis][this.id]=this,u=(f=n.data(l))!=null?f:[],u.push(this.id),n.data(l,u)}return n.prototype.trigger=function(n){if(this.enabled)return this.callback!=null&&this.callback.apply(this.element,n),this.options.triggerOnce?this.destroy():void 0},n.prototype.disable=function(){return this.enabled=!1},n.prototype.enable=function(){return this.context.refresh(),this.enabled=!0},n.prototype.destroy=function(){return delete o[this.axis][this.id],delete this.context.waypoints[this.axis][this.id],this.context.checkEmpty()},n.getWaypointsByElement=function(n){var r,t;return(t=i(n).data(l),!t)?[]:(r=i.extend({},o.horizontal,o.vertical),i.map(t,function(n){return r[n]}))},n}(),f={init:function(n,t){var r;return t==null&&(t={}),(r=t.handler)==null&&(t.handler=n),this.each(function(){var u,r,n,f;return u=i(this),n=(f=t.context)!=null?f:i.fn[c].defaults.context,i.isWindow(n)||(n=u.closest(n)),n=i(n),r=s[n.data(h)],r||(r=new b(n)),new v(u,r,t)}),i[e]("refresh"),this},disable:function(){return f._invoke(this,"disable")},enable:function(){return f._invoke(this,"enable")},destroy:function(){return f._invoke(this,"destroy")},prev:function(n,t){return f._traverse.call(this,n,t,function(n,t,i){if(t>0)return n.push(i[t-1])})},next:function(n,t){return f._traverse.call(this,n,t,function(n,t,i){if(t<i.length-1)return n.push(i[t+1])})},_traverse:function(n,t,f){var e,o;return n==null&&(n="vertical"),t==null&&(t=r),o=u.aggregate(t),e=[],this.each(function(){var t;return t=i.inArray(this,o[n]),f(e,t,o[n])}),this.pushStack(e)},_invoke:function(n,t){return n.each(function(){var n;return n=v.getWaypointsByElement(this),i.each(n,function(n,i){return i[t](),!0})}),this}},i.fn[c]=function(){var r,t;return t=arguments[0],r=2<=arguments.length?n.call(arguments,1):[],f[t]?f[t].apply(this,r):i.isFunction(t)?f.init.apply(this,arguments):i.isPlainObject(t)?f.init.apply(this,[null,t]):t?i.error("The "+t+" method does not exist in jQuery Waypoints."):i.error("jQuery Waypoints needs a callback function or handler option.")},i.fn[c].defaults={context:r,continuous:!0,enabled:!0,horizontal:!1,offset:0,triggerOnce:!1},u={refresh:function(){return i.each(s,function(n,t){return t.refresh()})},viewportHeight:function(){var n;return(n=r.innerHeight)!=null?n:a.height()},aggregate:function(n){var r,t,u;return(r=o,n&&(r=(u=s[i(n).data(h)])!=null?u.waypoints:void 0),!r)?[]:(t={horizontal:[],vertical:[]},i.each(t,function(n,u){return i.each(r[n],function(n,t){return u.push(t)}),u.sort(function(n,t){return n.offset-t.offset}),t[n]=i.map(u,function(n){return n.element}),t[n]=i.unique(t[n])}),t)},above:function(n){return n==null&&(n=r),u._filter(n,"vertical",function(n,t){return t.offset<=n.oldScroll.y})},below:function(n){return n==null&&(n=r),u._filter(n,"vertical",function(n,t){return t.offset>n.oldScroll.y})},left:function(n){return n==null&&(n=r),u._filter(n,"horizontal",function(n,t){return t.offset<=n.oldScroll.x})},right:function(n){return n==null&&(n=r),u._filter(n,"horizontal",function(n,t){return t.offset>n.oldScroll.x})},enable:function(){return u._invoke("enable")},disable:function(){return u._invoke("disable")},destroy:function(){return u._invoke("destroy")},extendFn:function(n,t){return f[n]=t},_invoke:function(n){var t;return t=i.extend({},o.vertical,o.horizontal),i.each(t,function(t,i){return i[n](),!0})},_filter:function(n,t,r){var u,f;return(u=s[i(n).data(h)],!u)?[]:(f=[],i.each(u.waypoints[t],function(n,t){if(r(u,t))return f.push(t)}),f.sort(function(n,t){return n.offset-t.offset}),i.map(f,function(n){return n.element}))}},i[e]=function(){var i,t;return t=arguments[0],i=2<=arguments.length?n.call(arguments,1):[],u[t]?u[t].apply(null,i):u.aggregate.call(null,t)},i[e].settings={resizeThrottle:100,scrollThrottle:30},a.load(function(){return i[e]("refresh")})})}.call(this),function(){var i;window.dooble={resize:function(){}},document.body.addEventListener?navigator.appVersion.indexOf("MSIE 9")>-1?$("html").addClass("ie9").addClass("ie9-"):$("html").addClass("ie-ok"):$("html").addClass("ie8").addClass("ie9-"),window.getComputedStyle||(window.getComputedStyle=function(n){return this.el=n,this.getPropertyValue=function(t){var i=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),i.test(t)&&(t=t.replace(i,function(){return arguments[2].toUpperCase()})),n.currentStyle[t]?n.currentStyle[t]:null},this});var n="",t=$(window),f=$(document.body),s=$(".inner-wrap"),h=$(".site-footer"),r=t.width(),e=0,o=0,u=$(".page-header"),c=new gnMenu(document.getElementById("gn-menu"));$(".gn-menu-wrapper").on("touchmove",function(){return!1});i=function(){r=t.width(),e=t.height(),o=f.height(),Modernizr.touch?n!="mobile"&&(u.css("position","absolute"),n="mobile"):n!="desktop"&&(u.css("position","fixed"),n="desktop"),console.log("Resize"),dooble.resize(r)},$(window).resize(i),setTimeout(i,200)}(),$(".mac-full").length&&function(){var t=$(".inner-wrap"),n=$(".mac-full");dooble.resize=function(i){i<1600?(t.css("margin-top",i/2.3),i>974?n.css("margin-top",-381+260*(1-(i-974)/608)):n[0].style.marginTop=""):(n[0].style.marginTop="",t[0].style.marginTop="")}}(),$(".services-swiper").length&&function(){var n={swiper:new Swiper(".services-swiper",{pagination:".pagination2",loop:!0,slidesPerView:3}),states:{one:{num:1,bottom:0,top:768},two:{num:2,bottom:767,top:1200},three:{num:3,bottom:1201,top:3e3}},resize:function(n){var t,i,r;for(r in this.states)t=this.states[r],n>t.bottom&&n<t.top&&(i=t);i&&this.swiper.params.slidesPerView!=i.num&&(this.swiper.params.slidesPerView=i.num,this.swiper.reInit())}};$(window).resize(function(){n.resize($(window).width())})}(),$(".examples-swiper").length){spv=window.innerWidth<430?1:2,window.innerWidth>880&&(spv=3),examplesSwiper={swiper:new Swiper(".examples-swiper",{pagination:".pagination",paginationClickable:!0,loop:!0,slidesPerView:spv}),states:{one:{num:1,bottom:0,top:936,crop:416,container:450},two:{num:2,bottom:937,top:1386,crop:866,container:900},three:{num:3,bottom:1387,top:3e3,crop:1316,container:1350}},wrap:$(".examples-wrap"),slides:$(".examples-swiper .swiper-slide"),pics:$(".examples-swiper img"),crop:$(".examples-swiper-crop"),container:$(".examples-swiper"),resize:function(n){var i,r,t,u;if(n<430)i=n*.75,this.pics.width(n),this.crop.width(n),this.slides.height(i),this.wrap.height(i+70),this.container.height(i),this.container.width(n+34),this.swiper.params.slidesPerView=1,this.swiper.reInit();else{for(u in this.states)r=this.states[u],n>r.bottom&&n<r.top&&(t=r);t&&this.swiper.params.slidesPerView!=t.num&&(this.crop.width(t.crop),this.container.width(t.container),this.swiper.params.slidesPerView=t.num,this.swiper.reInit())}}};$(window).on("load",function(){examplesSwiper.swiper.swipePrev()});$(window).resize(function(){examplesSwiper.resize($(window).width())})}$(".service").length&&function(){var n=992,t=992,f=1200,o=2e3,i=$(".service"),r,u=!1;dooble.resize=function(n){r=n,s(e),h(c)};var s=function(){var n=0;return function(t,i){n==0&&t(),n++,setTimeout(function(){n--},i||200)}}(),h=function(){var n=0;return function(t,i){n++,setTimeout(function(){n--,n==0&&t()},i||200)}}(),c=function(){u||(u=!0,r<t?l():r<f?a():v(),setTimeout(function(){u=!1},1e3))},e=function(){i.css("height","")},l=function(){n!=t&&(e(),n=t)},a=function(){var t=function(n,t){var i;return console.log(n.clientHeight),n.scrollHeight>t.scrollHeight?(i=n.clientHeight+1+"px",t.style.height=i):(i=t.clientHeight+1+"px",n.style.height=i),i};return function(){var r=i;n=f,t(r[0],r[1]),t(r[2],r[3]),t(r[4],r[5])}}(),v=function(){var t=function(n,t,i){var r;return n.scrollHeight>t.scrollHeight?n.scrollHeight>i.scrollHeight?(r=n.scrollHeight+1+"px",t.style.height=r,i.style.height=r):(r=i.scrollHeight+1+"px",n.style.height=r,t.style.height=r):t.scrollHeight>i.scrollHeight?(r=t.scrollHeight+1+"px",n.style.height=r,i.style.height=r):(r=i.scrollHeight+1+"px",n.style.height=r,t.style.height=r),r};return function(){var r=i;n=o,t(r[0],r[1],r[2]),t(r[3],r[4],r[5])}}()}(),$(".blog").length&&function(){var n="",t=$(window),s=$(document.body),h=$(".inner-wrap"),r=$(".site-footer"),c=t.width(),u=0,f=0,e=0,l=0,o=$(".page-header"),a=new gnMenu(document.getElementById("gn-menu")),i;$(".gn-menu-wrapper").on("touchmove",function(){return!1});i=function(){c=t.width(),u=t.height(),f=s.height(),e=r.height(),l=f-u-e,Modernizr.touch?n!="mobile"&&(h.css("margin-bottom",0),r.css("position","static"),o.css("position","absolute"),n="mobile"):n!="desktop"&&(o.css("position","fixed"),n="desktop")},$(window).resize(i),setTimeout(i,200)}(),$(".blog-fork-wrap").click(function(){$(this).toggleClass("active")}),$(".form-subject").length&&(val=$(".contact-select-mask"),select=$(".form-subject select"),select.change(function(){val.html(select[0].value)})),$(".google-map").length&&navigator.userAgent.toLowerCase().indexOf("android")==-1&&function(){var n=new google.maps.LatLng(32.67686,35.223273),i={zoom:15,center:n,mapTypeId:google.maps.MapTypeId.ROADMAP},t=new google.maps.Map($(".google-map")[0],i);t.setOptions({styles:[{stylers:[{visibility:"off"}]},{featureType:"road",stylers:[{visibility:"on"},{color:"#ffffff"}]},{featureType:"road.arterial",stylers:[{visibility:"on"},{color:"#e2e2e2"}]},{featureType:"road.highway",stylers:[{visibility:"on"},{color:"#c8c8c8"}]},{featureType:"landscape",stylers:[{visibility:"on"},{color:"#eeeeee"}]},{featureType:"water",stylers:[{visibility:"on"},{color:"#efebe5"}]},{},{featureType:"road",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{visibility:"off"},{color:"#e1e1dd"}]},{elementType:"labels",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{visibility:"on"},{color:"#b1a595"}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{weight:.9},{visibility:"off"}]}]}),new google.maps.Marker({position:n,map:t,title:"dooble",icon:"/areas/site/content/img/contact-marker.png"})}(),$(".side-bar-heighter").length&&function(){var n=$(".side-bar-heighter").height(),t=$(".blog-posts").height();n>t&&$(".blog-posts").css("height",n+100+"px")}(),$(".person").click(function(){$(this).toggleClass("pactive")}),$(document).ready(function(){$(window).resize()}),window.addEventListener("orientationchange",function(){setTimeout(function(){$(window).resize()},100)},!1),$(window).load(function(){$(".animationWrap").length&&function(){function n(n,t){$(".wp"+n).waypoint(function(){$(".wp"+n).addClass("animated"+t)},{offset:"bottom-in-view"}),console.log("here - "+n)}(function(){for(var i="",r=$(".animationWrap").length,t=0;t<=r;t++)i=t%2!=0?" fadeInRight":" fadeInLeft",n(t,i)})()}()})