<!--S:Main-->
<div id="uploader" class="stp-uploader {SKIN}">
	<p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
</div>

<script type="text/javascript">
// Initialize the widget when the DOM is ready
$(function() {
	$("#uploader").plupload({
		// General settings
		runtimes : 'html5,flash,silverlight,html4',
		url : '{ACTION}',

		// User can upload no more then 20 files in one go (sets multiple_queues to false)
		max_file_count: 100,
		
		chunk_size: '1mb',

		// Resize images on clientside if we can

		/*
		resize : {
			width : 200, 
			height : 200, 
			quality : 90,
			crop: true // crop to exact dimensions
		},*/
		
		filters : {
			// Maximum file size
			max_file_size : '1000mb',
			// Specify what files to browse for
			mime_types: [
				{title : "Image files", extensions : "jpg,gif,png,jpeg"}
			]
		},

		// Rename files by clicking on their titles
		rename: true,
		
		// Sort files
		sortable: false,

		// Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
		dragdrop: true,

		// Views to activate
		views: {
			list: true,
			thumbs: true, // Show thumbs
			active: 'thumbs'
		},

		// Flash settings
		flash_swf_url : '{PATH}admin/3rdparty/plupload/Moxie.swf',

		// Silverlight settings
		silverlight_xap_url : '{PATH}admin/3rdparty/plupload/Moxie.xap',

		init:  { 
			UploadComplete : function(up , files) {
				window.location.reload();
				//window.close();
			}
		}

	});
});
</script>
<!--E:Main-->