!function(t,e){"use strict";function i(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,i=e.width*e.height,n=this.intersectionRect,o=n.width*n.height;this.intersectionRatio=i?o/i:this.isIntersecting?1:0}function n(t,e){var i=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=function(t,e){var i=null;return function(){i||(i=setTimeout(function(){t(),i=null},e))}}(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function o(t,e,i,n){"function"==typeof t.addEventListener?t.addEventListener(e,i,n||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,i)}function r(t,e,i,n){"function"==typeof t.removeEventListener?t.removeEventListener(e,i,n||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,i)}function s(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function h(t,e){for(var i=e;i;){if(i==t)return!0;i=c(i)}return!1}function c(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)"isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var a=[];n.prototype.THROTTLE_TIMEOUT=100,n.prototype.POLL_INTERVAL=null,n.prototype.USE_MUTATION_OBSERVER=!0,n.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},n.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},n.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},n.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},n.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,i){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==i[e-1]})},n.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},n.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(o(t,"resize",this._checkForIntersections,!0),o(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},n.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,r(t,"resize",this._checkForIntersections,!0),r(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},n.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),n=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(o){var r=o.element,h=s(r),c=this._rootContainsTarget(r),a=o.entry,l=e&&c&&this._computeTargetAndRootIntersection(r,n),u=o.entry=new i({time:t.performance&&performance.now&&performance.now(),target:r,boundingClientRect:h,rootBounds:n,intersectionRect:l});a?e&&c?this._hasCrossedThreshold(a,u)&&this._queuedEntries.push(u):a&&a.isIntersecting&&this._queuedEntries.push(u):this._queuedEntries.push(u)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},n.prototype._computeTargetAndRootIntersection=function(i,n){if("none"!=t.getComputedStyle(i).display){for(var o=s(i),r=c(i),h=!1;!h;){var a=null,l=1==r.nodeType?t.getComputedStyle(r):{};if("none"==l.display)return;if(r==this.root||r==e?(h=!0,a=n):r!=e.body&&r!=e.documentElement&&"visible"!=l.overflow&&(a=s(r)),a&&!(o=function(t,e){var i=Math.max(t.top,e.top),n=Math.min(t.bottom,e.bottom),o=Math.max(t.left,e.left),r=Math.min(t.right,e.right),s=r-o,h=n-i;return s>=0&&h>=0&&{top:i,bottom:n,left:o,right:r,width:s,height:h}}(a,o)))break;r=c(r)}return o}},n.prototype._getRootRect=function(){var t;if(this.root)t=s(this.root);else{var i=e.documentElement,n=e.body;t={top:0,left:0,right:i.clientWidth||n.clientWidth,width:i.clientWidth||n.clientWidth,bottom:i.clientHeight||n.clientHeight,height:i.clientHeight||n.clientHeight}}return this._expandRectByRootMargin(t)},n.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,i){return"px"==e.unit?e.value:e.value*(i%2?t.width:t.height)/100}),i={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return i.width=i.right-i.left,i.height=i.bottom-i.top,i},n.prototype._hasCrossedThreshold=function(t,e){var i=t&&t.isIntersecting?t.intersectionRatio||0:-1,n=e.isIntersecting?e.intersectionRatio||0:-1;if(i!==n)for(var o=0;o<this.thresholds.length;o++){var r=this.thresholds[o];if(r==i||r==n||r<i!=r<n)return!0}},n.prototype._rootIsInDom=function(){return!this.root||h(e,this.root)},n.prototype._rootContainsTarget=function(t){return h(this.root||e,t)},n.prototype._registerInstance=function(){a.indexOf(this)<0&&a.push(this)},n.prototype._unregisterInstance=function(){var t=a.indexOf(this);-1!=t&&a.splice(t,1)},t.IntersectionObserver=n,t.IntersectionObserverEntry=i}}(window,document),require(["jquery","cookie-helper","jquery-ui","jquery-ui-touch","slick-carousel"],function(t,e){function i(e,i){if(delete e.visibleTimeout,n(i.takeRecords()),"isVisible"in e&&e.isVisible){delete e.isVisible;var o=t(e).data("view-id"),r=t(e).data("prd-id");t.get("/pixel.png",{adview_id:o,adview_pid:r,adview_page:window.location.pathname}),i.unobserve(e)}}function n(t){t.forEach(function(t){var e=t.target;"visibleTimeout"in e&&(clearTimeout(e.visibleTimeout),delete e.visibleTimeout),e.isVisible=function(t,e){return e.width*e.height/(t.width*t.height)>=1}(t.boundingClientRect,t.intersectionRect),"isVisible"in e&&(e.visibleTimeout=setTimeout(i,500,e,s))})}var o=e.read("mw_signon");if(null!=o)try{o=JSON.parse(o)}catch(t){o=null}t("#homepage .sub-nav-mob").on("auth",function(e,i){null!=i&&"un"in i&&"pp"in i&&t("#homepage .sub-nav-mob").hide()}),t(".point").on("click",function(){t(this).toggleClass("active")}),t(".desc").on("click",".show-more,.show-less",function(){t(this).closest(".desc").toggleClass("more")}),t("a[href='#ad-disclosure']").click(function(e){e.preventDefault(),e.stopPropagation();var i=t("#ad-disclosure").offset().top;return t("#ad-disclosure").addClass("yellow"),t("html,body").animate({scrollTop:i}),setTimeout(function(){t("#ad-disclosure").removeClass("yellow")},2e3),!1}),t("#homepage .sub-nav-mob").trigger("auth",o),t(".carousel").slick({infinite:!1,variableWidth:!0,slidesToShow:2,arrows:!1,responsive:[{breakpoint:490,settings:{slidesToShow:1}}]}),t(".carousel").on("afterChange",function(e,i,n,o){var r=t(window).width()-t(".img-mob").width()-40;t(".slick-track").css("position","relative"),t(".slick-track").css("left","0px"),t(".slick-track").css("transition","left .2s"),i.currentSlide==i.slideCount-1&&t(".slick-track").css("left",r+"px"),t(".play-overlay").show()}),t(".play-overlay").on("click",function(){var e=t(this).parent(),i=t(this).siblings("img"),n=t(this).siblings("video");t(this).hide(),0==n.length&&e.append('<video playsinline class="top-vid"><source src="https://d2k0escgkdw2ev.cloudfront.net/wallethub/posts/45562/wallethub_app_ios_1080x1920_v3.webm" type="video/webm"><source src="https://d2k0escgkdw2ev.cloudfront.net/wallethub/posts/45561/wallethub_app_ios_1080x1920_v3.mp4" type="video/mp4"></video>'),t(".bezel").css("opacity","0"),i.hide(),n.show(),t(this).siblings("video").trigger("play").bind("ended",function(){this.load(),t(this).hide(),t(".bezel").css("opacity","1"),t(".play-overlay").show(),i.show()})});var r=document.getElementById("homepage");if(r){var s=new IntersectionObserver(n,{threshold:[1]});t(r).find(".card-img").each(function(){var e=t.fn.Uniqid(),i=t.fn.Uniqid();t(this).data("view-id",e),t(this).data("click-id",i);var n=t(this).closest(".boa").find(".btn")[0];if(n&&n.href){t(this).data("prd-id","128");var o=t(this).closest(".boa").find("a[href]");o.length,o.each(function(){this.href=this.href+"?clickId="+i+"&viewId="+e})}s.observe(this)})}});