The following jQuery script creates compatibility issues with other java/mootools script on my site - is there anything I can do to make it more compatible?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
</script>
Note - the script is designed to open external links in new windows.