$(function () {
	$('#form_noscript').remove();
	$('#fileupload').css('display', 'block');
    $('#fileupload').fileupload({
        dataType: 'json',
		getFilesFromResponse: function (data) {
			if (data.result && $.isArray(data.result.files)) {
				return data.result.files;
			}
			return [data.result];
		},
		sequentialUploads:true,
		progressall: function (e, data) {
        var progress = parseInt(data.loaded / data.total * 100, 10);
        $('#progress .bar').css(
            'width',
            progress + '%'
        );
    }
    });
});
