PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/internetmoney.kerihosting.com/wp-content/themes/jnews/assets/js/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/internetmoney.kerihosting.com/wp-content/themes/jnews/assets/js/jquery.okayNav.js

/*!
 * jquery.okayNav.js 2.0.4 (https://github.com/VPenkov/okayNav)
 * Author: Vergil Penkov (http://vergilpenkov.com/)
 * MIT license: https://opensource.org/licenses/MIT
 */
!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),i(n),n}:i(jQuery)}((function(i){var t={parent:"",toggle_icon_class:"okayNav__menu-toggle",toggle_icon_content:"<span /><span /><span />",align_right:!0,swipe_enabled:!0,threshold:50,resize_delay:10,beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){},itemHidden:function(){},itemDisplayed:function(){}};function n(n,e){this.options=i.extend({},t,e),this.navigation=i(n),this.document=i(document),this.window=i(window),""==this.options.parent&&(this.options.parent=this.navigation.parent()),this.nav_open=!1,this.parent_full_width=0,this.radCoef=180/Math.PI,this.sTouch={x:0,y:0},this.cTouch={x:0,y:0},this.sTime=0,this.nav_position=0,this.percent_open=0,this.nav_moving=!1,this.init()}n.prototype={init:function(){i("body").addClass("okayNav-loaded"),this.navigation.addClass("okayNav loaded").children("ul").addClass("okayNav__nav--visible"),this.options.align_right?this.navigation.append('<ul class="okayNav__nav--invisible transition-enabled nav-right" />').append('<a href="#" class="'+this.options.toggle_icon_class+' okay-invisible">'+this.options.toggle_icon_content+"</a>"):this.navigation.prepend('<ul class="okayNav__nav--invisible transition-enabled nav-left" />').prepend('<a href="#" class="'+this.options.toggle_icon_class+' okay-invisible">'+this.options.toggle_icon_content+"</a>"),this.nav_visible=this.navigation.children(".okayNav__nav--visible"),this.nav_invisible=this.navigation.children(".okayNav__nav--invisible"),this.toggle_icon=this.navigation.children("."+this.options.toggle_icon_class),this.toggle_icon_width=this.toggle_icon.outerWidth(!0),this.default_width=this.getChildrenWidth(this.navigation),this.parent_full_width=i(this.options.parent).outerWidth(!0),this.last_visible_child_width=0,this.initEvents(),this.nav_visible.contents().filter((function(){return this.nodeType=Node.TEXT_NODE&&!1===/\S/.test(this.nodeValue)})).remove(),1==this.options.swipe_enabled&&this.initSwipeEvents()},initEvents:function(){var t=this;t.options.parent.on("click.okayNav",(function(n){var e=i(n.target);!0===t.nav_open&&0==e.closest(".okayNav").length&&t.closeInvisibleNav(),e.hasClass(t.options.toggle_icon_class)&&(n.preventDefault(),t.toggleInvisibleNav())})),i(document).on("mouseup.okayNav",(function(n){i(n.target);!i(n.target).parents(".okayNav").length>0&&t.closeInvisibleNav()}));var n=t._debounce((function(){t.recalcNav()}),t.options.recalc_delay);t.window.on("load.okayNav ready.okayNav resize.okayNav",n),i(document).on("ready.okayNav",n),n()},initSwipeEvents:function(){var t=this;t.document.on("touchstart.okayNav",(function(n){if(t.nav_invisible.removeClass("transition-enabled"),1==n.originalEvent.touches.length){var e=n.originalEvent.touches[0];(e.pageX<25&&0==t.options.align_right||e.pageX>i(t.options.parent).outerWidth(!0)-25&&1==t.options.align_right||!0===t.nav_open)&&(t.sTouch.x=t.cTouch.x=e.pageX,t.sTouch.y=t.cTouch.y=e.pageY,t.sTime=Date.now())}})).on("touchmove.okayNav",(function(i){var n=i.originalEvent.touches[0];t._triggerMove(n.pageX,n.pageY),t.nav_moving=!0})).on("touchend.okayNav",(function(i){t.sTouch={x:0,y:0},t.cTouch={x:0,y:0},t.sTime=0,t.percent_open>100-t.options.threshold?(t.nav_position=0,t.closeInvisibleNav()):1==t.nav_moving&&(t.nav_position=t.nav_invisible.width(),t.openInvisibleNav()),t.nav_moving=!1,t.nav_invisible.addClass("transition-enabled")}))},_getDirection:function(i){return this.options.align_right?i>0?-1:1:i<0?-1:1},_triggerMove:function(i,t){this.cTouch.x=i,this.cTouch.y=t;var n=Date.now(),e=this.cTouch.x-this.sTouch.x,o=this.cTouch.y-this.sTouch.y,s=o*o,a=Math.sqrt(e*e+s),l=Math.sqrt(s),h=Math.asin(Math.sin(l/a))*this.radCoef;this.sTime;if(this.sTouch.x=i,this.sTouch.y=t,h<20){var v=this._getDirection(e),c=this.nav_position+v*a,r=this.nav_invisible.width(),d=0;c<0?d=-c:c>r&&(d=r-c);var p=(r-(this.nav_position+v*a+d))/r*100;this.nav_position+=v*a+d,this.percent_open=p}},getParent:function(){return this.options.parent},getVisibleNav:function(){return this.nav_visible},getInvisibleNav:function(){return this.nav_invisible},getNavToggleIcon:function(){return this.toggle_icon},_debounce:function(i,t,n){var e;return function(){var o=this,s=arguments,a=function(){e=null,n||i.apply(o,s)},l=n&&!e;clearTimeout(e),e=setTimeout(a,t),l&&i.apply(o,s)}},openInvisibleNav:function(){this.options.enable_swipe||this.options.beforeOpen.call(),this.toggle_icon.addClass("icon--active"),this.nav_invisible.addClass("nav-open"),this.nav_open=!0,this.options.afterOpen.call()},closeInvisibleNav:function(){this.options.enable_swipe||this.options.beforeClose.call(),this.toggle_icon.removeClass("icon--active"),this.nav_invisible.removeClass("nav-open"),this.nav_open=!1,this.options.afterClose.call()},toggleInvisibleNav:function(){this.nav_open?this.closeInvisibleNav():this.openInvisibleNav()},getChildrenWidth:function(t){for(var n=0,e=i(t).children(),o=0;o<e.length;o++)n+=i(e[o]).outerWidth(!0);return n},getVisibleItemCount:function(){return i("li",this.nav_visible).length},getHiddenItemCount:function(){return i("li",this.nav_invisible).length},recalcNav:function(){var t=i(this.options.parent).outerWidth(!0),n=this.getChildrenWidth(this.options.parent),e=this.navigation.outerWidth(!0),o=this.getVisibleItemCount(),s=this.nav_visible.outerWidth(!0)+this.toggle_icon_width,a=n+this.last_visible_child_width+this.toggle_icon_width;if(t>n-e+this.default_width)return this._expandAllItems(),void this.toggle_icon.addClass("okay-invisible");o>0&&e<=s&&t<=a&&this._collapseNavItem(),t>a+this.toggle_icon_width+15&&this._expandNavItem(),0==this.getHiddenItemCount()?this.toggle_icon.addClass("okay-invisible"):this.toggle_icon.removeClass("okay-invisible")},_collapseNavItem:function(){var t=i("li:last-child",this.nav_visible);this.last_visible_child_width=t.outerWidth(!0),this.document.trigger("okayNav:collapseItem",t),t.detach().prependTo(this.nav_invisible),this.options.itemHidden.call(),this.recalcNav()},_expandNavItem:function(){var t=i("li:first-child",this.nav_invisible);this.document.trigger("okayNav:expandItem",t),t.detach().appendTo(this.nav_visible),this.options.itemDisplayed.call()},_expandAllItems:function(){i("li",this.nav_invisible).detach().appendTo(this.nav_visible),this.options.itemDisplayed.call()},_collapseAllItems:function(){i("li",this.nav_visible).detach().appendTo(this.nav_invisible),this.options.itemHidden.call()},destroy:function(){i("li",this.nav_invisible).appendTo(this.nav_visible),this.nav_invisible.remove(),this.nav_visible.removeClass("okayNav__nav--visible"),this.toggle_icon.remove(),this.document.unbind(".okayNav"),this.window.unbind(".okayNav")}},i.fn.okayNav=function(t){var e,o=arguments;return void 0===t||"object"==typeof t?this.each((function(){i.data(this,"plugin_okayNav")||i.data(this,"plugin_okayNav",new n(this,t))})):"string"==typeof t&&"_"!==t[0]&&"init"!==t?(this.each((function(){var s=i.data(this,"plugin_okayNav");s instanceof n&&"function"==typeof s[t]&&(e=s[t].apply(s,Array.prototype.slice.call(o,1))),"destroy"===t&&i.data(this,"plugin_okayNav",null)})),void 0!==e?e:this):void 0}}));