function initialize_new_song(){
	new_song_params = {
		name:{"conf":$("#new_song_name")},
		album:{"conf":$("#new_song_album")},
		mp3:{"conf":$("#new_song_mp3")},
		itunes:{"conf":$("#new_song_itunes")},
		about:{"conf":$("#new_song_about")},
		lyrics:{"conf":$("#new_song_lyrics")}
	}
	new_song = {};
	
	clear_new_song_form();
	create_album_select($("#new_song_album"));
	try{
		update_new_song_album();
	}catch(exception){}
	
	$("#save_new_song").click(function(){
		for(var param in new_song_params){
			new_song[param] = $(new_song_params[param].conf).val();
		}
		if(new_song["itunes"] != "") 
			new_song["itunes"] = extract_itunes_url(new_song["itunes"]);
			
		new_song["owner"] = band_data["_id"];
		new_song["id"] = api.generate_random_id();
		
		if(typeof band_data.songs == "undefined") band_data.songs = [new_song];
		else band_data.songs.push(new_song);
		
		new_song = {};
		//commit_album_changes();
		api.update_band_data(band_data["_id"],function(){clear_new_song_form();update_songs();update_new_song_album();});
	});
}

function clear_new_song_form(){
	for(param in new_song_params){
		$(new_song_params[param].conf).val("");
	}
}

function update_new_song_album(){
	$("#new_song_album").val(album.id);
}

