src/js/libs/spiritual-gui.js
function(type) {
			var result = null,
				spirit = null,
				el = this.spirit.element;
			if (type) {
				while ((el = el.previousElementSibling) !== null) {
					spirit = el.spirit;
					if (spirit !== null && spirit instanceof type) {
						result = spirit;
						break;
					}
				}
			} else {
				result = el.previousElementSibling;
			}
			return result;
		}
function(type) {
			var result = null,
				spirit = null,
				el = this.spirit.element;
			if (type) {
				while ((el = el.previousElementSibling) !== null) {
					spirit = el.spirit;
					if (spirit !== null && spirit instanceof type) {
						result = spirit;
						break;
					}
				}
			} else {
				result = el.previousElementSibling;
			}
			return result;
		}
function ( type ) { var result = null , spirit = null , el = this . spirit . element ; if ( type ) { while ( ( el = el . previousElementSibling ) !== null ) { spirit = el . spirit ; if ( spirit !== null && spirit instanceof type ) { result = spirit ; break ; } } } else { result = el . previousElementSibling ; } return result ; }
Previous element or previous spirit of given type.
@param @optional {function} type Spirit constructor
@returns {Element|gui.Spirit}
Previous element or previous spirit of given type .