// JavaScript Document
//
soundManager.url = 'sounds'; // directory where SM2 .SWFs live
soundManager.onload = function() {
	soundManager.waitForWindowLoad = true;
	// SM2 has loaded - now you can create and play sounds!
	soundManager.createSound({
							 
		id: 'city_sounds',
		url: 'sounds/city_soundtrack.mp3',
		autoLoad: true,
		onjustbeforefinish: function(){soundManager.play(this.sID)},
		onload: function(){
			//soundManager.setPosition(this.sID, 4500)
			this.duration
			var randomnumber=Math.floor(Math.random()*(this.duration/2))
			this.setPosition(randomnumber+1)
			soundManager.play(this.sID)
			
		},
		
	});
	soundManager.createSound('hands_off','sounds/hands_off_my_cash.mp3');
	soundManager.createSound('payday_loans','sounds/punch1.mp3');
	soundManager.createSound('check_cashing','sounds/grunt2.mp3');
	soundManager.createSound('avoid_fast_cash','sounds/grunt4.mp3');
	soundManager.createSound('think_about_banking','sounds/punch3.mp3');
	soundManager.createSound('cash_advances','sounds/punch2.mp3');
	soundManager.createSound('title_loans','sounds/crash2.mp3');
	//soundManager.play("city_sounds")
	
}