var is_confirmed = false;

$(document).ready(function() {
    if ($.browser.safari)
	return;
    
    $("#manual-ordering").remove();

    $(".music-sales tr:first").each(function() {
	$(this).prepend('<th>Buy</th>');
    });

    var row = 0;
    $(".music-sales tr:not(:first)").each(function() {
	var author = $(this).find("td:first").text();
	var title = $(this).find("td:eq(1)").text();
	var price = $(this).find("td:eq(2)").text() * 1;

	var copy = $(this).find("td:last").text();
	if (copy)
	    copy = " (" + copy + ")";

	$(this).find("td:first").wrapInner('<label for="music-order-row-' + row + '"></label>');
	$(this).prepend('<td><input type="checkbox" name="buy[]" value="' 
			+ author + " - " + title + copy + " - $" + price.toFixed(2)
			+ '" id="music-order-row-' + row + '"/></td>');
	row++;
    });
});
