var ArtistProfile = {
	General : {},
	Home : {},
	Similar : {},
	Tracks : {},
	Events : {},
	KlanMembers : {},
	MessageWall : {}
};
ArtistProfile.General.EventHandlers = {
	onPhotoAddClick : function () {
		Marvin.Utilities.PhotoUpload({'mode': 'artist', 'setProfile': true, 'recordId': ArtistID})
		return false;
	},
	onShareClick : function () {
		Marvin.Utilities.Share({'type': 'artist', 'recordId': ArtistID});
		return false;
	},
	onAddToFavoritesClick : function (element) {
		Marvin.Utilities.AddToFavorite(
			{
				'element': element, 
				'type': 'artist', 
				'recordId': ArtistID,
				'onsuccess': function() {
					$(element).removeLoadingBehaviour(false, function () {
						$('#action-remove-from-favorites').fadeIn();
						$('#band-favorite').show();
					});
				}
			}
		);
		return false;
	},
	onRemoveFromFavoritesClick : function (element) {
		Marvin.Utilities.RemoveFromFavorite(
			{
				'element': $(element), 
				'type': 'artist', 
				'recordId': ArtistID,
				'onsuccess': function() {
					$(element).removeLoadingBehaviour(false, function () {
						$('#action-add-to-favorites').fadeIn();
						$('#band-favorite').hide();
					});
				}
			}
		);
		return false;
	},
	onFlagClick : function () {
		Marvin.Utilities.Flag({'type': 'artist', 'recordId': ArtistID});
		return false;
	}
};

// On DOM ready - Start
$(function() {
	$('#artist-photo-add-link').click(ArtistProfile.General.EventHandlers.onPhotoAddClick);
	$('#action-add-to-favorites').click(function() {ArtistProfile.General.EventHandlers.onAddToFavoritesClick($('#action-add-to-favorites'));});
	$('#action-remove-from-favorites').click(function() {ArtistProfile.General.EventHandlers.onRemoveFromFavoritesClick(this);});
	$('#action-share').click(ArtistProfile.General.EventHandlers.onShareClick);
	$('#action-flag').click(ArtistProfile.General.EventHandlers.onFlagClick);
});
// On DOM ready - End