
(function($) {

    $.fn.rexxDebug = {

        help: function() {
            $.each($.fn.rexxDebug, function(key,value) {
                if(typeof key != 'undefined') {console.log(key);}
            });
        },

        linksOhneTitel: function() {

            $('a').each(function() {
                if(typeof $(this).attr('title') == 'undefined' || !$(this).attr('title') || $(this).attr('title').length <= 0) {
                    console.log(this);
                }
            });
        },

        toteLinks: function() {

            $('a').each(function() {
                var $this = $(this);
                if(typeof $(this).attr('href') == 'undefined' || !$(this).attr('href') || $(this).attr('href').length <= 0) {
                    console.log($this);
                } else if(!$(this).attr('href').match(/http:\/\/.*/)) {
                    var href = $(this).attr('href');
                    $.ajax({
                        url: href,
                        error: function(jqXHR, textStatus, errorThrown) {
                            console.log($this);
                            console.log(href);
                        },
                        success: function(data, textStatus, jqXHR) {
                            
                        }
                    });
                }
            });
        }
    }
    
})(jQuery);
