Seem like you include your script before loading jQuery
library. Try to reverse the order of them, so change from:
<script type="text/javascript" src="script.js"></script>
<script src="jquery1.js"></script>
to:
<script src="jquery1.js"></script>
<script type="text/javascript" src="script.js"></script>