<!DOCTYPE HTML>
<HTML>
<HEAD>
<title>Котик</title>
<meta charset="utf-8"/>
<style>
body {
min-height: 100%;
height: auto;
position: relative;
font: 14px/18px Arial,sans-serif;
color: #353535;
background: #F3F3F3 none repeat scroll 0% 0%;
width: 100%;
min-width: 988px;
}
#myblock {
position: fixed;
display: inline-block;
width: 127px;
}
#myblock a {
text-decoration: none;
display: block;
width: 127px;
height: 239px;
overflow:hidden;
}
.bg {
position: absolute;
display: inline-block;
height: 239px;
width: 127px;
background: url("http://newgame-online.net/templates/newgame/img/vote_cat.png") no-repeat transparent;
}
.bg .layer1 {
background-position: 0 0;
}
.bg.layer1:hover {
background-position: -127px 0;
}
#myaudio {
display: none;
}
</style>
<script src="http://jplayer.org/latest/dist/jplayer/jquery.jplayer.min.js"></script>
<script>
var myaudio = $("#myaudio")[0];$("#myblock a").mouseenter(function(){myaudio.play();});
</script>
</HEAD>
<BODY>
<div id="myblock">
<a href="index.html" target="_blank">
<div class="bg layer1"></div>
</a>
<audio id="myaudio" preload="auto">
<source src="http://newgame-online.net/templates/newgame/js/cat_sound.mp3" type="audio/mpeg"/>
<source src="http://newgame-online.net/templates/newgame/js/cat_sound.ogg"/>
</audio>
</div>
</BODY>
</HTML>
var myaudio = $("#myaudio")[0];$("#myblock a").mouseenter(function(){myaudio.play();});
искомых элементов еще нет на странице, нужно так:$(function() {
var myaudio = $("#myaudio")[0];
$("#myblock a").mouseenter(function(){myaudio.play();});
});