/**
 * @author		Frido Koch
 * @copyright	2011 Frido Koch
 * @package		net.vresh.bbcode.lyrics
 * @license		Commercial
 */
var Lyrics = Class.create({
	initialize: function() {},

	register: function(lyricsElement) {
		if(!showMusicLyrics)
			lyricsElement.down('.quoteBody').setStyle({display: 'none'});
		else
			lyricsElement.down('.quoteBody').setStyle({display: 'block'});
		lyricsElement.className = 'quoteBox lyrics jsLyrics';
		lyricsElement.down('h3').observe('click', this.toggle);
	},

	toggle: function(event) {
		lyricsElement = Event.element(event).up('.lyrics');
		contentElement = lyricsElement.down('.quoteBody');
		if (contentElement.visible()) {
			Effect.BlindUp(contentElement, { duration: 0.5 });
		}
		else {
			Effect.BlindDown(contentElement, { duration: 0.5 });
		}
	}
});

var lyrics = new Lyrics();

document.observe("dom:loaded", function() {
	$$('.lyrics').each(function(lyricsElement) {
			lyrics.register(lyricsElement);
	});
});

