I think you forgot the javascript
Code:
<script>
$(function() {
$("#related-btn").hover(function() {
if(!$(this).data('pinned'))
$("#show-hide").toggle("slow");
});
$("#related-btn").click(function() {
$(this).data('pinned', !$(this).data('pinned'));
});
});
</script>