(function($) {
  jQuery.ctSoft = {
    init : function(zEle) {
      $(zEle).attr("_ctSoft", "true")
    },

    isInit : function(zEle) {
      if ( String($(zEle).attr("_ctSoft")).toUpperCase() == "TRUE" ) return true;
      else return false;
    }
  };

  // function Override
  $.fn._htmlOverride   = jQuery.fn.html;
  $.fn.extend({
    html:function(zContent) {
      if (zContent)  $(this).find("*").removeAll();

      return $(this)._htmlOverride(zContent);
    },
    removeAll:function(c,d) {
      // 각 컴포넌트에서 잡은 메모리 해제
      if (($(this).attr("_ctSoft") == "true") && ($(this).attr("id"))) $.removeData($(this).attr("id"))

      $(this).remove(c,d);
    }
  });

})(jQuery);
