on run {input, parameters}

	repeat with i in input

		try
			tell application "Finder" to set {fName, fContainer} to {(displayed name of i), (POSIX path of ((container of i) as string))}

			do shell script ("zip -r -j " & (quoted form of (fContainer & (fName & ".zip"))) & " " & (quoted form of (POSIX path of (i as string))))
		end try

	end repeat

	return input
end run