!function(s,e,t,i){"use strict";var n="WordpressUlikeNotifications",a={messageType:"success",messageText:"Hello World!",messageElement:"wpulike-message",notifContainer:"wpulike-notification"};function l(e,t){this.element=e,this.$element=s(e),this.settings=s.extend({},a,t),this._defaults=a,this._name=n,this.init()}s.extend(l.prototype,{init:function(){this._message(),this._container(),this._append(),this._remove()},_message:function(){this.$messageElement=s("
").addClass(this.settings.messageElement+" wpulike-"+this.settings.messageType).text(this.settings.messageText)},_container:function(){s("."+this.settings.notifContainer).length||this.$element.append(s("").addClass(this.settings.notifContainer)),this.$notifContainer=this.$element.find("."+this.settings.notifContainer)},_append:function(){this.$notifContainer.append(this.$messageElement).trigger("WordpressUlikeNotificationAppend")},_remove:function(){var e=this;this.$messageElement.click(function(){s(this).fadeOut(300,function(){s(this).remove(),s("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")}),setTimeout(function(){e.$messageElement.fadeOut(300,function(){s(this).remove(),s("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")},8e3)}}),s.fn[n]=function(e){return this.each(function(){new l(this,e)})}}(jQuery,window,document),function(n,e,s,t){"use strict";var a="WordpressUlike",i=(n(e),n(s)),l={ID:0,nonce:0,type:"",likeStatus:0,counterSelector:".count-box",generalSelector:".wp_ulike_general_class",buttonSelector:".wp_ulike_btn",likersSelector:".wp_ulike_likers_wrapper"},r={"ulike-id":"ID","ulike-nonce":"nonce","ulike-type":"type","ulike-status":"likeStatus"};function o(e,t){for(var s in this.element=e,this.$element=n(e),this.settings=n.extend({},l,t),this._defaults=l,this._name=a,this._refresh=!1,this.buttonElement=this.$element.find(this.settings.buttonSelector),this.generalElement=this.$element.find(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector),r){var i=this.buttonElement.data(s);void 0!==i&&(this.settings[r[s]]=i)}this.init()}n.extend(o.prototype,{init:function(){this.buttonElement.click(this._button.bind(this)),this.generalElement.hover(this._likers.bind(this))},_button:function(){n.ajax({type:"POST",cache:!1,dataType:"json",url:wp_ulike_params.ajax_url,data:{action:"wp_ulike_process",id:this.settings.ID,nonce:this.settings.nonce,status:this.settings.likeStatus,type:this.settings.type},beforeSend:function(){i.trigger("WordpressUlikeLoading",this.element),this.generalElement.addClass("wp_ulike_is_loading")}.bind(this),success:function(e){this.generalElement.removeClass("wp_ulike_is_loading"),e.success?this._update(e):this._notif("error",e.data),i.trigger("WordpressUlikeUpdated",this.element)}.bind(this)})},_likers:function(){this.likersElement=this.$element.find(this.settings.likersSelector),this.likersElement.length&&!this._refresh||n.ajax({type:"POST",cache:!1,dataType:"json",url:wp_ulike_params.ajax_url,data:{action:"wp_ulike_get_likers",id:this.settings.ID,nonce:this.settings.nonce,type:this.settings.type,refresh:this._refresh?1:0},beforeSend:function(){this.generalElement.addClass("wp_ulike_is_getting_likers_list")}.bind(this),success:function(e){this.likersElement.length||(this.likersElement=n("