$(document).ready(function(){
	$('#nav li a').mouseover(function(){
		//soundManager.play('aSound');
		
		var sound = soundManager.getSoundById('aSound'); // predefined/preloaded sound
		//sound.setPosition(700); // 500 msec into sound
		sound.play();

		
		//mySound.play();
		//soundManager.play('mySound0','custom/pages/_mp3/click-high.mp3');
		//var aSoundObject = soundManager.createSound({
		// id:'mySound2',
		// url:'custom/pages/_mp3/click-high.mp3'
		//});
		//aSoundObject.play();
	});
});

soundManager.url = 'custom/pages/csoundflash/'; // directory where SM2 .SWFs live

// Note that SoundManager will determine and append the appropriate .SWF file to the URL,
// eg. /path/to/sm2-flash-movies/soundmanager2.swf automatically.

// Beta-ish HTML5 audio support (force-enabled for iPad), flash-free sound for Safari + Chrome. Enable if you want to try it!
soundManager.useHTML5Audio = true;

soundManager.defaultOptions.volume = 33; // set global default volume for all sound objects

// do this to skip flash block handling for now. See the flashblock demo when you want to start getting fancy.
soundManager.useFlashBlock = false;

// disable debug mode after development/testing..
soundManager.debugMode = false;

// Option 1: Simple onload() + createSound() method

/*
soundManager.onload = function() {
  // SM2 has loaded - now you can create and play sounds!
  soundManager.createSound('helloWorld','custom/pages/_mp3/click-high.mp3');
  soundManager.play('helloWorld');
};
*/
// Option 2 (better): More flexible onload() + createSound() method
/*
soundManager.onload = function() {
  var mySound = soundManager.createSound({
    id: 'aSound',
    url: 'custom/pages/_mp3/click-high.mp3'
    // onload: [ event handler function object ],
    // other options here..
  });
  mySound.play();
}
*/

// Option 3 (best): onready() + createSound() methods, handle load/failure together:

soundManager.onready(function() {
  // check if SM2 successfully loaded..
  if (soundManager.supported()) {
    // SM2 has loaded - now you can create and play sounds!
    var mySound = soundManager.createSound({
      id: 'aSound',
	  volume: 30,
      url: 'custom/pages/_mp3/mouseover.mp3'
      // onload: [ event handler function object ],
      // other options here..
    });
	mySound.load(); // load the sound ahead of time
    //mySound.play();
  } else {
    // (Optional) Hrmm, SM2 could not start. Show an error, etc.?
  }
});
