!function(i){(PPWooMiniCart=function(i){this.node=i,this.wrap=i.find(".pp-woo-mini-cart-container"),this.behaviour=this.wrap.data("target"),this._init()}).prototype={id:"",node:"",wrap:"",element:"",behaviour:"",isPreview:!1,_init:function(){this.element=this.node.find("a.pp-woo-cart-contents"),this._bindEvents()},_bindEvents:function(){var t=this;"on-click"===this.behaviour&&this.element.on("click",i.proxy(this._toggleCart,this)),"on-hover"===this.behaviour&&(this.element.on("mouseover",function(i){i.preventDefault(),t._showCart()}),this.node.find(".pp-woo-mini-cart-wrap").on("mouseover",function(i){i.preventDefault(),t._showCart()}),this.element.on("mouseout",function(i){i.preventDefault(),t._hideCart()}),this.node.find(".pp-woo-mini-cart-wrap").on("mouseout",function(i){i.preventDefault(),t._hideCart()})),this.wrap.hasClass("pp-woo-mini-cart-preview")&&setTimeout(function(){t._togglePreview()},200),i(document).on("click",function(i){t.isPreview||!t.wrap.is(i.target)&&0===t.wrap.has(i.target).length&&i.which&&t._hideCart()})},_showCart:function(){this.node.find(".pp-woo-mini-cart-wrap").addClass("show-mini-cart")},_hideCart:function(){this.node.find(".pp-woo-mini-cart-wrap").removeClass("show-mini-cart")},_toggleCart:function(i){i.preventDefault(),this.node.find(".pp-woo-mini-cart-wrap").toggleClass("show-mini-cart")},_togglePreview:function(){this.isPreview?(this.isPreview=!1,this._hideCart()):(this.isPreview=!0,this._showCart())},_renderPreview:function(){this.isPreview=!0,this._showCart()}}}(jQuery);