$(document).ready(function() {
	$('#compare_selection > select').live('change', function(){
		var legacyid = $(this).val();
        if (legacyid == 0) return;
		$.ajax({
            url:'/ajax/comparison/get-legacy-firmware/legacy_id/'+legacyid,
            type:'GET',
            dataType:'html',
            success : function(data) {
                $("#compare_result").html(data);
                $("#compare_result table").addClass("table-comparison");
                $("#compare_result td.xref_newProduct").addClass("name-product");
            },
            error : function(xhr) {
            	ErrorMessage(xhr);
            }            
        });
	});
});
