function uploadAttachEvents(){$('#fileupload-button').click(function(){$('#fileupload').click();});$('#fileupload').fileupload({dataType:'json',sequentialUploads:true,start:function(e){$('#fileupload-error').addClass('hidden');$('#fileupload-spinner').toggleClass('hidden');},stop:function(e){$('#fileupload-spinner').toggleClass('hidden');},done:function(e,data){if(data.result.success){$('[id^=fileupload-small-icon]').attr('src',data.result.image_small);$('[id^=fileupload-medium-icon]').attr('src',data.result.image_medium);$('[id^=fileupload-large-icon]').attr('src',data.result.image_large);}else{$('#fileupload-error').removeClass('hidden');}}});}