(function(a,b){a.fn.macularightpanel=function(h){var d=a(this),c=a.extend({width:180},h||{});var f=function(){d.find(".side-r-title").html(c.title||"");d.find(".side-r-close").unbind("click").click(function(){e()});c.ajaxOptions={beforeSend:function(){d.addClass("loading")},complete:function(){d.removeClass("loading")}};g();d.updateContents(c.url,c,function(){if(c.onLoad){c.onLoad()}})},g=function(){if(c.width){d.width(c.width)}d.removeClass("hide").showme();if(c.onShow){c.onShow()}a(window).trigger("resize")},e=function(){d.addClass("hide");if(c.onHide){c.onHide()}a(window).trigger("resize")};d.bind({hiderightpanel:e,showrightpanel:g});f()}})(jQuery);