 // When the document loads do everything inside here ...
 $(document).ready(function(){

   // When a link is clicked
   $("a.tab").click(function () {

       // switch all tabs off
       $(".selected").removeClass("selected");
 
       // switch this tab on
       $(this).addClass("selected");

       // slide all elements with the class 'content' up
       $(".featured_ad").hide();

       // Now figure out what the 'title' attribute value is and find the element with that id.  Then slide that down.
       var content_show = $(this).attr("title");
       $("#"+content_show).fadeIn(500);

       return false;
   });

 });
