//>>built
define("demos/flashCards/src/Teacher",["dojo","dijit","dojox","dojo/require!dijit/_Widget,dijit/_Templated,dojox/timing/Sequence"],function(_1,_2,_3){_1.provide("demos.flashCards.src.Teacher");_1.require("dijit._Widget");_1.require("dijit._Templated");_1.require("dojox.timing.Sequence");_1.declare("demo._TeacherBehavior",null,{constructor:function(){this._batEyes=[{func:[_1.hitch(this,"angry",true),this],pauseAfter:200},{func:[_1.hitch(this,"blink",45),this],repeat:3,pauseAfter:100},{func:[_1.hitch(this,"angry",false),this],pauseBefore:200}];},bat:function(){this.actions.go(this._batEyes);}});_1.declare("demo.Teacher",[_2._Widget,_2._Templated,demo._TeacherBehavior],{templateString:"<div class=\"teacher\">\n\t<div class=\"teacherInner\" dojoAttachPoint=\"innerNode\">\n\t\t<div class=\"teacherAngry\"></div>\n\t\t<div class=\"teacherBlink\"></div>\n\t\t<div dojoAttachPoint=\"teacherBubbleOuter\" class=\"teacherBubble teacherSilent\">\n\t\t\t<div dojoAttachPoint=\"teacherBubble\" class=\"teacherBubbleContent\"></div>\n\t\t</div>\n\t</div>\n</div>",constructor:function(_4,_5){_1.mixin(this,_4);this.actions=new _3.timing.Sequence({});},frown:function(on){var n=this.innerNode;_1[(on?"addClass":"removeClass")](n,"teacherBeingAngry");},blink:function(_6,_7){if(this._blinking&&!_7){clearTimeout(this._blinking);}_1.addClass(this.innerNode,"teacherBlinking");this._blinking=setTimeout(_1.hitch(this,function(){_1.removeClass(this.innerNode,"teacherBlinking");}),_6||275);},speak:function(_8,_9){if(!_9){_9=5000;}this.teacherBubble.innerHTML=_8;_1.addClass(this.teacherBubbleOuter,"teacherSpeaking");if(this._timeout){clearTimeout(this._timeout);}this._timeout=setTimeout(_1.hitch(this,function(){_1.removeClass(this.teacherBubbleOuter,"teacherSpeaking");}),_9);}});});