
(function() {
	function toNamespace() {
		var result = {namespace : window};
		this.split('.').each(function(item) {
			this.namespace = this.namespace[item] = this.namespace[item] || {};
		}.bind(result));
		return result.namespace;
	}
	String.implement('namespace', toNamespace);
	function ucFirst() {
		var first = this.charAt(0).toUpperCase();
		return first + this.substring(1);
	}
	String.implement('ucFirst', ucFirst);
})();

/*
---
script: array-sortby.js
version: 1.3.0
description: Array.sortBy is a prototype function to sort arrays of objects by a given key.
license: MIT-style
download: http://mootools.net/forge/p/array_sortby
source: http://github.com/eneko/Array.sortBy

authors:
- Eneko Alonso: (http://github.com/eneko)
- Fabio M. Costa: (http://github.com/fabiomcosta)

credits:
- Olmo Maldonado (key path as string idea)

provides:
- Array.sortBy

requires:
- core/1.3.0:Array

...
*/
(function(){

	var keyPaths = [];

	var saveKeyPath = function(path) {
		keyPaths.push({
			sign: (path[0] === '+' || path[0] === '-')? parseInt(path.shift()+1) : 1,
			path: path
		});
	};

	var valueOf = function(object, path) {
		var ptr = object;
		path.each(function(key) { ptr = ptr[key] });
		return ptr;
	};

	var comparer = function(a, b) {
		for (var i = 0, l = keyPaths.length; i < l; i++) {
			var aVal = valueOf(a, keyPaths[i].path);
			var bVal = valueOf(b, keyPaths[i].path);
			if (aVal > bVal) return keyPaths[i].sign;
			if (aVal < bVal) return -keyPaths[i].sign;
		}
		return 0;
	};

	Array.implement('sortBy', function(){
		keyPaths.empty();
		Array.each(arguments, function(argument) {
			switch (typeOf(argument)) {
				case "array": saveKeyPath(argument); break;
				case "string": saveKeyPath(argument.match(/[+-]|[^.]+/g)); break;
			}
		});
		return this.sort(comparer);
	});

})();

'Welfast'.namespace();
/**
 * Nová instance elementu pro spinner
 */
Welfast.Spinner = new Class({

	Implements: Options,

	options: {
		'class' : 'spinner'
	},

	initialize: function(options) {
		this.setOptions(options);
		return new Element('div', this.options);
	}
});

