(function(){JUI.Class("Taskbar",{init:function(){this.wins=[]},add:function(a){this.wins.push(a);this.calcPosition()},del:function(a){this.remove(a);this.calcPosition()},calcPosition:function(){var d=0;var f=$(window).height();for(var c=0,b=this.wins.length;c<b;c++){var a=this.wins[c];if(a){var e=this.buildTitleSize(a);a.animateMove(d,f-e.height);d+=e.width}}},indexOf:function(b){for(var c=0,a=this.wins.length;c<a;c++){if(this.wins[c]==b){return c}}return -1},remove:function(a){var b=this.indexOf(a);if(b>-1){this.wins.splice(b,1)}},buildTitleSize:function(d){var h="pui-dialog-titlebar";var c=d.getWin().find(".pui-dialog-titlebar").eq(0);var e=c.find(".pui-dialog-title").innerWidth();var i=c.innerHeight();var f=0;var a=40;var b=c.find("a");b.each(function(){f+=$(this).innerWidth()});var g=e+a+f;return{width:g,height:i}}})})();