$(document).ready(function() {

    // Expand Panel
    $("#search-open").click(function() {
        $("div#search-panel").slideDown("slow");

    });

    // Collapse Panel
    $("#search-close").click(function() {
        $("div#search-panel").slideUp("slow");
    });

    // Switch buttons from "Log In | Register" to "Close Panel" on click
    $(".search-tab a").click(function() {
        $(".search-tab a").toggle();
        $(".search-tab-nav").toggle();
    });
    
    $("#banners").cycle({
       fx: 'fade',
       speed: 4000,
       pause: 1,
       next: '.nextbanner',
       prev: '.prevbanner'
          });

    // When a link is clicked  
    $("a.tab").click(function() {

        // switch all tabs off
        $(".active").removeClass("active");

        // switch this tab on  l
        $(this).addClass("active");

        // slide all elements with the class 'content' up  
        $(".tab-content").slideUp();

        // 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).slideDown();

    });
        
   
});


