var $boxes = $('.panel'), $productLinks = $('.nav .tab ').mouseover(function() { $boxes.hide().filter('#box' + this.id).show(); });