jQuery(window).ready(function() {
    var ie6 = jQuery.browser.msie && parseInt(jQuery.browser.version) === 6 && typeof window['XMLHttpRequest'] !== "object";

    if (!ie6) {
        jQuery('.homepage_specials_slider').nivoSlider({
            effect: 'fade',
            pauseTime: 5000
        });
    }

    jQuery('.homepage_facebook_wall').fbWall({
        id: 'TheFlagLady',
        showGuestEntries: false,
        showComments: false,
        max: 3,
        timeConversion: 12
    });

    if (!ie6) {
        jQuery(".tweet").tweet({
            username: "theflaglady",
            join_text: "auto",
            avatar_size: 32,
            count: 4,
            auto_join_text_default: "we said,", 
            auto_join_text_ed: "we",
            auto_join_text_ing: "we were",
            auto_join_text_reply: "we replied to",
            auto_join_text_url: "we were checking out",
            loading_text: "loading tweets..."
        });
    }

    if (!ie6) {
        jQuery('#social-list > li').click(function(event){
            event.preventDefault();
             
            //perform the actions when it's not selected
            if (!jQuery(this).hasClass('show')) {
         
                //remove the selected class from all LI
                jQuery('#social-list > li').removeClass('selected');
                 
                //After cleared all the LI, reassign the class to the selected tab
                jQuery(this).addClass('selected');

                //Hide all the DIV in .boxBody
                jQuery('#homepage_social_content div').removeClass('show');

                //Look for the right DIV index based on the Navigation UL index
                jQuery('#homepage_social_content > div:eq(' + jQuery('#social-list > li').index(this) + ')').addClass('show');
            }
        });
    }
});
jQuery.noConflict();


