jQuery(document).ready(function(d){var l=2500,t=3800,a=t-3e3,r=50,o=150,h=500,c=h+800,p=600,e=1500,s=(d(".dnxt-headline.letters").find("b").each(function(){var s=d(this),e=s.text().split(""),n=s.hasClass("is-visible");for(i in e)0<s.parents(".rotate-2").length&&(e[i]="<em>"+e[i]+"</em>"),e[i]=n?'<i class="in">'+e[i]+"</i>":"<i>"+e[i]+"</i>";var t=e.join("");s.html(t).css("opacity",1)}),d(".dnxt-headline")),u=l;function f(s){var i,e,n=w(s);s.parents(".dnxt-headline").hasClass("type")?((i=s.parent(".dnxt-words-wrapper")).addClass("selected").removeClass("waiting"),setTimeout(function(){i.removeClass("selected"),s.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out")},h),setTimeout(function(){C(n,o)},c)):s.parents(".dnxt-headline").hasClass("letters")?(e=s.children("i").length>=n.children("i").length,function s(i,e,n,t){i.removeClass("in").addClass("out");i.is(":last-child")?n&&setTimeout(function(){f(w(e))},l):setTimeout(function(){s(i.next(),e,n,t)},t);{var a;i.is(":last-child")&&d("html").hasClass("no-csstransitions")&&(a=w(e),x(e,a))}}(s.find("i").eq(0),s,e,r),m(n.find("i").eq(0),n,e,r)):s.parents(".dnxt-headline").hasClass("clip")?s.parents(".dnxt-words-wrapper").animate({width:"2px"},p,function(){x(s,n),C(n)}):s.parents(".dnxt-headline").hasClass("loading-bar")?(s.parents(".dnxt-words-wrapper").removeClass("is-loading"),x(s,n),setTimeout(function(){f(n)},t),setTimeout(function(){s.parents(".dnxt-words-wrapper").addClass("is-loading")},a)):(x(s,n),setTimeout(function(){f(n)},l))}function C(s,i){s.parents(".dnxt-headline").hasClass("type")?(m(s.find("i").eq(0),s,!1,i),s.addClass("is-visible").removeClass("is-hidden")):s.parents(".dnxt-headline").hasClass("clip")&&s.parents(".dnxt-words-wrapper").animate({width:s.width()+10},p,function(){setTimeout(function(){f(s)},e)})}function m(s,i,e,n){s.addClass("in").removeClass("out"),s.is(":last-child")?(i.parents(".dnxt-headline").hasClass("type")&&setTimeout(function(){i.parents(".dnxt-words-wrapper").addClass("waiting")},200),e||setTimeout(function(){f(i)},l)):setTimeout(function(){m(s.next(),i,e,n)},n)}function w(s){return s.is(":last-child")?s.parent().children().eq(0):s.next()}function x(s,i){s.removeClass("is-visible").addClass("is-hidden"),i.removeClass("is-hidden").addClass("is-visible")}s.each(function(){var s,i,e,n=d(this);n.hasClass("loading-bar")?(u=t,setTimeout(function(){n.find(".dnxt-words-wrapper").addClass("is-loading")},a)):n.hasClass("clip")?(s=(i=n.find(".dnxt-words-wrapper")).width()+10,i.css("width",s)):n.hasClass("type")||(i=n.find(".dnxt-words-wrapper b"),e=0,i.each(function(){var s=d(this).width();e<s&&(e=s)}),n.find(".dnxt-words-wrapper").css("width",e)),setTimeout(function(){f(n.find(".is-visible").eq(0))},u)})});