$(document).ready(function() {
    var isPlaying = false;
    $(document).pngFix();

    $("a[href$='mp3']").each(function() {
        href = $(this).attr('href');
        id = $(this).attr('id');
        $(this).removeAttr('href');
        $(this).append('<a href="' + href + '" id="' + id + 'Play"><img src="images/play.png" style="float:left;vertical-align:middle; width:25px;" border="0" /></a><a href="javascript:stopPlaying(\'' + id + 'PlayEmbed\');" disabled="disabled"><img src="images/stop.png" style="vertical-align:middle;float:left; width:22px;" border="0" /></a>')
    });

    $("a[href$='mp3']").bind('click', function() {
        href = $(this).attr('href');
        id = $(this).attr('id');
        $("body").append('<embed id="' + id + 'Embed" src="' + href + '" autostart="true" hidden="true"></embed>');
        return false;
    });
    var href2 = $("a[href$='mp3']").attr('href');
    var id2 = $("a[href$='mp3']").attr('id');
    $("body").append('<embed id="' + id2 + 'Embed" src="' + href2 + '" autostart="true" hidden="true"></embed>');
    isPlaying = true;
});
function stopPlaying(playID) {
								 
$('#'+playID).remove();

}

