
/**
 * @filesource: ui.extends.js
 * @author: A. RUIZ
 * @email: adrien.ruiz083@gmail.com
 * @date: 03/11/09
 **/

(function ($) {
    
    $.fn.exists = function () {return $(this).length>0;}
    
    $.fn.get_parent = function (p) {
        var e = null;
        this.parents ().each (function () {
            if (this.tagName.toLowerCase () == p.toLowerCase ()) {
                e = $(this); return false;
            }
        });
        return e;
    } // getParent ();
    
})(jQuery);
