how can i creat class using Jquery

how can i creat class using Jquery

Im new at jquery script im trying to create a simple modal popup window this is my script can somebody help me?
  1. var box = function(h, w, content) {
  2.       this.h = h;
  3.       this.w = w;
  4.       this.content = content;
  5. }

  6. $.extend(box.prototype, {
  7.       showmybox: function() {
  8.   if(popupStatus == 0){
  9. $("#win").css({
  10. display: 'block',
  11. width: w,
  12. height: h,
  13. left: ($(window).width()/2 - w /2),
  14. top: ($(window).height()/2 - h /2) 
  15. });
  16. $('#bb').addClass('modalOverlay');
  17. $("#win").append(content).show(200);
  18. popupStatus = 1;
  19.   }
  20.       },
  21.  
  22.       closemybox: function() {
  23.             if(popupStatus == 1){
  24. if(e.target.idName !== "win")
  25. {
  26.  $("#win").hide(100);
  27.  $('#bb').removeClass("modalOverlay");
  28.  popupStatus = 0;
  29.  return false;
  30. }
  31. }
  32.       }
  33. });
now how can i call it