<script src='//cdnjs.cloudflare.com/ajax/libs/buzz/1.1.0/buzz.min.js'></script>
<script>
buzz.defaults.formats = [ 'mp3' ];
buzz.defaults.preload = 'metadata';
var SleighRide = new buzz.sound("https://s3-us-west-2.amazonaws.com/s.cdpn.io/191814/9562523_silvanmusic_christmas-time", {
formats: [ "mp3" ],
preload: true,
autoplay: false,
volume: 100,
loop: true
});
var hohoho = new buzz.sound("https://s3-us-west-2.amazonaws.com/s.cdpn.io/191814/hohoho", {
formats: [ "mp3" ],
preload: true,
autoplay: false,
volume: 100,
loop: false
});
var SantaLaughing = new buzz.sound("https://s3-us-west-2.amazonaws.com/s.cdpn.io/191814/SantaLaughing", {
formats: [ "mp3" ],
preload: true,
autoplay: false,
volume: 100,
loop: false
});
var MerryChristmas = new buzz.sound("https://s3-us-west-2.amazonaws.com/s.cdpn.io/191814/SantaMerryChristmas", {
formats: [ "mp3" ],
preload: true,
autoplay: false,
volume: 100,
loop: false
});
var Jingle2 = new buzz.sound("https://s3-us-west-2.amazonaws.com/s.cdpn.io/191814/Jinglebells2", {
formats: [ "mp3" ],
preload: true,
autoplay: false,
volume: 100,
loop: false
});
/***************************
Santa Magic Sound Effects
****************************/
SleighRide.play();Jingle2.play();hohoho.play();
setTimeout(function () {
Jingle2.play();MerryChristmas.play();}, 8000
);
setTimeout(function () {
SantaLaughing.play();}, 20000
);
setTimeout(function () {
Jingle2.play();SantaLaughing.play();}, 35000
);
setTimeout(function () {
hohoho.play();}, 50000
);
setTimeout(function () {
Jingle2.play();MerryChristmas.play();}, 80000
);
setTimeout(function () {
SantaLaughing.play();}, 100000
);
$('.santa').hover(function() {
hohoho.play();Jingle2.play();
}, function() {
hohoho.stop();Jingle2.stop();
});
$('.santa').click(function() {
MerryChristmas.play();
hohoho.stop();Jingle2.stop();
});
/***************************
Grouping the sounds so I can toggle them off and on all at once
****************************/
var soundEffects = new buzz.group([
hohoho,
SleighRide,
Jingle2,
MerryChristmas,
SantaLaughing
]);
</script>