/* jQuery Starter plugin v0.1.0 | https://github.com/agat/jquery.starter | (c) 2013 Aleksej Romanovskij | MIT */ (function(t){"use strict";var e=function(e,n){this.elem=e,this.$elem=t(e),this.options=n,this.metadata=this.$elem.data(),this._init()},n="starter";e.prototype={version:.1,defaults:{autoStart:!0,plugin:""},_init:function(){var e,o=this,i="arguments",a=t.extend(!0,{},o.metadata);"string"==typeof o.options?(o.config=t.extend(!0,{},o.defaults,o.metadata),e=o.options):(o.config=t.extend(!0,{},o.defaults,o.options,o.metadata),e=o.config[n]),e===undefined&&o._error("Nothing to start :("),i in o.config?a=o.config[i]:(delete a[n+"_here"],delete a[n],delete a[i],t.each(o.defaults,function(t){delete a[t]})),e&&e in t.fn?o.$elem[e](a):o._error('Please add jQuery plugin "'+e+'" js-file to document.')},_error:function(t){throw"console"in window&&window.console.error(t),Error(t)}},t.fn[n]=function(o){return this.each(function(){var i=t(this),a=n+"_here",r=i.data(a);r||i.data(a,new e(this,o))})},t.fn[n].Constructor=e,t.fn[n].defaults=e.prototype.defaults,t(function(){t.fn[n].defaults.autoStart&&t("[data-"+n+"]")[n]()})})(window.jQuery);