!function(a,b,c){"use strict";var d=function(a,b){var d=this;this.el=a,this.options={},Object.keys(e).forEach(function(a){d.options[a]=e[a]}),Object.keys(b).forEach(function(a){d.options[a]=b[a]}),this.isInput="input"===this.el.tagName.toLowerCase(),this.attr=this.options.attr,this.showCursor=!this.isInput&&this.options.showCursor,this.elContent=this.attr?this.el.getAttribute(this.attr):this.el.textContent,this.contentType=this.options.contentType,this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.fadeOut=this.options.fadeOut,this.fadeOutClass=this.options.fadeOutClass,this.fadeOutDelay=this.options.fadeOutDelay,c&&this.options.stringsElement instanceof c?this.stringsElement=this.options.stringsElement[0]:this.stringsElement=this.options.stringsElement,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=0,this.stop=!1,this.cursorChar=this.options.cursorChar,this.shuffle=this.options.shuffle,this.sequence=[],this.build()};d.prototype={constructor:d,init:function(){var a=this;a.timeout=setTimeout(function(){for(var b=0;b":";";a.substr(b+1).charAt(0)!==i&&(h+=a.substr(b).charAt(0),b++,!(b+1>a.length)););b++,h+=i}}d.timeout=setTimeout(function(){if(b===a.length){if(d.options.onStringTyped(d.arrayPos),d.arrayPos===d.strings.length-1&&(d.options.callback(),d.curLoop++,d.loop===!1||d.curLoop===d.loopCount))return;d.timeout=setTimeout(function(){d.backspace(a,b)},d.backDelay)}else{0===b&&d.options.preStringTyped(d.arrayPos);var c=a.substr(0,b+1);d.attr?d.el.setAttribute(d.attr,c):d.isInput?d.el.value=c:"html"===d.contentType?d.el.innerHTML=c:d.el.textContent=c,b++,d.typewrite(a,b)}},c)},c)}},backspace:function(a,b){var c=this;if(this.stop!==!0){if(this.fadeOut)return void this.initFadeOut();var d=Math.round(70*Math.random())+this.backSpeed;c.timeout=setTimeout(function(){if("html"===c.contentType&&">"===a.substr(b).charAt(0)){for(var d="";"<"!==a.substr(b-1).charAt(0)&&(d-=a.substr(b).charAt(0),b--,!(b<0)););b--,d+="<"}var e=a.substr(0,b);c.replaceText(e),b>c.stopNum?(b--,c.backspace(a,b)):b<=c.stopNum&&(c.arrayPos++,c.arrayPos===c.strings.length?(c.arrayPos=0,c.shuffle&&(c.sequence=c.shuffleArray(c.sequence)),c.init()):c.typewrite(c.strings[c.sequence[c.arrayPos]],b))},d)}},initFadeOut:function(){return self=this,this.el.className+=" "+this.fadeOutClass,this.cursor.className+=" "+this.fadeOutClass,setTimeout(function(){self.arrayPos++,self.replaceText(""),self.typewrite(self.strings[self.sequence[self.arrayPos]],0)},self.fadeOutDelay)},replaceText:function(a){this.attr?this.el.setAttribute(this.attr,a):this.isInput?this.el.value=a:"html"===this.contentType?this.el.innerHTML=a:this.el.textContent=a},shuffleArray:function(a){var b,c,d=a.length;if(d)for(;--d;)c=Math.floor(Math.random()*(d+1)),b=a[c],a[c]=a[d],a[d]=b;return a},reset:function(){var a=this;clearInterval(a.timeout);this.el.getAttribute("id");this.el.textContent="","undefined"!=typeof this.cursor&&"undefined"!=typeof this.cursor.parentNode&&this.cursor.parentNode.removeChild(this.cursor),this.strPos=0,this.arrayPos=0,this.curLoop=0,this.options.resetCallback()}},d["new"]=function(a,c){var e=Array.prototype.slice.apply(b.querySelectorAll(a));e.forEach(function(a){var b=a._typed,e="object"==typeof c&&c;b&&b.reset(),a._typed=b=new d(a,e),"string"==typeof c&&b[c]()})},c&&(c.fn.typed=function(a){return this.each(function(){var b=c(this),e=b.data("typed"),f="object"==typeof a&&a;e&&e.reset(),b.data("typed",e=new d(this,f)),"string"==typeof a&&e[a]()})}),a.Typed=d;var e={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,shuffle:!1,backDelay:500,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:!1,showCursor:!0,cursorChar:"|",attr:null,contentType:"html",callback:function(){},preStringTyped:function(){},onStringTyped:function(){},resetCallback:function(){}}}(window,document,window.jQuery);