!function(a,b,c,d){function e(b,c){this.element=b,this.options=a.extend({},g,c),this._defaults=g,this._name=f,this.init()}var f="addDropCap",g={wrapper:".entry-content",minwords:50,skipSelectors:{tags:["IMG","IFRAME","H1","H2","H3","H4","H5","H6","BLOCKQUOTE"],classes:[],ids:[]}};e.prototype.init=function(){var a=this._get_dropcap_el();a&&this.options.minwords<=this._countWords(a.text())&&this._may_be_add_dc(a)},e.prototype._get_dropcap_el=function(b){var c=b||a(this.options.wrapper).find(this.element).first(),d=this._get_real_text(c.text());return!this._is_authorized(c)&&c.next().length?this._get_dropcap_el(c.next()):this._is_authorized(c)&&d?c:c.next().length?this._get_dropcap_el(c.next()):void 0},e.prototype._get_real_text=function(a){return a.replace(/ /g,"").replace(/ /g,""),this._removeSpecChars(a)},e.prototype._is_authorized=function(a){if("function"!=typeof _)return!0;if(a[0]&&a[0].tagName&&this._is_tag_allowed(a)&&this._are_children_tag_allowed(a)&&this._is_selector_allowed(a,["ids","classes"]))return!0},e.prototype._may_be_add_dc=function(a){var b=(a.text(),""),c=a.text().replace(/ /g," ").split(" ");if(_.isArray(c)&&(c.length&&(b=c[0]),b=this._removeSpecChars(b),b.charAt(0))){var d=b.charAt(0),e=b.substr(1),f="",g="";d=['',d,""].join(""),f=[d,e].join(""),g=a.html().replace(b,f),a.html(g)}},e.prototype._is_selector_allowed=function(a,b){if("object"!=typeof this.options.skipSelectors)return!0;var c=this;return _filtered=b.filter(function(b){return!1===c._is_sel_type_allowed(a,b)}),0===_filtered.length},e.prototype._is_sel_type_allowed=function(b,c){if(!this.options.skipSelectors[c]||!a.isArray(this.options.skipSelectors[c]))return!0;var d="ids"==c?"id":"class";if("object"!=typeof this.options.skipSelectors||!this.options.skipSelectors[c]||!a.isArray(this.options.skipSelectors[c]))return!0;var e=b.attr(d)?b.attr(d).split(" "):[],f=this.options.skipSelectors[c],g=e.filter(function(b){return-1!=a.inArray(b,f)}),h="ids"==c?"#":".",i=f.filter(function(a){return 0!==b.find(h+a).length});return 0===a.merge(g,i).length},e.prototype._is_tag_allowed=function(a){return"object"==typeof this.options.skipSelectors&&_.isArray(this.options.skipSelectors.tags)?-1==_.indexOf(_.map(this.options.skipSelectors.tags,function(a){return a.toUpperCase()}),a[0].tagName):!0},e.prototype._are_children_tag_allowed=function(a){if("object"!=typeof this.options.skipSelectors||!_.isArray(this.options.skipSelectors.tags))return!0;if(0===a.children().length)return!0;var b=(a.children().first()[0].tagName,this.options.skipSelectors.tags),c=b.filter(function(b){return 0!==a.find(b).length});return 0===c.length},e.prototype._countWords=function(a){return"string"!=typeof a?0:(a=a.replace(" "," "),a.split(" ").length)},e.prototype._removeSpecChars=function(a,b){return b=b||"","string"==typeof a?a.replace(/[^\w-\?!\u00bf-\u00ff]/g,b):""},e.prototype._stripHtmlTags=function(a){return a&&"string"==typeof a?a.replace(/(<([^>]+)>)/gi,""):!1},a.fn[f]=function(b){return this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))})}}(jQuery,window,document);