(function($){
	function injector(t, splitter, after) {
		var a = t.text().split(splitter), inject = '';
		if (a.length) {
			$(a).each(function(i, item) {
				inject += '<div class="randomLetter">'+item+'</div>';
			});	
			t.empty().append(inject);
		}
	}	
	var methods = {
		init : function() {
			return this.each(function() {
				injector($(this), '');
			});
		}
	};
	$.fn.lettering = function( method ) {
		// Method calling logic
		if ( method && methods[method] ) {
			return methods[ method ].apply( this, [].slice.call( arguments, 1 ));
		} else if ( method === 'letters' || ! method ) {
			return methods.init.apply( this, [].slice.call( arguments, 0 ) ); // always pass an array
		}
	};
})(jQuery);
