/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
jQuery(document).ready(function(){
  
  /*Por cada reproductor de audio que haya, se carga el contenido y se setean sus propiedades*/
    
  jQuery("div[id$='repa']").each(function(index) {
    var elDiv = jQuery(this);
    var Nro   = this.id.substr(14,1);
    
    elDiv.jPlayer({   
    ready: function () {
      jQuery(this).jPlayer("setMedia", {
        mp3: jQuery(("#" + jQuery(this).attr("id")) + "_src").text()               
      });
    },
    play: function() { // To avoid both jPlayers playing together.
            jQuery(this).jPlayer("pauseOthers");
    },
    swfPath: "/js",
    supplied: "mp3",
    cssSelectorAncestor: '#jp_container_' + Nro,
    wmode: "window"
    })
    
  });
  
  
/*
  $("#jquery_jplayer_3").jPlayer({
    ready: function () {
      $(this).jPlayer("setMedia", {
        m4v: "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer_480x270_h264aac.m4v",
        ogv: "http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer_480x270.ogv",
        poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"                   
      });
    },
    play: function() { // To avoid both jPlayers playing together.
            $(this).jPlayer("pauseOthers");
    },

    swfPath: "/js",
    supplied: "m4v, ogv",
    wmode: "window",
    cssSelectorAncestor: '#jp_container_3'
  });*/
});


