ok
Direktori : /proc/thread-self/root/home2/selectio/www/ramali.in/html/assets/landing/js/ |
Current File : //proc/thread-self/root/home2/selectio/www/ramali.in/html/assets/landing/js/landing.min.js |
"use strict";window.Wolmart=Wolmart||{},function(t){var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};function o(i,o){var e=this.update.bind(this);this.el=i,this.options=t.extend({friction:.03},o),this.x2=this.y2=this.x=this.y=0,t(window).on("mousemove click",this.moveTo.bind(this)),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",e,{passive:!0}),this.update()}function e(i,o){this.el=i,this.options=t.extend({delta:5,max:30,delay:1500},o,Wolmart.parseOptions(i.getAttribute("data-float-options"))),this._x=0,this._y=0;var e=this,a=function(){Wolmart.call(e.update.bind(e),e.options.delay)};this.el.classList.contains("appear-animate")?t(this.el).data("appear-callback",a):a()}function a(i,o){this.options=t.extend({speed:1,from:"100%",to:"70.5%",styleKey:"width",animation:!1},o,Wolmart.parseOptions(i.getAttribute("data-parallax-options"))),this.el=i,this.flag=!0;var e=this,a=this.update.bind(this);e.update(),window.addEventListener("resize",a,{passive:!0}),window.addEventListener("scroll",a,{passive:!0})}o.prototype.update=function(){var t=this;Wolmart.isInViewport(this.el)&&i((function(){t.move()}))},o.prototype.moveTo=function(t){this.x2=-.1*t.clientX,this.y2=-.1*t.clientY},o.prototype.move=function(){this.x+=(this.x2-this.x)*this.options.friction,this.y+=(this.y2-this.y)*this.options.friction,this.el.style["background-position"]=parseInt(this.x)+"px "+parseInt(this.y)+"px",this.update()},Wolmart.floatBackground=function(t,i){Wolmart.$(t).each((function(){new o(this,i)}))},e.prototype.update=function(){var t=this;setTimeout((function(){t.move()}),1e3)},e.prototype.move=function(){var t,i,o;do{t=2*Math.PI*Math.random(),i=Math.cos(t)*this.options.delta,o=Math.sin(t)*this.options.delta}while((this._x+i)*(this._x+i)+(this._y+o)*(this._y+o)>this.options.max*this.options.max);this.el.style.transform="translate("+(this._x+=i)+"px,"+(this._y+=o)+"px)",this.update()},Wolmart.floatEl=function(t,i){Wolmart.$(t).each((function(){new e(this,i)}))},a.prototype.update=function(){var i=this,o=(window.pageYOffset,window.innerHeight),e=i.el.getBoundingClientRect(),a=2*(o-e.top)/(o+e.height);i.options.animation?(.4<a&&i.flag&&(i.el.classList.add("animated"),i.flag=!1),.4>a&&!i.flag&&(i.el.classList.remove("animated"),i.flag=!0)):t(i.el).css(i.options.styleKey,"calc("+i.options.from+" + ("+i.options.to+" - "+i.options.from+") * "+(a>1?1:a)+")")},Wolmart.parallaxBg=function(t,i){Wolmart.$(t).each((function(){new a(this,i)}))},Wolmart.scrollTo=function(i,o){var e=0,a=void 0===o?600:o;e="number"==typeof i?i:Wolmart.$(i).offset().top,t("html,body").stop().animate({scrollTop:e},a)},Wolmart.demoFilter=function(i){Wolmart.$body.on("click",i,(function(i){i.preventDefault();var o=t(this);o.closest(".demos-nav").find(".nav-filter").removeClass("active"),o.addClass("active"),o.closest(".demos-nav").find(".grid-item").hide().filter("."+o.data("filter")).show()})),t(".demos-nav .nav-filter.active").trigger("click")},t(window).on("wolmart_complete",(function(){Wolmart.floatBackground(".float-bg"),Wolmart.floatEl(".float-el"),Wolmart.$body.on("click",".menu a, .mobile-menu a, .scroll-to",(function(i){var o=this,e=t(this),a=o.hash?o.hash:o.slice(o.lastIndexOf("#"));a.startsWith("#")&&(t(".mobile-menu-overlay").click(),e.closest("ul").children().removeClass("active"),e.closest("li").addClass("active"),Wolmart.scrollTo(a),i.preventDefault())})),Wolmart.demoFilter(".demos-nav .nav-filter"),t(".lazy-bg").removeClass("lazy-bg"),Wolmart.parallaxBg(".parallax-effect"),Wolmart.lazyLoad(document.body)}))}(jQuery);