5 $("#jplayer").jPlayer({
6 swfPath: "/static/jplayer/",
7 solution: "html,flash",
8 supplied: $(this).attr('data-supplied'),
12 var setMedia = function(elem) {
13 var li = $(elem).parent();
14 $('.jp-playlist-current').removeClass('jp-playlist-current');
15 $(li).addClass('jp-playlist-current');
18 $('.mp3', li).each(function() {media['mp3'] = $(this).attr('href')});
19 $('.ogg', li).each(function() {media['oga'] = $(this).attr('href')});
21 return player.jPlayer("setMedia", media);
23 setMedia($('.play').first()).jPlayer("play");
25 $('.play').click(function() {
26 setMedia(this).jPlayer("play");