(function($){
    $.fn.group_hover = function(options){
        var opts = $.extend({}, $.fn.group_hover.defaults, options);
    
        var groups = $(this).removeClass('active');
        var targets = $(opts.target_selector);
        var triggers = $(this).find(opts.link_selector);
    
        targets.hide();
        
        var first_group = groups.filter(':first').addClass(opts.active_class);
    
        $('#' + first_group.find(opts.link_selector).attr('rel')).show();
            
        $(this).mouseover(function(){
            var $this = $(this);
        
            groups.removeClass(opts.active_class);
            $this.addClass(opts.active_class);
            
            targets.hide();
            $('#' + $this.find(opts.link_selector).attr('rel')).show();
        });
    };
    $.fn.group_hover.defaults = {
        target_selector: '.tier-image',
        link_selector: 'a.article',
        initial_selector: ':first',
        active_class: 'active'
    };
})(jQuery);