var mysongs = 
[
    {
        "url": "http://rinamushonga.com/wp-content/themes/twentyeleven/mp3/01 3821.mp3", // required
        "title": "3821",
    },
    {
        "url": "http://rinamushonga.com/wp-content/themes/twentyeleven/mp3/02 All My Ships.mp3", // required
        "title": "All My Ships",
    },
    {
        "url": "http://rinamushonga.com/wp-content/themes/twentyeleven/mp3/03 The Bitter End.mp3", // required
        "title": "The Bitter End",
    },
    {
        "url": "http://rinamushonga.com/wp-content/themes/twentyeleven/mp3/04 The Proud.mp3", // required
        "title": "The Proud",
    },
    {
        "url": "http://rinamushonga.com/wp-content/themes/twentyeleven/mp3/05 Washed Up.mp3", // required
        "title": "Washed Up",
    }
];


var swaggplayerapi;


$(document).ready(function(){
// without LAB.js
    $('#swagg-player').SwaggPlayer({
        data: mysongs,
        buttonsDir: 'img/',
        useArt: false,
        playList: false,
        whilePlaying: function(){
			var currPosition = swaggplayerapi.currentSong.time().getCurrTimeAsString();
			$('#currPosition').html(currPosition);
			var totalDuration = swaggplayerapi.currentSong.time().getTotalTimeAsString();
			$('#totalDuration').html(totalDuration);
        },
        onSetupComplete	: function(){
			swaggplayerapi = $('#swagg-player-data').data('api');

        },
        onPlay: function(){
			var title = swaggplayerapi.currentSong.data().getTitle();
			$('#songTitle').html(title);
			Cufon.replace(".cufon#songTitle", {hover: true});
            $('#play_button').addClass('pause');
        },
        onResume: function(){
            $('#play_button').addClass('pause');
        },
        onPause: function(){
			Cufon.replace(".cufon p", {hover: true});
            $('#play_button').removeClass('pause');	
        },	
    });
});	
	

