jQuery(document).ready(function(e){var t=e("#progressbar"),n=e(".progress-label");t.progressbar({value:false,change:function(){var e=parseInt(t.progressbar("value"));if(e==90){r.currentLabel=1}else if(e%10==0){r.changeTextLabel()}var i=r.getTextLabel();n.text(i+" "+t.progressbar("value")+"%")},complete:function(){n.text("Complete!")}});if(nfProcessingAction!="none"){var r={labels:{0:"Lacing Our Tabis",1:"Cleaning The Dojo",2:"Doing Splits",3:"Buffing Bo Staff",4:"Intimidating Gaze",5:"Sparring",6:"Packing Smoke Bombs",7:"Polishing Shuriken",8:"Throwing Sais",9:"Calling Our Mom",10:"Practicing Katas",11:"Swinging Nunchucks",12:"Sharpening Swords",13:"Ironing Ninja Gi",14:"Eating Breakfast",15:"Cutting Stuff",16:"Doing Dishes",17:"Climbing Walls"},getTextLabel:function(){var e=this.labels[this.currentLabel];return e},changeTextLabel:function(){var e=Object.keys(this.labels).length-1;var t=Math.floor(Math.random()*(e-2+1))+2;this.currentLabel=t},currentLabel:0};var i={setup:function(){this.interval=Math.floor(100/parseInt(this.totalSteps))},process:function(){e.post(ajaxurl,{step:this.step,total_steps:i.totalSteps,args:this.args,action:nfProcessingAction},function(n){n=e.parseJSON(n);i.step=n.step;i.totalSteps=n.total_steps;i.args=n.args;if(i.runSetup==1){i.setup();i.runSetup=0}if(!n.complete){i.progress();i.process()}else{t.progressbar("value",100);if(typeof n.redirect!="undefined"&&n.redirect!=""){document.location.href=n.redirect}}})},progress:function(){var e=t.progressbar("value")||0;t.progressbar("value",e+this.interval)},step:"loading",totalSteps:0,runSetup:1,interval:0,args:nfProcessingArgs};i.process()}})