$(function() 
{
	$("#file").change(function(){
		if (this.files && this.files[0]) {
			var reader = new FileReader();
			reader.onload = function (e) {
				$('#itemphoto').attr('src', e.target.result);
			}
			reader.readAsDataURL(this.files[0]);
		}
	});
	
	$('#reorderlevel').priceFormat({
		prefix: '',
		thousandsSeparator: ',',
		centsLimit: 0,
		clearOnEmpty: true
	});
	
	$('#costprice').priceFormat({
		prefix: '',
		thousandsSeparator: ',',
		centsLimit: 2,
		clearOnEmpty: true
	});
	
	$('#sellprice').priceFormat({
		prefix: '',
		thousandsSeparator: ',',
		centsLimit: 2,
		clearOnEmpty: true
	});
	
});