4 $("#jplayer").each(function() {
7 swfPath: "/static/jplayer/",
8 solution: "html,flash",
9 supplied: $self.attr('data-supplied'),
13 var setMedia = function(elem) {
14 var li = $(elem).parent();
15 $('.jp-playlist-current').removeClass('jp-playlist-current');
16 $(li).addClass('jp-playlist-current');
19 $('.mp3', li).each(function() {media['mp3'] = $(this).attr('href')});
20 $('.ogg', li).each(function() {media['oga'] = $(this).attr('href')});
22 return player.jPlayer("setMedia", media);
24 setMedia($('.play').first()).jPlayer("play");
26 $('.play').click(function() {
27 setMedia(this).jPlayer("play");