File: /home/mciraet/www/wp-content/themes/movedo/js/plugins/grve.min.js
/**
* Woo quantity Buttons
* Version: 1.3
* Description: Adds quantity buttons for WooCommerce
* Author: Greatives
*/
var wooQuantityButtonsEnabled = parseInt(movedo_grve_data.quantity_buttons);
if ( 1 == wooQuantityButtonsEnabled ) {
!function(t){function n(){t(".woocommerce .quantity input[type=number]").each(function(){var n=t(this),e=parseFloat(n.attr("max")),a=parseFloat(n.attr("min")),r=parseInt(n.attr("step"),10),o=n;setTimeout(function(){if(0==o.next(".plus").length){var n=t('<button class="minus grve-qty-btn grve-custom-btn">-</button>').insertBefore(o),u=t('<button class="plus grve-qty-btn grve-custom-btn">+</button>').insertAfter(o);n.on("click",function(t){t.preventDefault();var n=""===o.val()?0:parseInt(o.val(),10)-r;n=(n=n<0?0:n)<a?a:n,o.val(n).trigger("change")}),u.on("click",function(t){t.preventDefault();var n=""===o.val()?1:parseInt(o.val(),10)+r;n=n>e?e:n,o.val(n).trigger("change")})}},10)})}n(),t(document).on("updated_cart_totals",n)}(jQuery);
}
/**
* Background Parallax
* Version: 2.0.1
* Description: Parallax for section background image
* Author: Greatives
*/
!function(i,t,e,s){var a={threshold:.5,elClass:".grve-bg-image"};function n(t,e){this.section=t,this.$section=i(t);var s={threshold:this.$section.data("parallax-threshold")||null};for(var n in s)null===s[n]&&delete s[n];i.extend(this,a,e,s),this.$element=this.$section.find(this.elClass),this.scroll=!1,this.onWindowScroll=this.onWindowScroll.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.initialise()}n.prototype.initialise=function(){this.resizeParallax(),this.updateParallaxItem(),t.addEventListener("resize",this.onWindowResize),t.addEventListener("scroll",this.onWindowScroll)},n.prototype.onWindowResize=function(){this.resizeParallax(),this.onWindowScroll()},n.prototype.onWindowScroll=function(){var i=this;i.scroll||(t.requestAnimationFrame(function(){i.updateParallaxItem()}),i.scroll=!0)},n.prototype.resizeParallax=function(){this.windowW=i(t).width(),this.windowH=i(t).height(),this.sectionW=this.$section.outerWidth(),this.sectionH=this.$section.outerHeight(),this.$section.hasClass("grve-horizontal-parallax-lr")?this.parallaxType="horizontal-lr":this.$section.hasClass("grve-horizontal-parallax-rl")?this.parallaxType="horizontal-rl":this.parallaxType="vertical","horizontal-lr"==this.parallaxType||"horizontal-rl"==this.parallaxType?(this.parallaxItemSize=this.sectionW+this.sectionW*this.threshold,this.scrollDist=this.parallaxItemSize-this.sectionW,this.$element.css({width:this.parallaxItemSize})):(this.parallaxItemSize=this.sectionH+this.sectionH*this.threshold,this.scrollDist=this.parallaxItemSize-this.sectionH,this.$element.css({height:this.parallaxItemSize}))},n.prototype.updateParallaxItem=function(){if(this.inViewport(this.$section)){var e=i(t).scrollTop(),s=this.$section.offset().top-e-this.windowH,a=this.sectionH,n=s/((this.windowH+a)/this.scrollDist);l?"horizontal-rl"==this.parallaxType?this.$element.css({transform:"translate3d( "+n+"px, 0px, 0px) translateZ(0)",visibility:"visible"}):"horizontal-lr"==this.parallaxType?this.$element.css({transform:"translate3d( "+-(this.scrollDist+n)+"px, 0px, 0px) translateZ(0)",visibility:"visible"}):this.$element.css({transform:"translate3d( 0px, "+n+"px, 0px) translateZ(0)",visibility:"visible"}):"horizontal-rl"==this.parallaxType?this.$element.css({left:n+"px",visibility:"visible"}):"horizontal-lr"==this.parallaxType?this.$element.css({left:-(this.scrollDist+n)+"px",visibility:"visible"}):this.$element.css({top:n+"px",visibility:"visible"})}this.scroll=!1},n.prototype.inViewport=function(e){var s=i(t).scrollTop(),a=s+i(t).height(),n=e.offset().top,o=n+e.outerHeight();return a>=n&&s<=o};var o=(e.body||e.documentElement).style,l=void 0!==o.transition||void 0!==o.WebkitTransition||void 0!==o.MozTransition||void 0!==o.MsTransition||void 0!==o.OTransition,r=["WebkitTransform","MozTransform","OTransform","msTransform"];for(var h in r)void 0!==o[r[h]]&&"-"+r[h].replace("Transform","").toLowerCase();!function(){for(var i=0,e=["ms","moz","webkit","o"],s=0;s<e.length&&!t.requestAnimationFrame;++s)t.requestAnimationFrame=t[e[s]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[e[s]+"CancelAnimationFrame"]||t[e[s]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(e,s){var a=(new Date).getTime(),n=Math.max(0,16-(a-i)),o=t.setTimeout(function(){e(a+n)},n);return i=a+n,o}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(i){clearTimeout(i)})}(),i.fn.bgParallax=function(t){return this.each(function(){i.data(this,"grve_bgParallax")||i.data(this,"grve_bgParallax",new n(this,t))})}}(jQuery,window,document);
/**
* Auto Headings
* Version: 1.0.0
* Author: Greatives
*/
!function(a,b,c,d){function g(b,c){this.element=b,this.$element=a(b),a.extend(this,f,c),this.initialise()}var e="autoHeading",f={compressor:20,items:[{item:".title",min:12,max:50},{item:".description",min:12,max:14}]};g.prototype.initialise=function(){this.bindEvents(),this.calSize()},g.prototype.calSize=function(){var b=this,c=b.$element.width(),e=b.items;a.each(e,function(a,e){b.resetSize.call(b,e.item);var f=parseInt(b.$element.find(e.item).css("font-size")),g=parseInt(b.$element.find(e.item).css("line-height")),h=e.min==d?f:e.min,i=e.max==d?f+10:e.max,j=Math.max(Math.min(c/b.compressor,parseFloat(i)),parseFloat(h)).toFixed(0),k=(j*g/f).toFixed(0);b.$element.find(e.item).css({"font-size":j+"px","line-height":k+"px"})})},g.prototype.bindEvents=function(){var d,c=this;a(b).on("resize."+c._name,function(){b.innerWidth!==c.lastWindowWidth&&(b.clearTimeout(d),d=b.setTimeout(function(){c.onWindowResize.call(c)},300))})},g.prototype.onWindowResize=function(){this.calSize()},g.prototype.resetSize=function(a){var b=this.$element.find(a);b.css({"font-size":"","line-height":""})},g.prototype.destroy=function(){var c=this,d=c.items;a(b).off("."+c._name),a.each(d,function(a,b){c.$element.find(b.item).css({"font-size":"","line-height":""})})},a.fn[e]=function(b){return this.each(function(){a.data(this,"grve_"+e)||a.data(this,"grve_"+e,new g(this,b))})}}(jQuery,window,document);
/**
* Columns Equal Size
* Version: 1.0.2
* Author: Greatives
*/
!function(t,e,i,s){var o="columnSize",n={equal:!0,middleContent:!1,fullHeight:!1,offset:0,columnClass:"grve-column-wrapper",middleClass:"grve-middle",showClass:"grve-show-custom-height",preparedClass:"grve-with-fullheight",tabletLW:1200,tabletPW:1023,mobileLW:767,equalTabletL:!0,equalTabletP:!1,equalMobileL:!1,fullTabletL:!0,fullTabletP:!1,fullMobileL:!1,onComplete:null};function l(e,i){this.element=e,this.$element=t(e),this.options=t.extend({},n,i),this._name=o,this.deviceEqual=!0,this.deviceFull=!0,this.bounds=null,this.columnLength=null,this.init()}l.prototype.windowW=null,l.prototype.windowH=null,l.prototype.init=function(){this.buildCache(),this.loadImages(),this.bindEvents()},l.prototype.buildCache=function(){var e=this;e.$column=this.$element.find("."+this.options.columnClass),e.columns=[],e.$column.each((function(){var i=t(this);e.columns.push(i)}))},l.prototype.loadImages=function(){var e=this,i=this.$element.find("img");i.length?i.each((function(s,o){var n=new Image,l=t(this).attr("src");l&&(n.src=l.replace(/^url\((?:"|')?(.*)(?:'|")?\)$/gm,"$1"),n.onload=function(){s==i.length-1&&e.updateParams()})})):e.updateParams()},l.prototype.bindEvents=function(){var i,s=this;t(e).on("resize."+s._name,(function(){e.innerWidth!==s.lastWindowWidth&&(e.clearTimeout(i),i=e.setTimeout((function(){s.onWindowResize.call(s)}),300))}))},l.prototype.onWindowResize=function(){this.updateParams()},l.prototype.reCalculate=function(){this.updateParams()},l.prototype.updateParams=function(){this.windowW=e.innerWidth,this.windowH=e.innerHeight,this.lastWindowWidth=this.windowW,this.resetParams(),this.enableDevice(),this.setColumns()},l.prototype.enableDevice=function(){this.windowW>this.options.tabletPW&&this.windowW<this.options.tabletLW?(this.deviceEqual=this.options.equalTabletL,this.deviceFull=this.options.fullTabletL):this.windowW>this.options.mobileLW&&this.windowW<this.options.tabletPW?(this.deviceEqual=this.options.equalTabletP,this.deviceFull=this.options.fullTabletP):this.windowW>0&&this.windowW<this.options.mobileLW?(this.deviceEqual=this.options.equalMobileL,this.deviceFull=this.options.fullMobileL):(this.deviceEqual=!0,this.deviceFull=!0)},l.prototype.setColumns=function(){var e=this;e.maxHeight=0,e.columnLength=this.columns.length,e.options.equal?t.each(this.columns,(function(t,i){e.getMaxHeight(i[0]),t==e.columnLength-1&&e.setEqualColumns()})):e.options.fullHeight&&this.setFullHeight()},l.prototype.getHeight=function(t){var e=t.getBoundingClientRect();return Math.round(e.height)},l.prototype.getMaxHeight=function(t){var e=t.getBoundingClientRect(),i=Math.round(e.height);this.maxHeight=i>this.maxHeight?i:this.maxHeight},l.prototype.setEqualColumns=function(){this.deviceEqual?(this.$column.css({height:this.maxHeight}),this.callback(),this.options.fullHeight||this.afterComplete()):this.showElement()},l.prototype.setFullHeight=function(){var t=this.options.offset;if(this.getHeight(this.element)+t<=this.windowH&&this.deviceFull){this.resetPaddings(this.$element),this.$element.removeClass(this.options.preparedClass);var e=this.getHeight(this.element),i=(this.windowH-e-t)/2;this.$element.css({"padding-top":i,"padding-bottom":i})}this.showElement(),this.afterComplete()},l.prototype.resetPaddings=function(t){t.css({"padding-top":0,"padding-bottom":0})},l.prototype.resetParams=function(){this.$element.css({"padding-top":"","padding-bottom":"",height:""}),this.$column.css({height:""}),this.$column.parent().removeClass(this.options.middleClass)},l.prototype.showElement=function(){this.$element.addClass(this.options.showClass)},l.prototype.callback=function(){this.options.middleContent&&this.$column.parent().addClass(this.options.middleClass),this.options.fullHeight&&this.deviceFull&&this.setFullHeight(),this.showElement()},l.prototype.afterComplete=function(){var t=this.options.onComplete;"function"==typeof t&&t.call(this.element)},t.fn[o]=function(e){return this.each((function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new l(this,e))}))}}(jQuery,window,document);
/**
* Column Motion
* Version: 1.0.0
* Description: Motion Effects for columns
* Author: Greatives
*/
!function(a,b,c,d){function g(c,d){this.element=c,this.$element=a(c),this._name=e;var g={effect:this.$element.data("parallax-effect")||null,sensitive:this.$element.data("sensitive")||null,limit:this.$element.data("limit")||null,invert:this.$element.data("invert")||null};for(var h in g)null===g[h]&&delete g[h];a.extend(this,f,d,g),this.$wrapper=this.$element.parents(this.wrapper),this.mouseMove=!1,this.transformXY=!1,this.transformX=!1,this.transformY=!1,this.enabled=!1,this.deviceEnable=!1,this.raf=null,this.scrollT=0,this.windowH=0,this.windowW=0,this.windowB=0,this.elementT=0,this.elementL=0,this.elementB=0,this.elementH=0,this.elementW=0,this.elementCenterX=0,this.elementCenterY=0,this.wrapperT=0,this.wrapperB=0,this.wrapperH=0,this.motionX=0,this.motionY=0,this.speedX=0,this.speedY=0,this.clientX=0,this.clientY=0,this.onAnimationFrame=this.onAnimationFrame.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.updateVerticalParallax=this.updateVerticalParallax.bind(this),this.updateMouseMoveParaller=this.updateMouseMoveParaller.bind(this),this.initialise(),b.addEventListener("resize",this.onWindowResize)}var e="paraller",f={wrapper:".grve-section",effect:"vertical-parallax",sensitive:"max",limit:"none",invert:!1,tabletL:[1200,!0],tabletP:[1023,!1],mobileL:[767,!1]};g.prototype.initialise=function(){this.setEffect(),this.updateBounds(),this.updateDimensions()},g.prototype.setEffect=function(){switch(this.effect){case"mouse-move-x-y":this.mouseMove=!0,this.transformXY=!0;break;case"mouse-move-x":this.mouseMove=!0,this.transformX=!0;break;case"mouse-move-y":this.mouseMove=!0,this.transformY=!0;break;case"vertical-parallax":this.mouseMove=!1,this.transformY=!0}},g.prototype.updateDimensions=function(){this.windowW=a(b).width(),this.windowH=a(b).height();var c=this.tabletL[0],d=this.tabletP[0],e=this.mobileL[0],f=this.tabletL[1],g=this.tabletP[1],h=this.mobileL[1];this.mouseMove&&this.windowW<c[0]?this.deviceEnable=!1:this.windowW>d&&this.windowW<c?this.deviceEnable=f:this.windowW>e&&this.windowW<d?this.deviceEnable=g:this.windowW>0&&this.windowW<e?this.deviceEnable=h:this.deviceEnable=!0,this.toggleEffectClass(),this.deviceEnable?this.enable():this.disable()},g.prototype.toggleEffectClass=function(){this.deviceEnable?this.$wrapper.addClass("grve-with-parallax-effect"):this.$wrapper.removeClass("grve-with-parallax-effect")},g.prototype.updateBounds=function(){this.elementBounds=this.element.getBoundingClientRect(),this.elementT=this.$element.offset().top,this.elementX=this.elementBounds.left,this.elementY=this.elementBounds.top,this.elementH=this.$element.outerHeight(),this.elementW=this.$element.outerWidth(),this.elementCenterX=.5*this.elementW,this.elementCenterY=.5*this.elementH,this.elementRangeX=Math.max(this.elementCenterX,this.elementW-this.elementCenterX),this.elementRangeY=Math.max(this.elementCenterY,this.elementH-this.elementCenterY),this.wrapperT=this.$wrapper.offset().top,this.wrapperH=this.$wrapper.outerHeight()},g.prototype.enable=function(){this.mouseMove?b.addEventListener("mousemove",this.updateMouseMoveParaller):(this.updateVerticalParallax(),b.addEventListener("scroll",this.updateVerticalParallax)),this.raf=requestAnimationFrame(this.onAnimationFrame)},g.prototype.disable=function(){this.mouseMove?b.removeEventListener("mousemove",this.updateMouseMoveParaller):b.removeEventListener("scroll",this.updateVerticalParallax),cancelAnimationFrame(this.raf),this.resetPosition()},g.prototype.onWindowResize=function(){var c=this.windowW;a(b).width()!=c&&(this.updateBounds(),this.updateDimensions())},g.prototype.setSensitive=function(){var a=10;switch(this.sensitive){case"low":a=1;break;case"normal":a=2;break;case"hight":a=5;break;case"max":a=10}return a},g.prototype.setLimitRatio=function(){this.ratio=1,this.windowW<=1200&&(this.ratio=.8),this.windowW<=768&&(this.ratio=.6)},g.prototype.setLimit=function(){var a=30;switch(this.setLimitRatio(),this.limit){case"1x":a=30*this.ratio;break;case"2x":a=60*this.ratio;break;case"3x":a=90*this.ratio;break;case"4x":a=120*this.ratio;break;case"5x":a=150*this.ratio;break;case"6x":a=180*this.ratio;break;case"none":a=!1}return a},g.prototype.updateVerticalParallax=function(){if(this.scrollT=a(b).scrollTop(),this.inViewport()){var c=this.windowH/2+this.wrapperH/2,d=0==this.setLimit()?0:this.setLimit(),e=0;e=this.wrapperT-this.scrollT+this.wrapperH/2>this.windowH/2?this.elementT-this.wrapperT-d:this.wrapperT+this.wrapperH-(this.elementT+this.elementH)-d;var f=c/e,g=(this.windowH-(this.wrapperT-this.scrollT))/f-e;this.motionX=0,this.motionY=g}},g.prototype.updateMouseMoveParaller=function(c){if(this.scrollT=a(b).scrollTop(),this.inViewport()){this.updateBounds();var d=c.clientX,e=c.clientY,f=this.setSensitive(),g=this.setLimit(),h=(d-this.elementX-this.elementCenterX)/this.elementRangeX,i=(e-this.elementY-this.elementCenterY)/this.elementRangeY;this.motionX=h,this.motionY=i,this.transformX?this.motionY=0:this.transformY&&(this.motionX=0),this.motionX*=this.elementW*(f/100),this.motionY*=this.elementH*(f/100),isNaN(parseFloat(g))||(this.motionX=this.clamp(this.motionX,-g,g),this.motionY=this.clamp(this.motionY,-g,g))}},g.prototype.clamp=function(a,b,c){return a=Math.max(a,b),a=Math.min(a,c)},g.prototype.setPosition=function(a,b){a+="px",b+="px",this.$element.css({transform:"translate3d("+a+","+b+",0)"})},g.prototype.resetPosition=function(){this.$element.css({transform:"translate3d(0px,0px,0px)"})},g.prototype.onAnimationFrame=function(){this.speedX+=.1*(this.motionX-this.speedX),this.speedY+=.1*(this.motionY-this.speedY);var a=this.speedX*(this.invert?-1:1),b=this.speedY*(this.invert?-1:1);this.setPosition(a,b),this.raf=requestAnimationFrame(this.onAnimationFrame)},g.prototype.inViewport=function(){return this.windowB=this.scrollT+this.windowH,this.wrapperB=this.wrapperT+this.wrapperH,this.windowB>=this.wrapperT&&this.scrollT<=this.wrapperB},a.fn[e]=function(b){return this.each(function(){a.data(this,"grve_"+e)||a.data(this,"grve_"+e,new g(this,b))})}}(jQuery,window,document);