  function clear_output(parent) {
    $(parent).children(".out").children(".out-inner").html('');
  }

  function print(content) {
    $("#results").children(".out").children(".out-inner").append(content+"<br>").each(function() { this.scrollTop = this.scrollHeight });
  }

  function log(content) {
    $("#log").children(".out").children(".out-inner").append(content+"<br>").each(function() { this.scrollTop = this.scrollHeight });
  }

  $(function() {
   // $(".window").draggable({ handle: '.draghandle'});
    $(".out").resizable({ handles:"s", transparent:true });
    $(".main-content").children(".script-copy").append($("#main-script").text().replace(/\/\/\([^]*?\/\/\)\n/g, "").replace(/</g,"&lt;"));
  });


