$(document).ready(function(e) {
	
		
	$('form.uploadify').each(function(e) {
		
		var	url	=	this.action;
		
		$('#fileInput').uploadify({
			scriptData	:	{
				nodes_ID		:	nodes_ID,
				sockets_ID		:	sockets_ID,
				galleries_ID	:	galleries_ID,
				action			:	'upload'
			},
			fileDesc	:	'nullFileDesc',
			fileExt		:	'*.jpg;*.jpeg',
			method		:	'POST',
			uploader	:	serverpath + '/cms/admin/public/plugins/uploadify/uploadify.swf',
			script		:	url,
			cancelImg	:	serverpath + '/cms/admin/public/images/uploadify-cancel.png',
			buttonImg	:	serverpath + '/cms/admin/public/images/uploadify-browse.png',
			auto		:	false,
			multi		:	true,
			queueID		:	'queue',
			
			onError		:	function (er) {
				
			},
			
			onSelectOnce:	function (e) {
				$('form.uploadify a').css('display', 'block');
			},
			
			onComplete:	function (event, queueID, fileObj, response, data) {
				
				if (response != 'OK') {
					alert(response);
				}
			},
			
			onAllComplete:	function (e) {
				
				_Popup({
					title	:	'Bilder erfolgreich hochgeladen',
					message	:	'Ihre Biler wurden hochgeladen und wir wurden benachrichtigt. Wir werden die Bilder nach einer kurzen Prüfung freischalten.<br /><br />Vielen Dank, das Sie unsere Galerie bereichert haben!'
				});
				
			}
		});
	});
});