/**
 * JS Document. 
 * @author Sandro Jordão.
 * @copyright CTVoicer.
 */
 
function init()
{	
	$('#upload').upload({
        name: 'file',
        method: 'post',
        enctype: 'multipart/form-data',
        action: basepath + 'principal/uploadArquivo',
        onSubmit: function(){
			$("#progress").html("");
			$("#progress").hide();		
			$("#progress").append("<img src='" + basepath + "www/imagem/loading.gif' border='0' align='Absmiddle' /> Carregando o arquivo, aquarde...");
		},
        onComplete: function(data){
			$("#progress").hide();
			$('#progress').html(data);
			$("#progress").slideDown('slow');
        }
    });
}

$(document).ready(init);