var DEBUG = function(){
  var DEBUG_MODE = true;
  
  function printError(msg){
    if(DEBUG_MODE){
      if($.browser.msie){
        window.alert(msg);
      }else{
        console.log(msg);
      }
    }
  };
  
  function enableDebug(){
    DEBUG_MODE = true;
  };
  
  function disableDebug(){
    DEBUG_MODE = false;
  };
  
  return {printError:printError, enableDebug:enableDebug, disableDebug:disableDebug};
}();