developing $.fn.Modal