Intellij live templates
Template text:
<script type="text/javascript"> $(document).ready(function () { $SELECTION$ }); </script>
Abbreviation: ready