jQuery.extend(jQuery, {
    type: function(_l,_c) {
        var _n=1;
        if (_c&&_c.charAt(0)=='!') {
            _n=-1;
            _c=_c.substr(1);
        }
        switch(typeof _l) {
            case 'function': return _c?_c.indexOf('f')*_n>=0:'function';
            case 'number': return _c?_c.indexOf('n')*_n>=0:'number';
            case 'string': return _c?_c.indexOf('s')*_n>=0:'string';
            case 'undefined': return _c?_c.indexOf('u')*_n>=0:'';
            case 'object': 
                if (_l instanceof Array) return _c?_c.indexOf('a')*_n>=0:'array';
                if (_l instanceof Boolean) return _c?_c.indexOf('b')*_n>=0:'boolean';
                if (_l instanceof Date) return _c?_c.indexOf('d')*_n>=0:'date';
                if (_l instanceof Image) return _c?_c.indexOf('i')*_n>=0:'image';
                if (_l instanceof RegExp) return _c?_c.indexOf('r')*_n>=0:'regexp';
                if (typeof _c=='function') return _c?_l instanceof _c:_l.constructor;
                return _c?_c.indexOf('h')*_n>=0:'hash';
        }
    }
});
