$((function(){var e=$("#input"),n=$("#outputType"),r=$("#preview"),a=$("#html"),t=$("#lexer"),l=($("#syntax"),!0),o=null;top.document.location.href.match(/\?blank=1$/)&&e.val(""),n.change((function(){$("#rightContainer .pane").hide(),o=$("#"+n.val()).show()})).change();var noticeChange=function(){l=!0};e.change(noticeChange).keyup(noticeChange).keypress(noticeChange).keydown(noticeChange);var getScrollSize=function(){var e=o[0];return e.scrollHeight-e.clientHeight},setScrollPercent=function(e){o.scrollTop(e*getScrollSize())},c=1,checkForChanges=function(){if(l){l=!1;for(var n=new Date,i=(m=getScrollSize())<=0?1:o.scrollTop()/m,p=e.val(),u=marked.lexer(p),v=[],h=0;h<u.length;h++){var g=[];for(var f in u[h])g.push(f+":"+('"'+(u[h][f]+"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\f/g,"\\f").replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0")+'"'));v.push("{"+g.join(", ")+"}")}var s=marked.parser(u);r.html(s),a.val(s),t.val(v.join("\n")),setScrollPercent(i);var $=new Date;(c=$-n)<50?c=50:c>500&&(c=1e3)}var m;window.setTimeout(checkForChanges,c)};checkForChanges(),setScrollPercent(0)}));