var onProduct = "onProduct";var notOnProduct = "notOnProduct";$(document).ready(function(){					/*****************************************	Controls for an entire block of lyrics	*****************************************/	// Hover controls for block arrows		$("div.blockControl").hover(function(){		if ($(this).parent().hasClass('onProduct')){			$(this).parent().addClass('onProductHover');		} else {			$(this).parent().addClass('hover');		}	},function(){		$(this).parent().removeClass('hover');		if ($(this).parent().hasClass('onProduct')){			$(this).parent().removeClass('onProductHover');		}	});		// Click controls for block arrow	$("div.blockControl").unbind('click').bind('click', function(){		// If lyric block is on the product, remove it		if ($(this).parent().hasClass('onProduct')){			// Build clean (no extra whitespaces) paragraph to match and remove from editor window					removeTextFromProductText(getLyricBlock($(this).parent().children()), $(this).parent().attr("id"));			// Update class			$(this).parent().removeClass("onProduct").removeClass("onProductHover").addClass('hover');			// Remove this block id from array of products on text			spliceArray(designDetails[v].lyricBlocksOnLocation, $(this).parent().attr('id'));		} 		// If lyric block is not on the product, add it		else {			// Build clean (no extra whitespaces) paragraph for editor window, append it to value of productText editor window							var paragraphs = $(this).parent().children().children();			addTextToProductText(getLyricBlock(paragraphs), $(this).parent().attr("id"), $("#songTitle").attr("rel"));			// Update class			$(this).parent().addClass("onProduct").addClass('onProductHover');			designDetails[v].lyricBlocksOnLocation.push($(this).parent().attr("id")); // Add this block id to array of products on text		}		updatePreviewText();		$('p.returnToLyric').show();				return false; 	});		/***************************************	Controls for a single line of lyrics	***************************************/				// Click controls for title <span>	$("#songTitle").unbind('click').bind('click', function() {		// If lyric line is on the product, remove it		if ($(this).hasClass(onProduct)){			removeTextFromProductText($(this).text(), $(this).attr('id'));			$(this).removeClass("onProduct");			$(this).addClass("notOnProduct");			// Remove this block id from array of products on text			spliceArray(designDetails[v].lyricLinesOnLocation, $(this).attr('id'));		// If lyric line is not on the product, add it		} else {			addTextToProductText($(this).text(), $(this).attr('id'), $('#songTitle').attr('rel'));			$(this).removeClass("notOnProduct");			$(this).addClass("onProduct");			designDetails[v].lyricLinesOnLocation.push($(this).attr('id')); // Add this block id to array of products on text						}		updatePreviewText();		$('p.returnToLyric').show();				return false;	});		// Click controls for <span>	$(".blockContainer p span.line").unbind('click').bind('click', function(){		// If lyric line is on the product, remove it		if ($(this).hasClass('onProduct')){			removeTextFromProductText($(this).text(), $(this).attr('id'));			$(this).removeClass("onProduct");			$(this).addClass("notOnProduct");			// Remove this block id from array of products on text			spliceArray(designDetails[v].lyricLinesOnLocation, $(this).attr('id'));		// If lyric line is not on the product, add it		} else {			addTextToProductText($(this).text(), $(this).attr('id'), $('#songTitle').attr('rel'));			$(this).removeClass("notOnProduct");			$(this).addClass("onProduct");			designDetails[v].lyricLinesOnLocation.push($(this).attr('id')); // Add this block id to array of products on text						}		updatePreviewText();		$('p.returnToLyric').show();				return false;	});	});
