	function hidecol(col_num) {
		jQuery( "table.lyrics .col" + col_num ).css({"width":"1px"});
		jQuery( "table.lyrics td.col" + col_num ).css({"display":"none"});
		jQuery( "table.lyrics th.col" + col_num ).attr({"rowspan": jQuery('tr').length});
		jQuery( "table.lyrics th.col" + col_num + " span" ).css({"display": "block"});
		}

	function showcol(col_num) {
		jQuery( "table.lyrics .col" + col_num ).css({"width":"auto"});
		jQuery( "table.lyrics td.col" + col_num ).css({"display":"table-cell"});
		jQuery( "table.lyrics th.col" + col_num ).attr({"rowspan": "1"});
		jQuery( "table.lyrics th.col" + col_num + " span" ).css({"display": "inline"});
		}

	jQuery(document).ready(function() {
		jQuery('table.lyrics td').each(function(idx) {
		
		var reg = new RegExp("<br>|<br />|<br/>", "i");
			var content = jQuery(this).html().split(reg);
			var content2 = "";
			jQuery.each(content, function(idx2, value2) {
				if(value2 != "") {
					content2 += "<p>" + jQuery.trim(value2) + "</p>";
					}
				});
			jQuery(this).html(content2);
			});
		jQuery('table.lyrics tr').each(function(idx) {
			jQuery(this).children('td, th').each(function(idx2) {
				jQuery(this).addClass("col" + (idx2 + 1));
				});
			});
		
		
		jQuery('table.lyrics th').each(function(idx) {
			var content = jQuery(this).text().split("");
			var content2 = "";
			jQuery.each(content, function(idx2, value2) {
				if(value2 != "") {
					content2 += "<span>" + value2  + "</span>";
					}
				});
			jQuery(this).html(content2);
			
			});
		

		hidecol(1);

		jQuery('table.lyrics th.col1').click(function(){ 
			if(parseInt(jQuery('table.lyrics th.col1').attr('rowSpan')) != "1") {
				showcol(1);
				showcol(2);
				hidecol(3);
				}
			else {
				hidecol(1);
				showcol(2);
				showcol(3);
				}
			});
		jQuery('table.lyrics th.col2').click(function(){ 
			if(parseInt(jQuery('table.lyrics th.col2').attr('rowSpan')) != "1") {
				hidecol(1);
				showcol(2);
				showcol(3);
				}
			else {
				showcol(1);
				hidecol(2);
				showcol(3);
				}
			});
		jQuery('table.lyrics th.col3').click(function(){ 
			if(parseInt(jQuery('table.lyrics th.col3').attr('rowSpan')) != "1") {
				hidecol(1);
				showcol(2);
				showcol(3);
				}
			else {
				showcol(1);
				showcol(2);
				hidecol(3);
				}
			});

		});
