;(function($){ 'use strict' var ParallaxScroll={ showLogs: false, round: 1000, init: function(){ this._log("init"); if(this._inited){ this._log("Already Inited"); this._inited=true; return; } this._requestAnimationFrame=(function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function( callback, element){ window.setTimeout(callback, 1000 / 60); };})(); this._onScroll(true); }, _inited: false, _properties: ['x', 'y', 'z', 'rotateX', 'rotateY', 'rotateZ', 'scaleX', 'scaleY', 'scaleZ', 'scale'], _requestAnimationFrame:null, _log: function(message){ if(this.showLogs) console.log("Parallax Scroll / " + message); }, _onScroll: function(noSmooth){ var scroll=$(document).scrollTop(); var windowHeight=$(window).height(); this._log("onScroll " + scroll); $("[data-parallax]").each($.proxy(function(index, el){ var $el=$(el); var properties=[]; var applyProperties=false; var style=$el.data("style"); if(style==undefined){ style=$el.attr("style")||""; $el.data("style", style); } var datas=[$el.data("parallax")]; var iData; for(iData=2; ; iData++){ if($el.data("parallax"+iData)){ datas.push($el.data("parallax"+iData)); }else{ break; }} var datasLength=datas.length; for(iData=0; iData < datasLength; iData ++){ var data=datas[iData]; var scrollFrom=data["from-scroll"]; if(scrollFrom==undefined) scrollFrom=Math.max(0, $(el).offset().top - windowHeight); scrollFrom=scrollFrom | 0; var scrollDistance=data["distance"]; var scrollTo=data["to-scroll"]; if(scrollDistance==undefined&&scrollTo==undefined) scrollDistance=windowHeight; scrollDistance=Math.max(scrollDistance | 0, 1); var easing=data["easing"]; var easingReturn=data["easing-return"]; if(easing==undefined||!$.easing||!$.easing[easing]) easing=null; if(easingReturn==undefined||!$.easing||!$.easing[easingReturn]) easingReturn=easing; if(easing){ var totalTime=data["duration"]; if(totalTime==undefined) totalTime=scrollDistance; totalTime=Math.max(totalTime | 0, 1); var totalTimeReturn=data["duration-return"]; if(totalTimeReturn==undefined) totalTimeReturn=totalTime; scrollDistance=1; var currentTime=$el.data("current-time"); if(currentTime==undefined) currentTime=0; } if(scrollTo==undefined) scrollTo=scrollFrom + scrollDistance; scrollTo=scrollTo | 0; var smoothness=data["smoothness"]; if(smoothness==undefined) smoothness=30; smoothness=smoothness | 0; if(noSmooth||smoothness==0) smoothness=1; smoothness=smoothness | 0; var scrollCurrent=scroll; scrollCurrent=Math.max(scrollCurrent, scrollFrom); scrollCurrent=Math.min(scrollCurrent, scrollTo); if(easing){ if($el.data("sens")==undefined) $el.data("sens", "back"); if(scrollCurrent>scrollFrom){ if($el.data("sens")=="back"){ currentTime=1; $el.data("sens", "go"); }else{ currentTime++; }} if(scrollCurrent0&¤tTime<=totalTime){ var from=defaultProp; if($el.data("sens")=="back"){ from=to; to=-to; easing=easingReturn; totalTime=totalTimeReturn; } val=$.easing[easing](null, currentTime, from, to, totalTime); } val=Math.ceil(val * this.round) / this.round; if(val==prev&&next==to) val=to; if(!properties[prop]) properties[prop]=0; properties[prop] +=val; if(prev!=properties[prop]){ $el.data("_" + prop, properties[prop]); applyProperties=true; }}, this)); } if(applyProperties){ if(properties["z"]!=undefined){ var perspective=data["perspective"]; if(perspective==undefined) perspective=800; var $parent=$el.parent(); if(!$parent.data("style")) $parent.data("style", $parent.attr("style")||""); $parent.attr("style", "perspective:" + perspective + "px; -webkit-perspective:" + perspective + "px; "+ $parent.data("style")); } if(properties["scaleX"]==undefined) properties["scaleX"]=1; if(properties["scaleY"]==undefined) properties["scaleY"]=1; if(properties["scaleZ"]==undefined) properties["scaleZ"]=1; if(properties["scale"]!=undefined){ properties["scaleX"] *=properties["scale"]; properties["scaleY"] *=properties["scale"]; properties["scaleZ"] *=properties["scale"]; } var translate3d="translate3d(" + (properties["x"] ? properties["x"]:0) + "px, " + (properties["y"] ? properties["y"]:0) + "px, " + (properties["z"] ? properties["z"]:0) + "px)"; var rotate3d="rotateX(" + (properties["rotateX"] ? properties["rotateX"]:0) + "deg) rotateY(" + (properties["rotateY"] ? properties["rotateY"]:0) + "deg) rotateZ(" + (properties["rotateZ"] ? properties["rotateZ"]:0) + "deg)"; var scale3d="scaleX(" + properties["scaleX"] + ") scaleY(" + properties["scaleY"] + ") scaleZ(" + properties["scaleZ"] + ")"; var cssTransform=translate3d + " " + rotate3d + " " + scale3d + ";"; this._log(cssTransform); $el.attr("style", "transform:" + cssTransform + " -webkit-transform:" + cssTransform + " " + style); }}, this)); if(window.requestAnimationFrame){ window.requestAnimationFrame($.proxy(this._onScroll, this, false)); }else{ this._requestAnimationFrame($.proxy(this._onScroll, this, false)); }} }; $(function(){ ParallaxScroll.init(); }); })(jQuery); !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.ProgressBar=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ga?0:(a-f)/e;for(h in b)b.hasOwnProperty(h)&&(i=g[h],k="function"==typeof i?i:o[i],b[h]=j(c[h],d[h],k,l));return b}function j(a,b,c,d){return a+(b-a)*c(d)}function k(a,b){var c=n.prototype.filter,d=a._filterArgs;f(c,function(e){"undefined"!=typeof c[e][b]&&c[e][b].apply(a,d)})}function l(a,b,c,d,e,f,g,h,j,l,m){v=b+c+d,w=Math.min(m||u(),v),x=w>=v,y=d-(v-w),a.isPlaying()&&!x?(a._scheduleId=l(a._timeoutHandler,s),k(a,"beforeTween"),b+c>w?i(1,e,f,g,1,1,h):i(w,e,f,g,d,b+c,h),k(a,"afterTween"),j(e,a._attachment,y)):a.isPlaying()&&x&&(j(g,a._attachment,y),a.stop(!0))}function m(a,b){var c={},d=typeof b;return"string"===d||"function"===d?f(a,function(a){c[a]=b}):f(a,function(a){c[a]||(c[a]=b[a]||q)}),c}function n(a,b){this._currentState=a||{},this._configured=!1,this._scheduleFunction=p,"undefined"!=typeof b&&this.setConfig(b)}var o,p,q="linear",r=500,s=1e3/60,t=Date.now?Date.now:function(){return+new Date},u="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:t;p="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var v,w,x,y;return n.prototype.tween=function(a){return this._isTweening?this:(void 0===a&&this._configured||this.setConfig(a),this._timestamp=u(),this._start(this.get(),this._attachment),this.resume())},n.prototype.setConfig=function(a){a=a||{},this._configured=!0,this._attachment=a.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=a.delay||0,this._start=a.start||e,this._step=a.step||e,this._finish=a.finish||e,this._duration=a.duration||r,this._currentState=g({},a.from)||this.get(),this._originalState=this.get(),this._targetState=g({},a.to)||this.get();var b=this;this._timeoutHandler=function(){l(b,b._timestamp,b._delay,b._duration,b._currentState,b._originalState,b._targetState,b._easing,b._step,b._scheduleFunction)};var c=this._currentState,d=this._targetState;return h(d,c),this._easing=m(c,a.easing||q),this._filterArgs=[c,this._originalState,d,this._easing],k(this,"tweenCreated"),this},n.prototype.get=function(){return g({},this._currentState)},n.prototype.set=function(a){this._currentState=a},n.prototype.pause=function(){return this._pausedAtTime=u(),this._isPaused=!0,this},n.prototype.resume=function(){return this._isPaused&&(this._timestamp+=u()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},n.prototype.seek=function(a){a=Math.max(a,0);var b=u();return this._timestamp+a===0?this:(this._timestamp=b-a,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,l(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,b),this.pause()),this)},n.prototype.stop=function(a){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=e,(b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.oCancelAnimationFrame||b.msCancelAnimationFrame||b.mozCancelRequestAnimationFrame||b.clearTimeout)(this._scheduleId),a&&(k(this,"beforeTween"),i(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),k(this,"afterTween"),k(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},n.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},n.prototype.setScheduleFunction=function(a){this._scheduleFunction=a},n.prototype.dispose=function(){var a;for(a in this)this.hasOwnProperty(a)&&delete this[a]},n.prototype.filter={},n.prototype.formula={linear:function(a){return a}},o=n.prototype.formula,g(n,{now:u,each:f,tweenProps:i,tweenProp:j,applyFilter:k,shallowCopy:g,defaults:h,composeEasingObject:m}),"function"==typeof SHIFTY_DEBUG_NOW&&(b.timeoutHandler=l),"object"==typeof d?c.exports=n:"function"==typeof a&&a.amd?a(function(){return n}):"undefined"==typeof b.Tweenable&&(b.Tweenable=n),n}();!function(){e.shallowCopy(e.prototype.formula,{easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return(a/=.5)<1?.5*Math.pow(a,2):-.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-1,3)+1},easeInOutCubic:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeInQuint:function(a){return Math.pow(a,5)},easeOutQuint:function(a){return Math.pow(a-1,5)+1},easeInOutQuint:function(a){return(a/=.5)<1?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return 0===a?0:Math.pow(2,10*(a-1))},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeOutBounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},easeInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},elastic:function(a){return-1*Math.pow(4,-8*a)*Math.sin((6*a-1)*(2*Math.PI)/2)+1},swingFromTo:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},bouncePast:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?2-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?2-(7.5625*(a-=2.25/2.75)*a+.9375):2-(7.5625*(a-=2.625/2.75)*a+.984375)},easeFromTo:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeFrom:function(a){return Math.pow(a,4)},easeTo:function(a){return Math.pow(a,.25)}})}(),function(){function a(a,b,c,d,e,f){function g(a){return((n*a+o)*a+p)*a}function h(a){return((q*a+r)*a+s)*a}function i(a){return(3*n*a+2*o)*a+p}function j(a){return 1/(200*a)}function k(a,b){return h(m(a,b))}function l(a){return a>=0?a:0-a}function m(a,b){var c,d,e,f,h,j;for(e=a,j=0;8>j;j++){if(f=g(e)-a,l(f)e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),l(f-a)f?c=e:d=e,e=.5*(d-c)+c}return e}var n=0,o=0,p=0,q=0,r=0,s=0;return p=3*b,o=3*(d-b)-p,n=1-p-o,s=3*c,r=3*(e-c)-s,q=1-s-r,k(a,j(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}e.setBezierFunction=function(a,c,d,f,g){var h=b(c,d,f,g);return h.displayName=a,h.x1=c,h.y1=d,h.x2=f,h.y2=g,e.prototype.formula[a]=h},e.unsetBezierFunction=function(a){delete e.prototype.formula[a]}}(),function(){function a(a,b,c,d,f,g){return e.tweenProps(d,b,a,c,1,g,f)}var b=new e;b._filterArgs=[],e.interpolate=function(c,d,f,g,h){var i=e.shallowCopy({},c),j=h||0,k=e.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=d,l[3]=k,e.applyFilter(b,"tweenCreated"),e.applyFilter(b,"beforeTween");var m=a(c,i,d,f,k,j);return e.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;e>c;c++)d.push("_"+b+"_"+c);return d}function c(a){var b=a.match(v);return b?(1===b.length||a[0].match(u))&&b.unshift(""):b=["",""],b.join(A)}function d(b){a.each(b,function(a){var c=b[a];"string"==typeof c&&c.match(z)&&(b[a]=e(c))})}function e(a){return i(z,a,f)}function f(a){var b=g(a);return"rgb("+b[0]+","+b[1]+","+b[2]+")"}function g(a){return a=a.replace(/#/,""),3===a.length&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),B[0]=h(a.substr(0,2)),B[1]=h(a.substr(2,2)),B[2]=h(a.substr(4,2)),B}function h(a){return parseInt(a,16)}function i(a,b,c){var d=b.match(a),e=b.replace(a,A);if(d)for(var f,g=d.length,h=0;g>h;h++)f=d.shift(),e=e.replace(A,c(f));return e}function j(a){return i(x,a,k)}function k(a){for(var b=a.match(w),c=b.length,d=a.match(y)[0],e=0;c>e;e++)d+=parseInt(b[e],10)+",";return d=d.slice(0,-1)+")"}function l(d){var e={};return a.each(d,function(a){var f=d[a];if("string"==typeof f){var g=r(f);e[a]={formatString:c(f),chunkNames:b(g,a)}}}),e}function m(b,c){a.each(c,function(a){for(var d=b[a],e=r(d),f=e.length,g=0;f>g;g++)b[c[a].chunkNames[g]]=+e[g];delete b[a]})}function n(b,c){a.each(c,function(a){var d=b[a],e=o(b,c[a].chunkNames),f=p(e,c[a].chunkNames);d=q(c[a].formatString,f),b[a]=j(d)})}function o(a,b){for(var c,d={},e=b.length,f=0;e>f;f++)c=b[f],d[c]=a[c],delete a[c];return d}function p(a,b){C.length=0;for(var c=b.length,d=0;c>d;d++)C.push(a[b[d]]);return C}function q(a,b){for(var c=a,d=b.length,e=0;d>e;e++)c=c.replace(A,+b[e].toFixed(4));return c}function r(a){return a.match(w)}function s(b,c){a.each(c,function(a){var d,e=c[a],f=e.chunkNames,g=f.length,h=b[a];if("string"==typeof h){var i=h.split(" "),j=i[i.length-1];for(d=0;g>d;d++)b[f[d]]=i[d]||j}else for(d=0;g>d;d++)b[f[d]]=h;delete b[a]})}function t(b,c){a.each(c,function(a){var d=c[a],e=d.chunkNames,f=e.length,g=b[e[0]],h=typeof g;if("string"===h){for(var i="",j=0;f>j;j++)i+=" "+b[e[j]],delete b[e[j]];b[a]=i.substr(1)}else b[a]=g})}var u=/(\d|\-|\.)/,v=/([^\-0-9\.]+)/g,w=/[0-9.\-]+/g,x=new RegExp("rgb\\("+w.source+/,\s*/.source+w.source+/,\s*/.source+w.source+"\\)","g"),y=/^.*\(/,z=/#([0-9]|[a-f]){3,6}/gi,A="VAL",B=[],C=[];a.prototype.filter.token={tweenCreated:function(a,b,c,e){d(a),d(b),d(c),this._tokenData=l(a)},beforeTween:function(a,b,c,d){s(d,this._tokenData),m(a,this._tokenData),m(b,this._tokenData),m(c,this._tokenData)},afterTween:function(a,b,c,d){n(a,this._tokenData),n(b,this._tokenData),n(c,this._tokenData),t(d,this._tokenData)}}}(e)}).call(null)},{}],2:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=a.strokeWidth;a.trailWidth&&a.trailWidth>a.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":8}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":8}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./utils":8}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function(a,b){b=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},b);var c;c=e.isString(a)?document.querySelector(a):a,this.path=c,this._opts=b,this._tweenable=null;var d=this.path.getTotalLength();this.path.style.strokeDasharray=d+" "+d,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing),d=this._calculateTo(a,c),f=this._opts.shape||this;b(d,f,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable.dispose(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":8,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextElement=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":8}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f="Object is destroyed",g=function h(a,b){if(!(this instanceof h))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},alignToBottom:!0,value:"",className:"progressbar-text"},svgStyle:{display:"block",width:"100%"}},b,!0);var c,f=this._createSvgView(this._opts);if(c=e.isString(a)?document.querySelector(a):a,!c)throw new Error("Container does not exist: "+a);this._container=c,this._container.appendChild(f.svg),this._opts.svgStyle&&e.setStyles(f.svg,this._opts.svgStyle),this.text=null,this._opts.text.value&&(this.text=this._createTextElement(this._opts,this._container),this._container.appendChild(this.text)),this.svg=f.svg,this.path=f.path,this.trail=f.trail;var g=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(f.path,g)}};g.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error(f);this._progressPath.animate(a,b,c)},g.prototype.stop=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath.stop()},g.prototype.destroy=function(){if(null===this._progressPath)throw new Error(f);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},g.prototype.set=function(a){if(null===this._progressPath)throw new Error(f);this._progressPath.set(a)},g.prototype.value=function(){if(null===this._progressPath)throw new Error(f);return void 0===this._progressPath?0:this._progressPath.value()},g.prototype.setText=function(a){if(null===this._progressPath)throw new Error(f);null===this.text&&(this.text=this._createTextElement(this._opts,this._container),this._container.appendChild(this.text)),this.text.removeChild(this.text.firstChild),this.text.appendChild(document.createTextNode(a))},g.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},g.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},g.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},g.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},g.prototype._createTextElement=function(a,b){var c=document.createElement("p");c.appendChild(document.createTextNode(a.text.value));var d=a.text.style;return d&&(b.style.position="relative",e.setStyles(c,d),d.color||(c.style.color=a.color)),c.className=a.text.className,this._initializeTextElement(a,b,c),c},g.prototype._initializeTextElement=function(a,b,c){},g.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},b.exports=g},{"./path":5,"./utils":8}],8:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=0;d 0){ if(offset_top + $(ele).height() - 100 >=window_top && offset_top <=(window_top + 0.85 * $(window).height())){ return true; }else{ return false; }} } function run_animations(){ var did_scroll=false; $(window).on('scroll', function(){ did_scroll=true; }); setInterval(function (){ if(did_scroll){ did_scroll=false; $('.ambersix-counter').each(function(){ var $this=$(this); if(ambersixInview($this)&&!$this.data('complete')){ $this.data('complete',true); var delay=parseInt($this.data('delay')); setTimeout(function(){ $this.find('.number').countTo(); }, delay); }}); }}, 200); } run_animations(); }; var progressBar=function(){ if($().appear){ $('.ambersix-progress').appear(function(){ var bar=$('.progress-animate'); var bar_width=$(this); $(function(){ $(bar).each(function(){ bar_width=$(this).attr('data-valuenow'); $(this).width(bar_width + '%'); $(this).parents('.ambersix-progress').find('.perc').addClass('show').width(bar_width + '%'); }); }); }); }}; var progressCircle=function(){ $('.piechart').each(function (){ var $this=$(this); var option; var percent=Number($this.data("percent")) / 100; var strokeColor=$this.data('sc'); var trailColor=$this.data('tc'); var strokeWidth=$this.data('sw'); var trailWidth=$this.data('tw'); var percentColor=$this.data('pc'); var percentSize=$this.data('ps'); option={ strokeWidth: strokeWidth, trailWidth: trailWidth, color: strokeColor, trailColor: trailColor, duration: 1500, text: { value: '0%', style: { color: percentColor, fontSize: percentSize }}, step: function (state, bar){ bar.setText((bar.value() * 100).toFixed(0) + "%"); }} var circle=new ProgressBar.Circle($this[0], option); $this.appear(function(){ circle.animate(percent); }); }); }; var elmentHover=function(){ $(".ambersix-image-video .icon").hover(function(){ $(this).css({ "color": $(this).data('chover'), "background-color": $(this).data('ghover'), "border-color": $(this).data('bhover'), "transition": "all 0.3s" }); },function(){ $(this).css({ "color": $(this).data('c'), "background-color": $(this).data('g'), "border-color": $(this).data('b'), }); }); }; var resizeHeading=function(){ $(window).on('load resize', function(){ $('.ambersix-headings, .ambersix-counter').each(function(){ var $this=$(this), font=$this.data("font"), fontMobi=$this.data("mfont"); if(fontMobi){ if($(window).width() < 960){ $this.find('.heading').css('font-size', fontMobi + 'px'); }else{ $this.find('.heading').css('font-size', font + 'px'); }} }); }); }; var hereSection=function(){ $(window).on('load resize', function(){ var adminBarHeight=0, topBarHeight=0, contentTopMargin=0, heroHeight=0, customHeight=0, adminBar=$('#wpadminbar'), topBar=$('#top-bar'), hero=$('.hero-section'), windowHeight=$(window).height(), headerHeight=$('#site-header').height(), heroContent=hero.find('.hero-content'), contentHeight=heroContent.height(), spacing=hero.data('content'); customHeight=hero.data('height'); if(topBar.length) topBarHeight=topBar.height(); if(adminBar.length) adminBarHeight=adminBar.height(); heroHeight=windowHeight; if(customHeight) heroHeight=customHeight; if($('body').hasClass('header-style-4')){ hero.css({ height: (heroHeight - adminBarHeight) + "px" }); contentTopMargin=((heroHeight - contentHeight) / 2) + topBarHeight + spacing; heroContent.css("padding-top", (contentTopMargin) + "px"); }else{ if(! customHeight) heroHeight=heroHeight - headerHeight - topBarHeight - adminBarHeight; hero.css({ height: heroHeight + "px" }); contentTopMargin=((heroHeight - contentHeight) / 2) + spacing; heroContent.css("padding-top", (contentTopMargin) + "px"); }}) if($().vegas){ $(".hero-section.slideshow").each(function(){ var $this=$(this), count=$this.data('count'), count=parseInt(count,10), effect=$this.data('effect'), images=$this.data('image'), cOverlay=$this.data('overlay'), pOverlay=$this.data('poverlay'), i=0, slides=[], imgs=images.split('|'); while(i < count){ slides.push({src:imgs[i]}); i++; } $this.vegas({ slides: slides, overlay: true, transition: effect }); var overlay=$('
', { class: 'overlay', style: 'background:' + cOverlay }); $(this).append(overlay) .find('.vegas-overlay') .addClass(pOverlay); }); } $('.scroll-target, .scroll-btn').on('click',function(){ var anchor=$(this).attr('href').split('#')[1]; if(anchor){ if($('#'+anchor).length > 0){ var headerHeight=0; if($('body').hasClass('header-fixed')) headerHeight=$('#site-header').height(); var target=$('#' + anchor).offset().top - headerHeight; $('html,body').animate({scrollTop: target}, 1000, 'easeInOutExpo'); }} return false; }) if($('.ambersix-fancy-text').is('.scroll')){ $('.ambersix-fancy-text.scroll').each(function(){ var $this=$(this), current=1, height=$this.height(), numberDivs=$this.children().length, first=$this.children('.heading:nth-child(1)'); setInterval(function(){ var number=current * -height; first.css('margin-top', number + 'px'); if(current===numberDivs){ first.css('margin-top', '0px'); current=1; } else current++; }, 2500); }); } if($('.ambersix-fancy-text').is('.typed')){ if($().typed){ $('.ambersix-fancy-text.typed').each(function(){ var $this=$(this), texts=$this.data('fancy').split(','); $this.find('.text').typed({ strings: texts, typeSpeed: 30, loop: true, backDelay: 4000 }); }); }} }; var fitText=function(){ if($().fitText){ $('.ambersix-fancy-text').each(function(){ var min=$(this).data("min"); var max=$(this).data("max"); $(this).children('.heading').fitText(1.8, { minFontSize: min, maxFontSize: max }); }); }}; var bgVideo=function(){ if($().YTPlayer){ $(".hero-section.video").each(function(){ var $this=$(this), cOverlay=$this.data('overlay'), overlay=$('
', { class: 'overlay', style: 'background:' + cOverlay }); $this.YTPlayer().append(overlay); }); }}; var tabs=function(){ $('.ambersix-tabs').each(function(){ var list="", title=$(this).find('.item-title').remove(), titleWrap=$(this).children('.tab-title') ; title.each(function(){ list=list + "
  • " + $(this).html() + "
  • "; }); titleWrap.append(list); $(this).find('.tab-title li').filter(':first').addClass('active'); $(this).find('.tab-content-wrap').children().hide().filter(':first').show(); $(this).find('.tab-title li').on('click', function(e){ var idx=$(this).index(), content=$(this).closest('.ambersix-tabs').find('.tab-content-wrap').children().eq(idx); $(this).addClass('active').siblings().removeClass('active'); content.fadeIn('slow').siblings().hide(); e.preventDefault(); }); }); }; var srollTarget=function(){ $('.ambersix-scroll-target').on('click',function(){ var anchor=$(this).children().attr('href').split('#')[1]; if(anchor){ if($('#'+anchor).length > 0){ var headerHeight=0; if($('body').hasClass('header-fixed')){ headerHeight=$('#site-header').height(); if($('body').hasClass('header-style-5')) headerHeight=$('#site-header .site-navigation-wrap').height(); } var target=$('#' + anchor).offset().top - headerHeight; $('html,body').animate({scrollTop: target}, 1000, 'easeInOutExpo'); }} return false; }) }; var countDown=function(){ var style=function(data){ $(this.el).html("
    " + "
    " + this.leadingZeros(data.days, 2) + "
    " + "
    Days
    " + "
    " + "
    " + "
    " + this.leadingZeros(data.hours, 2) + "
    " + "
    Hours
    " + "
    " + "
    " + "
    " + this.leadingZeros(data.min, 2) + "
    " + "
    Minutes
    " + "
    " + "
    " + "
    " + this.leadingZeros(data.sec, 2) + "
    " + "
    Seconds
    " + "
    "); } $('.ambersix-countdown').each(function(){ $(this).countdown({ date: $(this).attr('data-date'), render: style }); }); }; var equalizeHeight=function(){ $(window).on('load resize', function (){ setTimeout(function (){ $(document).imagesLoaded(function (){ if(matchMedia('only screen and (max-width: 767px)').matches){ $('.equalize').equalize({equalize: 'outerHeight', reset: true}); $('.equalize.sm-equalize-auto').children().css("height", ""); return false; }else if(matchMedia('only screen and (max-width: 991px)').matches){ $('.equalize').equalize({equalize: 'outerHeight', reset: true}); return false; }else if(matchMedia('only screen and (max-width: 1199px)').matches){ $('.equalize').equalize({equalize: 'outerHeight', reset: true}); return false; }else{ $('.equalize').equalize({equalize: 'outerHeight', reset: true}); }}); }, 500); }); }; var dynamicStyle=function(){ var css='', bg='', text='', icon='', border='', bg_h='', text_h='', icon_h='', border_h='', rd='', rd_h='', brc='', brw='', brc_h='', brw_h='', sdw='', sdw_h='', tx='', ty=''; $('.ambersix-icon').each(function(){ var cn=$(this).attr('class').split(' '), cl=''; $(cn).each(function(i,v){ cl +='.'+v; }); icon=$(cl).data("icon"); bg=$(cl).data("background"); border=$(cl).data("border"); icon_h=$(cl).data("icon-hover"); bg_h=$(cl).data("background-hover"); border_h=$(cl).data("border-hover"); icon=('undefined'!==typeof icon) ? 'color:'+icon+' !important;':''; bg=('undefined'!==typeof bg) ? 'background-color:'+bg+' !important;':''; border=('undefined'!==typeof border) ? 'border-color:'+border+' !important;':''; icon_h=('undefined'!==typeof icon_h) ? 'color:'+icon_h+' !important;':''; bg_h=('undefined'!==typeof bg_h) ? 'background-color:'+bg_h+' !important;':''; border_h=('undefined'!==typeof border_h) ? 'border-color:'+border_h+' !important;':''; if(icon||bg||border) css +=cl+' .icon {'+bg+icon+border+'}\n'; if(icon_h||bg_h||border_h) css +=cl+':hover .icon {'+bg_h+icon_h+border_h+'}\n'; }); $('.ambersix-button.custom').each(function(){ var cn=$(this).attr('class').split(' '), cl=''; $(cn).each(function(i,v){ cl +='.'+v; }); bg=$(cl).data("background"); text=$(cl).data("text"); icon=$(cl).data("icon"); border=$(cl).data("border"); bg_h=$(cl).data("background-hover"); text_h=$(cl).data("text-hover"); icon_h=$(cl).data("icon-hover"); border_h=$(cl).data("border-hover"); bg=('undefined'!==typeof bg) ? 'background-color:'+bg+' !important;':''; text=('undefined'!==typeof text) ? 'color:'+text+' !important;':''; icon=('undefined'!==typeof icon) ? 'color:'+icon+' !important;':''; border=('undefined'!==typeof border) ? 'border-color:'+border+' !important;':''; bg_h=('undefined'!==typeof bg_h) ? 'background-color:'+bg_h+' !important;':''; text_h=('undefined'!==typeof text_h) ? 'color:'+text_h+' !important;':''; icon_h=('undefined'!==typeof icon_h) ? 'color:'+icon_h+' !important;':''; border_h=('undefined'!==typeof border_h) ? 'border-color:'+border_h+' !important;':''; if(bg||text||border) css +=cl+' {'+bg+text+border+'}\n'; if(bg_h||text_h||border_h) css +=cl+':hover {'+bg_h+text_h+border_h+'}\n'; if(icon) css +=cl+' .icon {'+icon+'}\n'; if(icon_h) css +=cl+':hover .icon {'+icon_h+'}\n'; }); $('.ambersix-content-box > .inner').each(function(){ var cn=$(this).attr('class').split(' '), cl=''; $(cn).each(function(i,v){ cl +='.'+v; }); bg=$(cl).data("background"); rd=$(cl).data("rounded"); brc=$(cl).data("border-color"); brw=$(cl).data("border-width"); sdw=$(cl).data("shadow"); bg_h=$(cl).data("background-hover"); rd_h=$(cl).data("rounded-hover"); brc_h=$(cl).data("border-color-hover"); brw_h=$(cl).data("border-width-hover"); sdw_h=$(cl).data("shadow-hover"); tx=$(cl).data("translatex"); ty=$(cl).data("translatey"); cl='.ambersix-content-box '+cl; bg=('undefined'!==typeof bg) ? 'background-color:'+bg+' !important;':''; rd=('undefined'!==typeof rd) ? 'border-radius:'+rd+' !important;':''; brc=('undefined'!==typeof brc) ? 'border-color:'+brc+' !important;':''; brw=('undefined'!==typeof brw) ? 'border-width:'+brw+' !important;':''; sdw=('undefined'!==typeof sdw) ? 'box-shadow:'+sdw+' !important;':''; bg_h=('undefined'!==typeof bg_h) ? 'background-color:'+bg_h+' !important;':''; rd_h=('undefined'!==typeof rd_h) ? 'border-radius:'+rd_h+' !important;':''; brc_h=('undefined'!==typeof brc_h) ? 'border-color:'+brc_h+' !important;':''; brw_h=('undefined'!==typeof brw_h) ? 'border-width:'+brw_h+' !important;':''; sdw_h=('undefined'!==typeof sdw_h) ? 'box-shadow:'+sdw_h+' !important;':''; tx=('undefined'!==typeof tx) ? 'transform:translateX('+tx+'px) !important;':''; ty=('undefined'!==typeof ty) ? 'transform:translateY('+ty+'px) !important;':''; if(bg||rd||brc||brw||sdw) css +=cl+' {'+bg+rd+brc+brw+sdw+'}\n'; if(bg_h||rd_h||brc_h||brw_h||sdw_h||tx||ty) css +=cl+':hover {'+bg_h+rd_h+brc_h+brw_h+sdw_h+tx+ty+'}\n'; }); if(css) $("head").append(''); }; var contentBox=function(){ $(window).on('load resize', function(){ var mode='desktop'; if(matchMedia('only screen and (max-width: 991px)').matches) mode='mobile'; $('.ambersix-content-box').each(function(){ if(mode=='desktop'){ $(this).css({'margin':$(this).data('margin')}) .children('.inner').css({'padding':$(this).data('padding'), 'max-width':$(this).data('width')}); }else if(mode=='mobile'){ $(this).css({'margin':$(this).data('mobimargin')}) .children('.inner').css({'padding':$(this).data('mobipadding'), 'max-width':$(this).data('mobiwidth')}); }}) }); }; var gridBox=function(){ $(".ambersix-grid-box").each(function(){ var g=$(this).data('grid'); $(this).children('div').wrap('
    '); var item=$(this).children('.grid-item'); for(var i=0; i < item.length; i+=g){ item.slice(i, i+g).wrapAll("
    "); }}) }; var animateWOW=function(){ new WOW().init(); }; var testimonials=function(){ if($().slick){ $('.ambersix-testimonials').each(function(){ var $this=$(this), center=$this.data("center"), padding=$this.data("padding"), slide=$this.data("slide"); $this.slick({ centerMode: center, centerPadding: padding, slidesToShow: slide, dots: true, arrows: false, responsive: [{ breakpoint: 991, settings: { centerPadding: '10px', slidesToShow: 1, }}, { breakpoint: 767, settings: { centerPadding: '10px', slidesToShow: 1 }}] }); }); }}; var testimonialsBox=function(){ if($().slick){ $('.ambersix-testimonials-box').each(function(){ var $this=$(this); $this.slick({ centerMode: false, slidesToShow: 1, dots: true, arrows: false, responsive: [{ breakpoint: 991, settings: { slidesToShow: 1, }}, { breakpoint: 767, settings: { slidesToShow: 1 }}] }); }); }}; var centerCarousel=function(){ if($().slick){ $('.ambersix-center-carousel-box').each(function(){ var $this=$(this), auto=$this.data("auto"), padding=$this.data("padding"), slide=$this.data("slide"); $this.slick({ centerMode: true, centerPadding: padding, slidesToShow: slide, autoplay: auto, dots: true, arrows: false, responsive: [{ breakpoint: 991, settings: { slidesToShow: 1, }}, { breakpoint: 767, settings: { slidesToShow: 1 }}] }); }); }}; var inViewport=function(){ $('[data-in-viewport="true"]').appear(function(){ $(this).addClass('is-in-view'); }); }; equalizeHeight(); spacer(); resizeHeading(); hereSection(); counter(); contentBox(); $(function(){ testimonials(); testimonialsBox(); portfolioCube(); imagesCube(); accordions(); popupImages(); gridBox(); popupVideo(); elmentHover(); tabs(); countDown(); fitText(); bgVideo(); progressBar(); progressCircle(); dynamicStyle(); srollTarget(); inViewport(); }); $(window).on('load', function(){ portfolioOwl(); newsOwl(); teamOwl(); partnerOwl(); projectRelatedOwl(); wooOwl(); carouselBoxOwl(); imagesCarouselOwl(); animateWOW(); centerCarousel(); }); })(jQuery); document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;i=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)):(index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length,index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:$tabs,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}});!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).on("click",function($thumbs){$thumbs&&$thumbs.preventDefault&&$thumbs.preventDefault();$thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var fluid_ul=jQuery(this);!0!==fluid_ul.data("carousel_enabled")&&fluid_ul.is(":visible")&&(fluid_ul.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(fluid_ul=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":fluid_ul.css("margin-left"),"margin-left":0}),(fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(fluid_ul.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,sliderTimeout,this_element=jQuery(this);this_element.hasClass("wpb_slider_nivo")?(0===(sliderTimeout=1e3*this_element.attr("data-interval"))&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})):this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1
    ')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("
    ").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),(youtubeId=vcExtractYoutubeId(parallaxImage))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),$parallaxElement.attr("data-bottom-top","top: "+-(skrollrSize-100)+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$frame=panel.find(".vc_line-chart"),$google_maps=panel.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$frame.length&&jQuery.fn.vcLineChart&&$frame.vcLineChart({reload:!1}),$google_maps.length&&jQuery.fn.carousel&&$google_maps.carousel("resizeAction"),$frame=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$frame.length&&$frame.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")&&(($frame=$google_maps.find("iframe")).attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")),panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),$(document).trigger("wpb_prepare_tab_content",panel)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(event,ui){var $pie_charts,$round_charts,$line_charts,$carousel;ui.newPanel.length&&ui.newHeader.length&&($pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")}))}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){jQuery("[data-vc-video-bg]").each(function(){var youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeId=$element.data("vcVideoBg"),(youtubeId=vcExtractYoutubeId(youtubeId))&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('
    ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).on("resize",function(){vcResizeVideoBackground($element)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(id){if(void 0===id)return!1;id=id.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.on("click",function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.on("mouseleave",function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width();$this.css("perspective",4*width+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(hoverBox){hoverBox.each(function(){var hoverBoxHeight=jQuery(this),hoverBoxInner=hoverBoxHeight.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=hoverBoxHeight.find(".vc-hoverbox-front-inner").outerHeight(),hoverBoxHeight=hoverBoxHeight.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=hoverBoxHeightPrevious',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('