(function($){$.fn.buckbin=function(options){};$.fn.buckbin.dialog=function(options,hide){if(typeof myDialog=='undefined'){myDialog=$('<div>'+$.fn.buckbin.loading()+'</div>').dialog({autoOpen:false,title:'',resizable:true});};if(hide){myDialog.dialog('close');return;}else{myDialog.dialog('open');};if(typeof options.html!='undefined'){myDialog.html(options.html);options.html=this.undefined;}else{myDialog.html('<div>'+$.fn.buckbin.loading()+'</div>');};if(typeof options.button=='undefined'){myDialog.dialog('option','buttons',{});}else{myDialog.dialog('option','buttons',{"Ok":function(){$(this).dialog("close");}});};if(typeof options.title!='undefined'){myDialog.dialog('option','title',options.title);options.title=this.undefined;};if(typeof options.close!='undefined'){myDialog.unbind('dialogclose');myDialog.bind('dialogclose',options.close);options.close=this.undefined;}jQuery.each(options,function(i,val){if(typeof val!='undefined')myDialog.dialog('option',i,val);});};$.fn.buckbin.addCss=function(url){var css=document.createElement('link');css.setAttribute('type','text/css');css.setAttribute('rel','stylesheet');css.setAttribute('href',''+url);$('head').get(0).appendChild(css);};$.fn.buckbin.loading=function(){return '<div class="center"><img src="http://dealscorner.com/img/ajax-loader.gif" /> Loading...</div>';};$.fn.buckbin.showMessage=function(title,str,autoHide){if(autoHide){$.fn.buckbin.dialog({"title":title,"html":str,"width":200,"height":100},false);setTimeout(function(){$.fn.buckbin.dialog({},true);},500);}else{$.fn.buckbin.dialog({"title":title,"html":str},false);}};$.fn.buckbin.tooltip=function(obj,str,autoHide){var p=obj.position();$('#tool_tip').text(str);$('#tool_tip').css({left:p.left+obj.width()+30,top:p.top,display:"none"}).show();if(autoHide){setTimeout(function(){$('#tool_tip').hide();$('#tool_tip').text('');},900);}}})(jQuery);
