artDialog.fn.shake=function(){var style=this.DOM.wrap[0].style,p=[4,8,4,0,-4,-8,-4,0],fx=function(){style.marginLeft=p.shift()+'px';if(p.length<=0){style.marginLeft=0;clearInterval(timerId);};};p=p.concat(p.concat(p));timerId=setInterval(fx,13);return this;};artDialog.notice=function(options){var opt=options||{},api,aConfig,hide,wrap,top,duration=800;var config={id:'Notice',left:'100%',top:'100%',fixed:true,drag:false,resize:false,follow:null,lock:false,init:function(here){api=this;aConfig=api.config;wrap=api.DOM.wrap;top=parseInt(wrap[0].style.top);hide=top+wrap[0].offsetHeight;wrap.css('top',hide+'px').animate({top:top+'px'},duration,function(){opt.init&&opt.init.call(api,here);});},close:function(here){wrap.animate({top:hide+'px'},duration,function(){opt.close&&opt.close.call(this,here);aConfig.close=$.noop;api.close();});return false;}};for(var i in opt){if(config[i]===undefined)config[i]=opt[i];};return artDialog(config);};artDialog.alert=function(content){return artDialog({id:'Alert',icon:'warning',fixed:true,lock:true,content:content,ok:true});};artDialog.confirm=function(content,yes,no){return artDialog({id:'Confirm',icon:'question',fixed:true,lock:true,opacity:.1,content:content,ok:function(here){return yes.call(this,here);},cancel:function(here){return no&&no.call(this,here);}});};artDialog.prompt=function(content,yes,value){value=value||'';var input;return artDialog({id:'Prompt',icon:'question',fixed:true,lock:true,opacity:.1,content:['<div style="margin-bottom:5px;font-size:12px">',content,'</div>','<div>','<input value="',value,'" style="width:18em;padding:6px 4px" />','</div>'].join(''),init:function(){input=this.DOM.content.find('input')[0];input.select();input.focus();},ok:function(here){return yes&&yes.call(this,input.value,here);},cancel:true});};artDialog.tips=function(content,time){return artDialog({id:'Tips',title:false,cancel:false,fixed:true,lock:false}).content('<div style="padding: 0 1em;">'+content+'</div>').time(time||1.5);};