// A cross-browser javascript shim for html5 audio
(function(audiojs, audiojsInstance, container) {
// Use the path to the audio.js file to create relative paths to the swf and player graphics
// Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
var path = (function() {
var re = new RegExp('audio(\.min)?\.js.*'),
scripts = document.getElementsByTagName('script');
for (var i = 0, ii = scripts.length; i < ii; i++) {
var path = scripts[i].getAttribute('src');
if(re.test(path))
{
var f = path.split ( '/' );
f.pop ();
return f.join ( '/' ) + '/';
}
}
// when no script found, an empty string causes the least confusion.
return '';
})();
// ##The audiojs interface
// This is the global object which provides an interface for creating new `audiojs` instances.
// It also stores all of the construction helper methods and variables.
container[audiojs] = {
instanceCount: 0,
instances: {},
// The markup for the swf. It is injected into the page if there is not support for the `