This JavaScript will change the link to a SharePoint logo on a page. The default link goes to the site home page, this changes it to whatever.
<script>
var topPart = document.getElementById("searchIcon");
var topAnchor = topPart.getElementsByTagName("a");
var hLink = "http://scushp01/Pages/Home.aspx"
topAnchor[0].setAttribute("href",hLink);
</script>