var mcafee =
{
  ie: $.browser.msie,
  ie6: $.browser.msie && $.browser.version < 7,
  ie7: $.browser.msie && $.browser.version == 7,
  /* Firefox 2's rendering engine is Mozilla's Gecko v1.8.1.x */
  ff2: $.browser.mozilla && $.browser.version < "1.8.2"
};

$(document).ready(
  function()
  {
    /* !Power Footer */
    if ($("body").hasClass("powerFooter"))
    {
      $(".copyright").before("<div class=\"container powerFooterContainer\"></div>");
      $(".powerFooterContent").moveContentTo(".powerFooterContainer");
    }

    /* !Navigation */
    //new spaceNavigation(); //Commented due to performing slow in IE - For space/width for the navigation is manually setting through the CSS
    $("#primaryNav").children("li")
                    .hoverIntent(navigationConfig);

    // Build an array of the navigation items.  The "rel" attribute on the anchor element determines the body class to use to set the selected navigation item.
    var navigationItems = new Array();
    $("ul#primaryNav > li > a").each(
      function(i)
      {
        navigationItems[i] = $(this).attr("rel");
      }
    );

    // Check the body class against the array of navigation items, return the index of the selected item.
    var navSelectionIndex = -1;
    var navSelections = navigationItems.length;
    for (i = 0; i < navSelections; i++)
    {
      if ($("body").hasClass(navigationItems[i]))
      {
        navSelectionIndex = i;
        break;
      }
    }

    // Set the selected navigation item if an index was returned.
    if (navSelectionIndex >= 0 && navSelectionIndex < (navSelections - 1))
    {
      $("ul#primaryNav > li").eq(navSelectionIndex)
                             .addClass("selected")
                             .next()
                             .addClass("prevSelected");
    }
    else if (navSelectionIndex == (navSelections - 1))
    {
      $("ul#primaryNav > li").eq(navSelectionIndex)
                             .addClass("selected");
      $("ul#primaryNav").addClass("lastSelected");
    }

    $(".primarySubNav").bgiframe();

    /* !Labels In Text Fields */
    $("input.labelInField").each(
      function()
      {
        var $thisInput = $(this);
        var thisId = $thisInput.attr("id");
        var thisLabel = $thisInput.siblings("label[for=" + thisId + "]")
                                  .text();
           /*if($(this).attr("id") == "keyword")
           {
             if(($(this).val() != null) && ($(this).val() != "") && ($(this).val() != "Enter keyword"))
             {
               thisLabel = $(this).val();
             }
           }*/
                $thisInput.addClass("inactive")
                  .val(thisLabel)
                  .focus(
                    function()
                    {
                      if ($(this).val() == thisLabel)
                      {
                        $(this).removeClass("inactive")
                              .val("");

                          //  if($(this).val() == "" || $(this).val() == "Enter keyword" ||  $(this).val() == "Enter DNS Server Name" ||  $(this).val() == "Enter IP address" ||  $(this).val() == "Enter domain name" ||  $(this).val() == "Enter website URL" || $(this).val() == "Enter Malware Name")
                          //    $(this).removeClass("inactive").val("");
                      }
                    }
                  )
                  .blur(
                    function()
                    {
                      if ($(this).val() === "")
                      {
                        $(this).addClass("inactive")
                               .val(thisLabel);
                      }
                    }
                  );
      }
    );

    /* !Dynamically Size Form Elements */
    $(".dynamicWidth").each(
      function()
      {
        $this = $(this);
        var totalWidth = $this.width();

        var minimumWidth = Math.round(totalWidth / 2);
        var inputAdjustment = 12;
        var selectAdjustment = 6;
        var textAreaAdjustment = 12;
        var buttonSpacing = 10;

        if (mcafee.ie6)
        {
          selectAdjustment = 0;
        }
        else if (mcafee.ie)
        {
          selectAdjustment = 11;
        }

        if ($this.find("div.button").length > 0)
        {
          // Capture the first button
          $button = $this.find("div.button:first");

          // Make the container hold floated elements
          $this.css("overflow","hidden");
          if ($(mcafee.ie6))
          {
            $this.css("height","100%");
          }

          // Make the button float so we can measure it's width.
          var buttonWidth = $button.css("float","left")
                                   .outerWidth();

          // If we have two form elements that need to sized together, add the 'doubleDynamicWidth' class
          if ($this.hasClass("doubleDynamicWidth"))
          {
            totalWidth = Math.floor((totalWidth - buttonWidth - buttonSpacing - 10) / 2)  + buttonWidth + buttonSpacing;
            minimumWidth = Math.round(totalWidth / 2);
          }

          /*
           There is a calucation bug in Firefox 3.0 and 3.5 on Mac.
           I am not targeting future releases in hopes that the bug
           gets fixed.  If it does not get fixed, this code will
           need to updated to include future releases.

           Firefox 3.0.x = Gecko 1.9.0.x
           Firefox 3.5.x = Gecko 1.9.1.x
           */
          if (navigator.platform.match(/mac/i) && $.browser.version.match(/1\.9\.[0-1]\./))
          {
            inputAdjustment = inputAdjustment + 1;
            selectAdjustment = selectAdjustment + 1;
          }

          if ($.browser.safari)
          {
            selectAdjustment = selectAdjustment + 4;
          }

          var inputWidth = totalWidth - buttonWidth - buttonSpacing - inputAdjustment;
          var selectWidth = totalWidth - buttonWidth - buttonSpacing - selectAdjustment;
          var cssModification =
          {
            "float": "left",
            marginRight: "10px"
          };
          var buttonCss =
          {
            "float": "left"
          };

          // If the inputs get sized too small, just make the button wrap
          if (inputWidth < minimumWidth)
          {
            inputWidth = totalWidth - inputAdjustment;
            cssModification.marginBottom = "10px";
            $button.css("float", "right");
          }
          if (selectWidth < minimumWidth)
          {
            selectWidth = totalWidth - selectAdjustment;
            cssModification.marginBottom = "10px";
            $button.css("float", "right");
          }

          $this.find("input.typeText")
               .width(inputWidth)
               .css(cssModification);
          $this.find("select")
               .width(selectWidth)
               .css(cssModification);
        }
        else
        {
          $this.find("input.typeText")
               .width(totalWidth - inputAdjustment);
          $this.find("select")
               .width(totalWidth - selectAdjustment);
          $this.find("textarea")
               .width(totalWidth - textAreaAdjustment);
        }
      }
    );

    /* !Share / Print Component */
    $(".printPage").click(
      function(event)
      {
        event.preventDefault();
        $("body").triggerHandler("click");
        window.print();
        return false;
      }
    );
    $(".emailPage").click(
      function(event)
      {
        event.preventDefault();
		mail_str = "mailto:?subject=I found a website that might interest you.";
		mail_str += "&body=" + escape( "I thought you might be interested in " + document.title+".\n\nYou can view it at, " + location.href );
		location.href = mail_str;
      }
    );

    /* !Vertically Centering Banner Content */
	$(".standardBanner, .bannerContent, .topBannerContainer, .bannerAdditionalLinks").each(
	  function() {
		$(this).bannerAlign(".bannerAlign");
	  }
	);


    /* !Button States */
    $(".button").add(".button input")
                .bind(
                  "mouseover mouseup",
                  function()
                  {
                    $(this).removeClass("buttonDown")
                           .addClass("buttonOver");
                  }
                )
                .bind(
                  "mousedown",
                  function()
                  {
                    $(this).removeClass("buttonOver")
                           .addClass("buttonDown");
                  }
                )
                .bind(
                  "mouseout",
                  function()
                  {
                    $(this).removeClass("buttonOver")
                           .removeClass("buttonDown");
                  }
                );

     /* !Collapsible Content: Vijay [Bangalore] */
    $(".collapsibleHeader").each(
                             function()
                             {
                               if ($(this).hasClass("collapsedHeader"))
                               {
                                 $(this).parent()
                                        .next(".collapsibleContent")
                                        .hide();
                               }
                             }
                           )
                      $(".headerContainer:has(.collapsibleHeader)").live("click",
                             function()
                             {
                               var $collapsibleHeader = $(this).children(".collapsibleHeader");
                               if ($collapsibleHeader.hasClass("expandedHeader"))
                               {
                                 $collapsibleHeader.removeClass("expandedHeader")
                                                   .addClass("collapsedHeader")
                                                   .parent()
                                                   .next(".collapsibleContent")
                                                   .slideUp();
                               }
                               else if ($collapsibleHeader.hasClass("collapsedHeader"))
                               {
                                 $collapsibleHeader.removeClass("collapsedHeader")
                                                   .addClass("expandedHeader")
                                                   .parent()
                                                   .next(".collapsibleContent")
                                                   .slideDown();
                               }
                             }
    );

    /* !Accordion */
    $(".accordionCollapsed").hide();
    if (mcafee.ie6)
    {
      $(".accordionContainer .accordionContentHeaderContainer").css("height","1%");
    }
    $(".accordionContainer .accordionContentHeaderContainer").click(
      function()
      {
        var $collapsed = $(this).find(".collapsed");
        if ($collapsed.hasClass("collapsed"))
        {
          $(this).parent(".accordionContainer")
                 .find("h5.expanded")
                 .removeClass("expanded")
                 .addClass("collapsed");

          $collapsed.removeClass("collapsed")
                    .addClass("expanded")
                    .parents(".accordionContainer")
                    .find(".accordionExpanded")
                    .removeClass("accordionExpanded")
                    .addClass("accordionCollapsed")
                    .slideUp();

          var tabToShow = $collapsed.parents(".accordionContentHeaderContainer")
                    .next(".accordionCollapsed")
                    .removeClass("accordionCollapsed")
                    .addClass("accordionExpanded")
                    .slideDown();
          $(tabToShow).trigger("isVisible");  /* Vijay [Bangalore] */
        }
      }
    );

    /* !Vertical Tabs */
    $(".verticalTabNavigation li").click(
      function(event)
      {
        event.preventDefault();

        // Hide currently selected content
        $(".verticalTabNavigation .verticalTabNavigationCurrent").removeClass("verticalTabNavigationCurrent");
        $(".verticalTabCurrent").removeClass("verticalTabCurrent");
        $(".verticalTabNavigationPreviousCurrent").removeClass("verticalTabNavigationPreviousCurrent");
        $(".verticalTabNavigationVoidLastCurrent").removeClass("verticalTabNavigationVoidLastCurrent");

        // Show newly selected content
        var tabToShow = $(this).addClass("verticalTabNavigationCurrent")
                               .children("a")
                               .attr("href");
        var nextTab = $(this).next("li")
                             .addClass("verticalTabNavigationPreviousCurrent");
        if (nextTab.length < 1)
        {
          $(".verticalTabNavigationVoid").addClass("verticalTabNavigationVoidLastCurrent");
        }
        if (!tabToShow.match(/^#/))
        {
          tabToShow.split("#");
          tabToShow = "#" + tabToShow[1];
        }
        $(tabToShow).addClass("verticalTabCurrent");
        
        /* Vijay [Bangalore: Begin ] */
        $(tabToShow).find(".tabItemCurrent").trigger("isVisible");
        $(tabToShow).trigger("isVisible");
        /* Vijay [Bangalore: End ] */
        
        $("body").triggerHandler("click");
        return false;
      }
    );

    /* !Banner Selector */
    $(".bannerSelector").children("div")
                        .click(
                          function(event)
                          {
                            event.preventDefault();

                            // Hide currently selected banner
                            $(".bannerSelector").find("a.selected")
                                                .removeClass("selected");
                            $(".bannerSelected").removeClass("bannerSelected");

                            // Show newly selected banner
                            var bannerToShow = $(this).find("a")
                                                      .addClass("selected")
                                                      .attr("href");
                            if (!bannerToShow.match(/^#/))
                            {
                              bannerToShow.split("#");
                              bannerToShow = "#" + bannerToShow[1];
                            }
                            $(bannerToShow).addClass("bannerSelected")
                                           .bannerAlign(".bannerAlign");
                            return false;
                          }
                        );

    // Banner Rotator "Class" -- Can be reused and customized via options hash.
    var rotator = function($el,intervalCustom,stopCustom)
    {
      // Private properties.
      var options =
      {
        interval: intervalCustom || 10000,
        index: 0,
        maxLength: $el.length,
        stop: stopCustom || true
      };

      // Private methods.
      var rotate = function()
      {
        $el.eq(options.index).click();
        options.index === options.maxLength - 1 ? options.index = 0 : options.index++;
      };

      // Public methods.
      this.init = function()
      {
        var interval = setInterval(rotate,options.interval);
        if (options.stop)
        {
          $el.parents(".topBannerContainer, .multiBanner")
             .bind(
               "mouseover focus",
               function()
               {
                 clearInterval(interval);
               }
             )
             .bind(
               "mouseout blur",
               function()
               {
                 interval = setInterval(rotate,options.interval);
               }
             );
        }
      };
    };

    var bannerRotator = new rotator($(".bannerSelector").children("div"));
    bannerRotator.init();

    /* !Tooltip */
    $.toggleTip = function(element,bodyFlag)
    {
      if (bodyFlag && $(document.body).find("> div.tooltipContent:first").data("triggered") !== true)
      {
        $(document.body).find("> div.tooltipContent:first, > a")
                        .fadeOut(
                          "fast",
                          function()
                          {
                            $(this).remove();
                          }
                        );
      }
      else if ($(element).parent().find(".tooltipContent").data("triggered") !== true)
      {
        $(element).parent()
                  .find(".tooltipContent")
                  .fadeOut(
                    "fast",
                    function()
                    {
                      $(element).parent()
                                .removeClass("tooltipActive")
                                .children(".tooltipArrow")
                                .remove();
                    }
                  );
      }
    };

    $("a.tooltip, a.new, .tooltip > a").hoverIntent(
      function(e)
      {
        // Check for any lingering tips
        $(document.body).find("> div.tooltipContent")
                        .remove();

        var $this = $(this);
        var topBuffer = 35;
        var leftBuffer = 23;
        var $theTip = $this.siblings(".tooltipContent");
        var clone = $this.siblings('.tooltipContent')
                         .html();
				var wrapHTML = '<div class="tooltipContent">'+clone+'</div>';								 
        var offset = $this.offset();
        $(document.body).append(wrapHTML)
                        .find("> a.tooltip")
                        .remove()
                        .end()
                        .find("> div.tooltipContent:first")
                        .bgiframe()
                        .append("<div class=\"tooltipArrow\"></div>")
                        .css(
                          {
                            "top": offset.top - $(document.body).find("> div.tooltipContent:first").height() - topBuffer,
                            "left": e.pageX - leftBuffer
                          }
                        )
                        .show();
      }, // end In
      function()
      {
        var $this = $(this);
        var $theTip = $this.siblings(".tooltipContent");

        var thisClosure = this;
        var timer = setTimeout(
          function()
          {
            $.toggleTip(thisClosure,true);
          },
          15
        );
      } // end Out
    ); // end hover()
    $(".tooltipContent").livequery(
                          "mouseenter",
                          function()
                          {
                            $(this).data("triggered",true)
                                   .fadeIn("fast");
                          }
                        )
                        .livequery(
                          "mouseleave",
                          function()
                          {
                            $(this).fadeOut(
                              "fast",
                              function()
                              {
                                $(this).data("triggered",false);
                                if ($(this).parent(document.body).length)
                                {
                                  $(this).remove();
                                }
                              }
                            );
                          }
                        );

    /* !Regional Navigation */
    $(".regionalNav span").click(
      function(event)
      {
        event.preventDefault();
        if (!$(this).hasClass("open"))
        {
          $(this).addClass("open")
                 .siblings("ul.regionList")
                 .addClass("regionListOpen");
          $("body").triggerHandler("click");
          $("body").bind(
            "click.regionHandler",
            function(event)
            {
              //event.preventDefault();//the links are not working.Commented
              var $target = $(event.target);
              if (!$target.hasClass("regionList") && $target.parents(".regionList").length === 0)
              {
                $(this).unbind("click.regionHandler");
                $(".regionalNav span").removeClass("open")
                                      .siblings("ul.regionList")
                                      .removeClass("regionListOpen");
              }
              //return false;//the links are not working.Commented
            }
          );
          return false;
        }
      }
    );

    /* !Fisheye Effect */
    $(".fisheye li").bind("mouseenter",fisheyeZoomIn)
                    .bind("mouseleave",fisheyeZoomOut);
    $(".fisheye li.selected").unbind("mouseenter")
                             .unbind("mouseleave");

    /* !Filter List */
    $(".filterList a").click(
      function(event)
      {
        event.preventDefault();
        var $container = $(this).parents("ul.filterList")
                                .parent();
        $container.find("li.selected")
                  .bind("mouseenter",fisheyeZoomIn)
                  .bind("mouseleave",fisheyeZoomOut)
                  .removeClass("selected");
        $(this).parent("li")
               .addClass("selected")
               .trigger("mouseleave")
               .unbind("mouseenter")
               .unbind("mouseleave");
        var filterGroup = $(this).attr("rel");
  
        //To work for internal reference anchor link
        $(".filtered a[href^='#']").click(
            function(event){
                $container.find(".filtered")
                          .show();
                $container.find("li.selected")
                          .bind("mouseenter",fisheyeZoomIn)
                          .bind("mouseleave",fisheyeZoomOut)
                          .removeClass("selected");
                $container.find("li.first")           
                          .addClass("selected")
                          .trigger("mouseleave")
                          .unbind("mouseenter")
                          .unbind("mouseleave");
            }
        );

        if (filterGroup == "All")
        {
          $container.find(".filtered")
                    .show();
        }
        else
        {
          $container.find("." + filterGroup)
                    .show();
          $container.find(".filtered")
                    .not("." + filterGroup)
                    .hide();
        }
        return false;
      }
    );

    /* !Refine Search Panel */
    $(".showPanel").click(
      function()
      {
        $(".panel").bgiframe()
                   .slideDown(
                     "normal",
                     function()
                     {
                       $(this).find(".equalHeightContainer")
                              .equalHeights(".equalHeightSizer",".equalHeight");
                       //$(this).styleSelects();
                       if (mcafee.ie6)
                       {
                         $(".searchPanelContainer").bgiframe();
                       }
                     }
                   );
        return false;
      }
    );
    $(".hidePanel").click(
      function()
      {
        $(".panel").slideUp("normal");
        return false;
      }
    );

    /* !Firefox 2 DOM Refresh */
    if (mcafee.ff2)
    {
      $(".verticalTabContent").hide();
      setTimeout(
        function()
        {
          $(".verticalTabContent").show();
        },
        10
      );
    }

    /* !Announcements Switcher */
    $(".announcementsContainer").contentSwitcher();

    /* !Technical Support Agreement */
    var $TOC = $("div.agreedTOC").hide();
    $(".agreement > .button").click(
      function()
      {
        $("div.agreeHide").fadeOut(
          function()
          {
            $TOC.fadeIn();
          }
        );
        return false;
      }
    );
   
   /* Contact us page region select */
   //get the locale value from url
   var urlPage = window.location.href;
   var finalUrl = urlPage.replace(/^[A-Za-z]+:\/\/\S+?(\/){1}/,"");
       finalUrl = "/"+finalUrl;
   var UrltoSplit = finalUrl.split('/');
   var locale = UrltoSplit[1];
   var defaultSelected;
   $(".addressContainer td div").hide();
    switch (locale){
    case "au":
            defaultSelected = "australia"
            break;
    case "br":
            defaultSelected = "brazil"
            break;
    case "ca":
            defaultSelected = "canada"
            break;
    case "cf":
            defaultSelected = "canada"
            break;
    case "cn":
            defaultSelected = "china"
            break;
    case "de":
            defaultSelected = "germany"
            break;
    case "es":
            defaultSelected = "spain"
            break;
    case "fr":
            defaultSelected = "france"
            break;
    case "hk":
            defaultSelected = "hong_kong"
            break;
    case "in":
            defaultSelected = "india"
            break;
    case "it":
            defaultSelected = "italy"
            break;
    case "jp":
            defaultSelected = "japan"
            break;
    case "kr":
            defaultSelected = "korea"
            break;
    case "mx":
            defaultSelected = "mexico"
            break;
    case "ru":
            defaultSelected = "russia"
            break;
    case "sg":
            defaultSelected = "singapore"
            break;
    case "tw":
            defaultSelected = "taiwan"
            break;
    case "uk":
            defaultSelected = "united_kingdom"
            break;
    case "us":
            defaultSelected = "united_states"
            break;
    default:     
            defaultSelected = "united_states"
    }
    
    $("#countryFilter option[value="+ defaultSelected +"]").attr("selected",true);
    $(".addressContainer td div[class=is" + defaultSelected + "]").show();
    $(".addressContainer tr[class!=is" + defaultSelected + "] td").hide();
    $("#countryFilter").change(function(){
        var value = $(this).val();
        var theDiv = $(".is" + value);
        $(theDiv).show();
        $(".addressContainer tr[class=is" + value + "] td").show();
        $(".addressContainer tr[class!=is" + value + "]").hide();
        $(".addressContainer td div[class!=is" + value + "]").hide();
    });
    
    /*Popup Scripts*/ //CR33945
    
    var win = null;
    function newWindow(mypage,myname,w,h,features) {
      var winl = (screen.width-w)/2;
      var wint = (screen.height-h)/2;
      if (winl < 0) winl = 0;
      if (wint < 0) wint = 0;
      var settings = 'height=' + h + ',';
      settings += 'width=' + w + ',';
      settings += 'top=' + wint + ',';
      settings += 'left=' + winl + ',';
      settings += features;
      win = window.open(mypage,myname,settings);
      win.window.focus();
    }

    $(function() {
        var getWidth = screen.width;
        var getHeight = screen.height;
        
        $('.fulScreenPopup').click(function() {
                var fsPopup = $(this).attr('href');
                newWindow(fsPopup,'', getWidth, getHeight,'');
                return false;
        });
        
        var chatPopup = $('.chatPopup').attr('href');
        
        $('.chatPopup').click(function() {
                newWindow(chatPopup,'','495','300','');
                return false;
        });
        
        $('.bioPopup').click(function() { 
                var bioPopup = $(this).attr('href');
                newWindow(bioPopup,'','676','450','scrollbars=yes');
                return false;
        });
        
        $('.demoPopup').click(function() {
                var demoPopup = $(this).attr('href');
                newWindow(demoPopup,'','798','500','');
                return false;
        });
        
        $('.tutorialPopup').click(function() {
                var tutorialPopup = $(this).attr('href');
                newWindow(tutorialPopup,'','960','520','');
                return false;
        });             
        
        $('.videoPopup').click(function() {
                var videoPopup = $(this).attr('href');
                newWindow(videoPopup,'','700','394','');
                return false;
        });     
        
        $('.podcastPopup').click(function() {
                var podcastPopup = $(this).attr('href');
                newWindow(podcastPopup,'','390','400','');
                return false;
        });
        
        // The line below is for the banner arrow links
        $('.standardBanner a').after('<img src="img/arrow-link.png" width="21" height="17" />'); 
        
    });
    
    
    /* !Stylized Select Elements */
    setTimeout(
      function()
      {
        // Put at the end of the processing queue
        $(document.body).styleSelects();
      }
    );

    /* !Style Feedback Radio Buttons */
    $("form.feedback").find("input[type=radio]")
                      .each(
                        function()
                        {
                          var $this = $(this);
                          var $replacement = $("<span class=\"radio\"></span>");
                          if ($this.get(0).checked)
                          {
                            $replacement.addClass("radioChecked");
                          }
                          $this.addClass("typeRadioStyled")
                               .before($replacement);
                          $replacement.bind(
                            "click",
                            function()
                            {
                              $(this).parents("form.feedback")
                                     .find(".radioChecked")
                                     .removeClass("radioChecked");
                              $(this).addClass("radioChecked")
                                     .next("input[type=radio]")
                                     .attr("checked",true);
                            }
                          );
                        }
                      ); // end each

    /* !Alternate Script to Balance Column Heights */
    // This is currently only used on the Purchase page.
    var balanceColumnsHeight = 0;
    $(".balanceColumnsContainer").find(".balanceColumnsMeasure")
                                 .each(
                                   function() {
                                     var thisHeight = $(this).outerHeight()
                                     if (thisHeight > balanceColumnsHeight) {
                                       balanceColumnsHeight = thisHeight;
                                     }
                                   }
                                 )
                                 .each(
                                   function() {
                                     var thisHeight = $(this).outerHeight();
                                     var $adjust = $(this).find(".balanceColumnsSizer");
                                     $adjust.height($adjust.height() + (balanceColumnsHeight - thisHeight));
                                   }
                                 );

    /* !Threat Intelligence Drop Down (Not IE6 or IE7) */
		
    if (!mcafee.ie6 && !mcafee.ie7)
    {
      if ($("body").hasClass("threatIntelligence"))
      {

		    //$(".threatIntelligenceRow").moveTo(".page",true)
             //                      .show();
        //var pos = $('.page').position();   
        //alert(pos); 
        $('.threatIntelligenceRow') 
                  .css('position','absolute')
                  .css('top','-300px')              
                  .show(); 
     
        $(".threatExpand").click(
          function(event)
          {
            $(this).hide()
                   .siblings(".threatInfo")
                   .fadeOut("normal")
                   .end()
                   .siblings(".threatClose")
                   .show();
            $(".threatIntelligenceDropDown").addClass("threatIntelligenceDropDownOpen")
                                            .slideDown("normal");
            return false;
          }
        );
        $(".threatClose").click(
          function(event)
          {
            $(this).hide()
                   .siblings(".threatInfo")
                   .fadeIn("normal")
                   .end()
                   .siblings(".threatExpand")
                   .show();
            $(".threatIntelligenceDropDown").slideUp(
              "normal",
              function()
              {
                $(this).removeClass("threatIntelligenceDropDownOpen");
              }
            );
            return false;
          }
        );

        /* !Threat Intelligence Visualizations */

        $(".switchView").click(
          function(event)
          {
            event.preventDefault();
            $(this).find("a")
                   .toggleClass("selected")
                   .end()
                   .siblings(".dataVisual, .dataDetail")
                   .toggleClass("dataSelected");
            $("body").triggerHandler("click");
            return false;
          }
        );
      } // if has body class of threatIntelligence

      /* !Equalize Columns */
      $(".equalHeightContainer").equalHeightsSpecial(".specialHeightOne")
         .equalHeightsSpecial(".specialHeightTwo")
         .equalHeightsSpecial(".specialHeightThree");
      $(".equalHeightContainer").equalHeights(".equalHeightSizer",".equalHeight");
      $(".equalHeightContainerOuter").equalHeights(".equalHeightSizerOuter",".equalHeightOuter");
      $(".tabContainer").equalHeightsTabs();
      $(".equalHeightTabsContainer").equalHeightsTabsContainers(".tabContainer");

      $(".tabNavigation").tabOverflow();
    } // end if not ie6 or ie7

    // If ie6 or ie7 but no threatIntelligence class...
    if (mcafee.ie6 || mcafee.ie7)
    {
      /* !Equalize Columns */
      $(".equalHeightContainer").equalHeightsSpecial(".specialHeightOne")
         .equalHeightsSpecial(".specialHeightTwo").equalHeightsSpecial(".specialHeightThree");
      $(".equalHeightContainer").equalHeights(".equalHeightSizer",".equalHeight");
      $(".equalHeightContainerOuter").equalHeights(".equalHeightSizerOuter",".equalHeightOuter");
      $(".tabContainer").equalHeightsTabs();
      $(".equalHeightTabsContainer").equalHeightsTabsContainers(".tabContainer");
      if($(document.body).hasClass("businessHome"))
      {
        $(".lastContainer .tabNavigation").tabOverflow();
      }
      else
      {
        $(".tabNavigation").tabOverflow();
      }
    }
  }
);

$(window).load(
  function()
  {
    /* !Threat Intelligence Drop Down (IE6 or IE7) */
    if (mcafee.ie6 || mcafee.ie7)
    {
      if ($("body").hasClass("threatIntelligence"))
      {
        // Cache whether the equal height tabs and the tabs overflow methods have executed so we don't keep calling them on every click.
        $.data(
          window,
          "cache",
          {
            tabbed: false,
            sized: false
          }
        );

        /*$(".threatIntelligenceRow").moveTo(".page",true)
                                   .show();*/
        
        //var pos = $('.page').position();    
        $('.threatIntelligenceRow') 
                  .css('position','absolute')
                  .css('top','-300px')        
                  .show(); 

        $(".threatExpand").click(
          function(event)
          {
            if (!$.data(window,"cache").sized && !$.data(window,"cache").tabbed)
            {
              $(".equalHeightContainer").equalHeightsSpecial(".specialHeightOne")
                 .equalHeightsSpecial(".specialHeightTwo")
                 .equalHeightsSpecial(".specialHeightThree");
              $(".equalHeightContainer").equalHeights(".equalHeightSizer",".equalHeight");
              $(".equalHeightContainerOuter").equalHeights(".equalHeightSizerOuter",".equalHeightOuter");
              $(".tabContainer").equalHeightsTabs();
              $(".equalHeightTabsContainer").equalHeightsTabsContainers(".tabContainer");

              $(".tabNavigation").tabOverflow();

              $.data(window,"cache").sized = true;
              $.data(window,"cache").tabbed = true;
              $(this).hide()
                     .siblings(".threatInfo")
                     .fadeOut("normal")
                     .end()
                     .siblings(".threatClose")
                     .show();

              $(".threatIntelligenceDropDown").addClass("threatIntelligenceDropDownOpen")
                                              .show();
            }
            else
            {
              $(".threatIntelligenceContainer").bgiframe();
              $(this).hide()
                     .siblings(".threatInfo")
                     .fadeOut("normal")
                     .end()
                     .siblings(".threatClose")
                     .show();

              $(".threatIntelligenceDropDown .oneHalfContent").hide();
              $(".threatIntelligenceDropDown").width("100%")
                                              .addClass("threatIntelligenceDropDownOpen");
              $(".threatIntelligenceDropDown .oneHalfContent").show();
              $(".threatIntelligenceDropDown").show();
            }
            return false;
          }
        );

        $(".threatIntelligenceContainer").bgiframe();
        $(".threatClose").click(
          function(event)
          {
            $(this).hide()
                   .siblings(".threatInfo")
                   .fadeIn("normal")
                   .end()
                   .siblings(".threatExpand")
                   .show();
            $(".threatIntelligenceDropDown").hide()
                                            .removeClass("threatIntelligenceDropDownOpen");
            return false;
          }
        );

        /* !Threat Intelligence Visualizations */
        $(".switchView").click(
          function(event)
          {
            event.preventDefault();
            $(this).find("a")
                   .toggleClass("selected")
                   .end()
                   .siblings(".dataVisual, .dataDetail")
                   .toggleClass("dataSelected");
            $("body").triggerHandler("click");
            return false;
          }
        );
      }
    } // end if ie6 or ie7
  }
);

/* !Navigation Functions - commented due to performing slow in IE - For space/width for the navigation is manually setting through the CSS*/
/* //Comment start
var spaceNavigation = function()
{
  var navigationWidth = $("#primaryNav").width();
  var itemCount = $("#primaryNav").children("li").length;
  var markCount = itemCount + 1;
  var markWidth = 14;
  var space = this.measure(navigationWidth,itemCount,markCount,markWidth);
  if (space[0] < 0)
  {
    $("#primaryNav li").css(
      {
        letterSpacing: "-0.025em"
      }
    );
    space = this.measure(navigationWidth,itemCount,markCount,markWidth);
    if (space[0] < 0)
    {
      $("#primaryNav li").css(
        {
          letterSpacing: "-0.05em"
        }
      );
      this.spaceOut(space,markWidth);
      space = this.measure(navigationWidth,itemCount,markCount,markWidth);
      if (space[0] < 0)
      {
        $("#primaryNav li").css(
          {
            letterSpacing: "-0.075em"
          }
        );
        this.spaceOut(space,markWidth);
      }
      else
      {
        this.spaceOut(space,markWidth);
      }
    }
    else
    {
      this.spaceOut(space,markWidth);
    }
  }
  else
  {
    this.spaceOut(space,markWidth);
  }

  $("#primaryNav").css(
    {
      width: "auto"
    }
  );
};

spaceNavigation.prototype.measure = function(navigationWidth,itemCount,markCount,markWidth)
{
  var itemWidth = 0;
  $("#primaryNav").children("li")
                  .css("paddingLeft",0)
                  .each(
                    function()
                    {
                      itemWidth += $(this).width();
                    }
                  );
  var space = Math.floor((((navigationWidth - itemWidth) - (markCount * markWidth)) / itemCount) / 2);
  var difference = (navigationWidth - ((((space * 2) + markWidth) * itemCount) + itemWidth)) - markWidth;
  return Array(space,difference);
};

spaceNavigation.prototype.spaceOut = function(space,markWidth)
{
  $("#primaryNav").children("li")
                  .each(
                    function(i)
                    {
                      var spaceLeft = (space[0] < 0) ? 0 : space[0];
                      var spaceRight = (space[0] < 0) ? 0 : space[0];
                      var spaceExtra = (space[1] - 1);

                      // If there's extra space, add extra padding.
                      if (i < spaceExtra)
                      {
                        spaceRight += 1;
                      }
                      $(this).css(
                        {
                          paddingLeft: markWidth
                        }
                      )
                      .children("a")
                      .css(
                        {
                          paddingLeft: spaceLeft,
                          paddingRight: spaceRight
                        }
                      );
                    }
                  );
  $("#primaryNav").children("li:last")
                  .css(
                    {
                      paddingRight: markWidth
                    }
                  );
};

//Comment end */


var navigationConfig =
{
  interval: 200,
  sensitivity: 4,
  over: function()
  {
    // Check for any open and close them.
    var $el = $(this);

    var offset = $el.offset();
    var offsetLeft = offset.left;

    var parentOffset = $el.parents(".navigationContainer")
                          .offset();
    var parentOffsetLeft = parentOffset.left;

    var deltaOffset = offset.left - parentOffset.left;

    // Calculate children offset and subtract parent offset.
    $el.siblings(":visible")
       .each(
         function()
         {
           $(this).mouseout();
         }
       );

    if ($el.next().length < 1)
    {
      if ($el.hasClass("prevSelected"))
      {
        $el.addClass("prevSelectedHover");
      }
      else
      {
        $el.addClass("hover");
      }
      $("#primaryNav").addClass("lastHover");
    }
    else if ($el.next().hasClass("selected"))
    {
      $el.addClass("hover")
         .next()
         .addClass("nextSelectedHover");
    }
    else if ($el.hasClass("prevSelected"))
    {
      $el.addClass("prevSelectedHover")
         .next()
         .addClass("prevHover");
    }
    else
    {
      $el.addClass("hover")
         .next()
         .addClass("prevHover");
    }
    $el.children(".primarySubNav")
       .css("left",deltaOffset)
       .slideDown("fast");
  },
  timeout: 250,
  out: function()
  {
    var $el = $(this);
    if ($el.next().length < 1)
    {
      if ($el.hasClass("prevSelected"))
      {
        $el.removeClass("prevSelectedHover");
      }
      else
      {
        $el.removeClass("hover");
      }
      $("#primaryNav").removeClass("lastHover");
    }
    else if ($el.next().hasClass("selected"))
    {
      $el.removeClass("hover")
         .next()
         .removeClass("nextSelectedHover");
    }
    else if ($el.hasClass("prevSelected"))
    {
      $el.removeClass("prevSelectedHover")
         .next()
         .removeClass("prevHover");
    }
    else
    {
      $el.removeClass("hover")
         .next()
         .removeClass("prevHover");
    }
    $el.children(".primarySubNav")
       .slideUp("fast");
  }
};

/* !Fisheye Effect Functions */
var fisheyeZoomIn = function()
{
  $(this).animate(
    {
      fontSize: "27px"
    },
    "fast"
  );
};

var fisheyeZoomOut = function()
{
  $(this).animate(
    {
      fontSize: "11px"
    },
    "fast"
  );
};

/* !jQuery Plugins */
(function($)
  {
    $.fn.extend(
      {
        // plugin to return the integer padding values of an element in an object
        padding: function()
        {
          var $this = $(this);
          var ret = {};
          ret.left   = parseInt($this.css("paddingLeft"),10);
          ret.right  = parseInt($this.css("paddingRight"),10);
          ret.top    = parseInt($this.css("paddingTop"),10);
          ret.bottom = parseInt($this.css("paddingBottom"),10);
          return ret;
        }, // end padding plugin

        resetPadding: function()
        {
          return $(this).css(
            {
              "paddingLeft": 0,
              "paddingRight": 0
            }
          );
        }, // end resetPadding plugin

        // plugin to move a DOM element
        moveTo: function(target,prepend)
        {
          var $clone = $(this).clone(true);
          $(this).remove();
          if (prepend)
          {
            $(target).prepend($clone);
          }
          else
          {
            $(target).append($clone);
          }
          return $clone;
        }, // end moveTo plugin

        // plugin to move content from one DOM element to another
        moveContentTo: function(target,prepend)
        {
          var $clone = $(this).contents()
                              .clone(true);
          $(this).empty();
          if (prepend)
          {
            $(target).prepend($clone);
          }
          else
          {
            $(target).append($clone);
          }
        }, // end moveContentTo plugin

        // plugin to "beautify" standard SELECT elements, without having to target the entire form.
        resetForm: function()
        {
          return this.each(
            function()
            {
              // guard against an input with the name of "reset"
              // note that IE reports the reset function as an "object"
              if (typeof this.reset == "function" || (typeof this.reset == "object" && !this.reset.nodeType))
              {
                this.reset();
              }
            }
          );
        }, // end resetForm plugin

        // plugin to vertically align banner text
        bannerAlign: function(alignment)
        {
          var $this = $(this);
          var bannerHeight = $this.height();
          if ($this.hasClass("bannerContentImage"))
          {
            bannerHeight = bannerHeight - 10;
          }
          var $bannerAlignment = $this.find(alignment);
          var bannerAlignmentHeight = $bannerAlignment.height();
          var bannerAlignmentTop = Math.floor((bannerHeight - bannerAlignmentHeight) / 2);
          if (bannerAlignmentTop > 0)
          {
            $bannerAlignment.css(
              {
                paddingTop: bannerAlignmentTop
              }
            );
          }
        },

        // plugin to style select elements
        styleSelects: function()
        {
          if (!mcafee.ie6 && !$(this).data("styled"))
          {
            $(this).find("select")
                   .each(
                     function()
                     {
                       var $this = $(this);
                       var $hiddenParents = "";

                       // If the select element is being hidden by a parent, show it without making it visible so the element can be measured.
                       if ($this.is(":hidden"))
                       {
                         $hiddenParents = $this.parents(":hidden");
                         $hiddenParents.each(
                           function()
                           {
                             if ($(this).css("display") == "none")
                             {
                               $(this).addClass("offScreen")
                                      .show();
                             }
                           }
                         );
                       }
                       
                       //if it is a multiple select box remove the Select Style
                       if(!($this.attr("multiple")) || !($this.hasClass("plainselect")))                       {
                       
                       
                       // capture the original margins and width to pass to the faux select
                       var currentCSS =
                       {
                         marginTop: $this.css("margin-top"),
                         marginRight: $this.css("margin-right"),
                         marginBottom: $this.css("margin-bottom"),
                         marginLeft: $this.css("margin-left"),
                         "float": $this.css("float")
                       };

                       // IE returns "auto" when no margin is set, so we'll fix that
                       currentCSS.marginTop    = (currentCSS.marginTop    == "auto") ? "0px" : currentCSS.marginTop;
                       currentCSS.marginRight  = (currentCSS.marginRight  == "auto") ? "0px" : currentCSS.marginRight;
                       currentCSS.marginBottom = (currentCSS.marginBottom == "auto") ? "0px" : currentCSS.marginBottom;
                       currentCSS.marginLeft   = (currentCSS.marginLeft   == "auto") ? "0px" : currentCSS.marginLeft;

                       var fauxWidth = $this.width();

                       // Re-hide the container that was hiding the select element.
                       if ($hiddenParents)
                       {
                         $hiddenParents.each(
                           function()
                           {
                             if ($(this).hasClass("offScreen"))
                             {
                               $(this).removeClass("offScreen")
                                      .hide();
                             }
                           }
                         );
                       }

                       // adjust widths of both the original select and faux select to accomodate a 32 pixel descrepency
                       // (30 pixels for the padding and 2 pixels for the border)
                       if (mcafee.ie)
                       {
                         $this.width(fauxWidth + 17);
                         if (fauxWidth > 12)
                         {
                           fauxWidth = fauxWidth - 12;
                         }
                       }
                       else
                       {
                         $this.width(fauxWidth + 12);
                         if (fauxWidth > 17)
                         {
                           fauxWidth = fauxWidth - 17;
                         }
                       }

                       if ($.browser.safari)
                       {
                         $this.width(fauxWidth + 25);
                         fauxWidth = fauxWidth + 4;
                       }
                       if ($.browser.opera)
                       {
                         $this.width(fauxWidth + 35);
                         fauxWidth = fauxWidth + 6;
                       }

                       var currentItem = $this.find("option")
                                              .eq(0)
                                              .text();
                       var currentName = ($this.attr("id")) ? $this.attr("id") : $this.attr("name");
                       currentName = currentName.replace(/^[a-z]/,function(letter){return letter.toUpperCase();});
                       if ($this.find("option[selected]"))
                       {
                         currentItem = $this.find("option[selected]")
                                            .eq(0)
                                            .text();
                       }

                       var $replacement = $("<span class=\"select\" id=\"select" + currentName + "\"><span class=\"selectText\">" + currentItem + "</span></span>").width(fauxWidth);
                       var $wrapper = $("<div class=\"styledSelect\"></div>").css(currentCSS);
                       /* Key Press DropDown value changing [Saurab]: Begin */
                       $this.keyup(function(){
                             $("#select" + currentName).children(".selectText").text($(this).find(":selected").text());
                             });
                       $this.change(function() {
                              $("#select" + currentName).children(".selectText").text($(this).find(":selected").text());
                              });
                     /* Key Press DropDown value changing [Saurab]: END */
                       $this.addClass("styled")
                            .wrap($wrapper)
                            .before($replacement)
                            .bind(
                              "change",
                              function()
                              {
                                $("#select" + currentName).children(".selectText")
                                                          .text($(this).find("option[selected]").eq(0).text());
                              }
                            )
                            .bind(
                              "focus",
                              function()
                              {
                                $("#select" + currentName).addClass("selectFocus");
                              }
                            )
                            .bind(
                              "blur",
                              function()
                              {
                                $("#select" + currentName).removeClass("selectFocus");
                              }
                            )
                            .data("currentIndex",$(this).find("option").index($(this).find("option[selected]")))
                            .data("maxIndex", $(this).find("option").length - 1)
                          /* Key Press DropDown value changing [Saurab](Commented): Begin
                           .bind(
                              "keypress",
                              function(event)
                              {
                                var i = $(this).data("currentIndex");
                                // is the key press a right arrow or down arrow?
                                if (event.keyCode == 39 || event.keyCode == 40)
                                {
                                  i++;
                                }
                                // is the key press a left arrow or up arrow?
                                else if (event.keyCode == 37 || event.keyCode == 38)
                                {
                                  i--;
                                }
                                if (!(i < 0) && !(i > $(this).data("maxIndex")))
                                {
                                  $("#select" + currentName).children(".selectText").text($(this).find("option").eq(i).text());
                                  $(this).data("currentIndex",i);
                                }
                              }
                            );
                            Key Press DropDown value changing [Saurab]: END */
                     }
                     }//end if multiselect
            ); // end each
            
            $(this).data("styled",true);
            
            
          } // end if !ie6
        },

        // plugin to create equal heights for elements within a set or row
        equalHeights: function(targets,containers)
        {
          return this.each(
            function()
            {
              var $this = $(this);
              var $targets = $this.find(targets);
              var $containers = $this.find(containers);
              var heights = [];

              $.sortNumber = function(a,b)
              {
                return a - b;
              };

              $containers.each(
                function(i)
                {
                  var $this = $(this);
                  var height = $this.height();
                  var extra = parseInt($this.css("borderTopWidth"),10) +
                              parseInt($this.css("borderBottomWidth"),10) +
                              parseInt($this.css("paddingTop"),10) +
                              parseInt($this.css("paddingBottom"),10);
                  heights[i] = height + extra;
                  $this.data("height",height + extra)
                       .data("extra",extra);
                }
              );

              heights.sort($.sortNumber);

              var maxHeight = heights[heights.length - 1];

              $containers.each(
                function()
                {
                  var $this = $(this);
                  if ($this.height() === maxHeight)
                  {
                    $this.addClass("isMax");
                  }
                }
              );

              // Modify heights
              $targets.each(
                function()
                {
                  var $this = $(this);
                  var $topParent = $this.parents(containers).length ? $this.parents(containers) : $this; // IE6 fails here without this check.
                  var parentHeight = $topParent.data("height");
                  var parentExtra = $topParent.data("extra");
                  var multiple = $topParent.find(targets).length === 0 ? 1 : $topParent.find(targets).length; // IE6 fails again.
                  if (parentHeight !== maxHeight)
                  {
                    // Grab extra pixels.
                    var paddings = [];

                    function getParentOffset($el,index)
                    {
                      var $cont = containers.replace(".",""); //Fix for jquery 1.4.2
                      if ($el.hasClass($cont))
                      {
                        return;
                      }
                      else
                      {
                        var extra = parseInt($el.css("borderTopWidth"),10) +
                                    parseInt($el.css("borderBottomWidth"),10) +
                                    parseInt($el.css("paddingTop"),10) +
                                    parseInt($el.css("paddingBottom"),10) +
                                    parseInt($el.css("marginTop"),10) +
                                    parseInt($el.css("marginBottom"),10);
                        paddings[index] = extra;
                        return getParentOffset($el.parent(),++index);
                      }
                    }

                    getParentOffset($this,0,paddings);

                    var totalAmt = 0;
                    var i = 0;

                    while (i < paddings.length)
                    {
                      totalAmt += paddings[i];
                      i++;
                    }

                    // Adding one for mozilla and I'm not sure why...might be some rounding issue...
                    var delta = maxHeight - (parentHeight + parentExtra + totalAmt);

                    $this.height((parentHeight + delta) / multiple);

                    // Doublecheck height and make adjustment(s) for partner page.
                    if ($(document.body).hasClass("partners") && $topParent.height() > $(".isMax").height())
                    {
                      var tempParentHeight = $topParent.height();
                      var tempElementHeight = $this.height();
                      $this.height(tempElementHeight - (tempParentHeight - maxHeight));
                    }

                  } // end if
                }
              ); // end $targets.each()
            }
          ); // end of each()
        }, // end equalHeights plugin

        equalHeightsSpecial: function(targets)
        {
          return this.each(
            function()
            {
              var $this = $(this);
              var heights = [];

              var $targets = $(targets);

              $.sortNumber = function(a,b)
              {
                return a - b;
              };

              $targets.each(
                function(i)
                {
                  var $this = $(this);
                  var height = $this.height();
                  var extra = parseInt($this.css("borderTopWidth"),10) +
                              parseInt($this.css("borderBottomWidth"),10) +
                              parseInt($this.css("paddingTop"),10) +
                              parseInt($this.css("paddingBottom"),10);
                  heights[i] = height + extra;
                  $this.data("height",height + extra).data("extra",extra);
                }
              );
              heights.sort($.sortNumber);

              var maxHeight = heights[heights.length - 1];

              // Modify heights
              $targets.each(
                function()
                {
                  var $this = $(this);
                  var thisHeight = $this.data("height");
                  var thisExtra = $this.data("extra");

                  if (thisHeight !== maxHeight)
                  {
                    var delta = maxHeight - (thisHeight + thisExtra);
                    $this.height((thisHeight + delta));
                  } // end if
                }
              ); // end $targets.each()
            }
          ); // end of each()
        }, // end equalHeightsSpecial plugin

        equalHeightsTabs: function()
        {
          return this.each(
            function()
            {
              var $unique = $(this);

              if (!$unique.parents(".equalHeightTabsContainer").length)
              {
                return;
              }

              var heights = [];

              var $tabContents = $unique.find(" .equalHeightSizerTabs .tabItem");

              $.sortNumber = function(a,b)
              {
                return a - b;
              };

              // We need to cache this to reset it.
              var $cachedSelected = $unique.find(".tabNavigation ul li.selected");

              $tabContents.each(
                function(i)
                {
                  // We need to trigger a click to get the proper height of the tabContainer.
                  $unique.find(".tabNavigation ul li:eq(" + i + ")").click();
                  var $this = $(this);
                  var height = $this.height();
                  // Padding only.
                  var extra = parseInt($this.css("paddingTop"),10) +
                              parseInt($this.css("paddingBottom"),10) +
                              parseInt($this.css("paddingTop"),10) +
                              parseInt($this.css("paddingBottom"),10);
                  heights[i] = height + extra;
                  $this.data("height",height + extra).data("extra",extra);
                }
              );

              $cachedSelected.click();
              heights.sort($.sortNumber);
              var maxHeight = heights[heights.length - 1];
              $unique.data("maxHeight",maxHeight);

              // Modify heights
              $tabContents.each(
                function()
                {
                  var $this = $(this);
                  var thisHeight = $this.data("height");
                  var thisExtra = $this.data("extra");

                  if (thisHeight !== maxHeight)
                  {
                    var delta = maxHeight - (thisHeight + thisExtra);
                    $this.height((thisHeight + delta));
                  } // end if
                }
              ); // end $targets.each()
            }
          ); // end of each()
        }, // end equalHeightsTabs plugin

        equalHeightsTabsContainers: function(containers)
        {
          return this.each(
            function()
            {

              var $unique = $(this);
              if ($unique.find(" .equalHeightNonTab").length === 1)
              {
                // Get the nontab height.
                var heights = [];
                var tabNavHeight = $unique.find(" .tabNavigation").height();
                var $nonTab = $unique.find(" .equalHeightNonTab").eq(0);
                var $tabContainer = $unique.find(containers).eq(0);

                $nonTab.each(
                  function()
                  {
                    var $this = $(this);
                    var height = $this.height();
                    // Padding only.
                    var extra = parseInt($this.css("paddingTop"),10) +
                    parseInt($this.css("paddingBottom"),10);

                    if ($this.parent(".lastContainer").length === 0)
                    {
                      extra -= parseInt($this.parent(".container").css("marginTop"),10);
                      extra -= parseInt($this.parent(".container").css("marginBottom"),10);
                    }
                    else
                    {
                      extra = Math.floor(extra / 2);
                    }

                    heights[i] = height + extra;
                    $this.data("height",height + extra)
                         .data("extra",extra);
                  }
                );
                var nonTabHeight = $nonTab.data("height");
                var containerHeight = $tabContainer.data("maxHeight");

                if (nonTabHeight > containerHeight)
                {
                  // Then modify the heights of the tab items.
                  var maxHeight = nonTabHeight;
                  $tabContainer.find(" .tabItem")
                               .each(
                                 function()
                                 {
                                   var $this = $(this);
                                   var thisHeight = $this.data("height");
                                   var thisExtra = $this.data("extra");

                                   if (thisHeight !== maxHeight)
                                   {
                                     // Value 10 pixels needed to account of margin-bottom of .container class.
                                     var delta = maxHeight - (thisHeight + thisExtra);
                                     $this.height((thisHeight + delta));
                                   } // end if
                                   // IE6 calculation bug fix:
                                   if(mcafee.ie6)
                                   {
                                     // Remove the extra (padding and borders).
                                     $this.height() !== maxHeight ? $this.height(maxHeight-thisExtra) : false;
                                   }
                                 }
                               ); // end $targets.each()
                }
                else if (nonTabHeight < containerHeight)
                {
                  // Modify the nontab container.
                  var maxHeight = containerHeight;
                  $nonTab.each(
                    function()
                    {
                      var $this = $(this);
                      var thisHeight = $this.data("height");
                      var thisExtra = $this.data("extra");

                      if (thisHeight !== maxHeight)
                      {
                        var delta = maxHeight - (thisHeight + thisExtra);
                        $this.height((thisHeight + delta));
                      } // end if
                    }
                  );
                }
                else
                {
                  return;
                }
              }
              else
              {
                var heights = [];
                var $tabContainers = $unique.find(containers);

                $.sortNumber = function(a,b)
                {
                  return a - b;
                };

                $tabContainers.each(
                  function(i)
                  {
                    heights[i] = $(this).data("maxHeight");
                  }
                );
                heights.sort($.sortNumber);

                var maxHeight = heights[heights.length - 1];

                // Modify heights
                $tabContainers.find(".tabItem")
                              .each(
                                function()
                                {
                                  var $this = $(this);
                                  var thisHeight = $this.data("height");
                                  var thisExtra = $this.data("extra");

                                  if (thisHeight !== maxHeight)
                                  {
                                    // Adding one for mozilla and I'm not sure why...might be some rounding issue...
                                    var delta = maxHeight - (thisHeight + thisExtra);

                                    $this.height((thisHeight + delta));
                                  } // end if
                                }
                              ); // end $targets.each()
              }
            }
          ); // end of each()
        }, // end equalHeightsTabsContainers plugin

        // plugin to create a content "switcher" for the announcements
        contentSwitcher: function(options)
        {
          var defaults =
          {
            tabClass: ".announcementTab",
            leftArrowClass: ".leftArrow",
            rightArrowClass: ".rightArrow",
            visibleClass: ".visibleTab",
            numberClass: ".controlsIndex"
          };

          options = $.extend({},defaults,options);

          return this.each(
            function()
            {
              var $this = $(this);
              var $tabs = $this.siblings(".toplessContainer").find(options.tabClass);
              var $left = $this.find(options.leftArrowClass);
              var $right = $this.find(options.rightArrowClass);
              var $nums = $this.find(options.numberClass);

              $tabs.eq(0)
                   .data("index",0)
                   .addClass("visibleTab")
                   .end()
                   .not(":first")
                   .each(
                     function(i)
                     {
                       i++;
                       $(this).hide()
                              .data("index",i);
                     }
                   )
                   .end()
                   .data("numOfTabs",$tabs.eq($tabs.size() - 1).data("index"));

              $left.click(
                function()
                {
                  var $currentTab = $tabs.parent()
                                         .find(options.visibleClass);
                  var currentIndex = $currentTab.data("index");
                  // If at end, then return.
                  if (currentIndex === 0)
                    return false;
                  $currentTab.hide()
                             .removeClass(options.visibleClass.replace(/\./,""));
                  $tabs.eq((currentIndex - 1))
                       .show()
                       .addClass(options.visibleClass.replace(/\./,""));
                  return false;
                }
              );

              $right.click(
                function()
                {
                  var $currentTab = $tabs.parent()
                                         .find(options.visibleClass);
                  var currentIndex = $currentTab.data("index");
                  // If at end, then return.
                  if (currentIndex === $tabs.data("numOfTabs"))
                  {
                    return false;
                  }
                  $currentTab.hide()
                             .removeClass(options.visibleClass.replace(/\./,""));
                  $tabs.eq((currentIndex + 1))
                       .show()
                       .addClass(options.visibleClass.replace(/\./,""));
                  return false;
                }
              );

              $nums.each(
                function(i)
                {
                  $(this).data("index",i)
                         .click(
                           function()
                           {
                             var $this = $(this);
                             var $currentTab = $tabs.parent()
                                                    .find(options.visibleClass);

                             var thisIndex = $this.data("index");
                             var currentTabIndex = $currentTab.data("index");
                             if (thisIndex === currentTabIndex)
                             {
                               return false;
                             }
                             else
                             {
                               $currentTab.hide()
                                          .removeClass(options.visibleClass.replace(/\./,""));
                               $tabs.eq(thisIndex)
                                    .show()
                                    .addClass(options.visibleClass.replace(/\./,""));
                             }
                             return false;
                           }
                         );
                }
              );
            }
          ); // end of each()
        }, // end contentSwitcher plugin

        // plugin to handle horizontal tabs that are wider than the content area.
        tabOverflow: function(options)
        {
          var defaults =
          {
            tabNavigationClass: ".tabNavigation",
            tabContainerClass: ".tabContainer",
            activeClas: ".firstActive",
            buffer: 20,
            controlsMarkup: "<div class=\"tabControls\"><div class=\"leftTabControl\"><a href=\"#\" class=\"leftArrow\"></a></div><div class=\"rightTabControl\"><a href=\"#\" class=\"rightArrow\"></a></div></div>",
            firstTabIndex: 0
          };

          var options = $.extend({},defaults,options);

          return this.each(
            function()
            {
              var $unique = $(this);

              var $navUL = $unique.find("ul");
              var $navTabs = $navUL.find("li");
              var $navTabAnchors = $navTabs.find("span")
                                           .find("a");
                                           
              
              //Non Clickable, if it is one tab
              if($navTabs.length == 1) {
                $navTabAnchors.css("cursor", "default");
                $navTabAnchors.click(function(){

                    return false;
                });
                
              }
              
              
              function navTabsClick(hash)
              {
                hash.event.preventDefault();

                // Hide currently selected content
                var $container = $(hash.el).parents(".tabContainer");
                $container.find(".tabNavigation li")
                          .removeClass("selected firstActive lastActive nextActive");
                $container.find(".tabItemCurrent")
                          .removeClass("tabItemCurrent");
                

                if ($(hash.el).hasClass("first"))
                {
                  $(hash.el).addClass("firstActive");
                }
                else if ($(hash.el).hasClass("last"))
                {
                  $(hash.el).addClass("lastActive")
                            .prev()
                            .addClass("nextActive");
                }
                else
                {
                  $(hash.el).prev()
                            .addClass("nextActive");
                }
               
                // Show newly selected content
                var tabToShow = $(hash.el).addClass("selected")
                                          .find("a")
                                          .attr("href");
                if (!tabToShow.match(/^#/))
                {
                  var temp = tabToShow.split("#");
                  tabToShow = "#" + temp[1];
                }
                $(tabToShow).addClass("tabItemCurrent");
                
                /* Vijay [Bangalore: Begin ]*/
                $(tabToShow).trigger("isVisible");
                /* Vijay [Bangalore: End ]*/
                
                $("body").triggerHandler("click");

                if (hash.index === 0 || hash.index)
                {

                  var delay = function()
                  {
                  // If the index property is there, then we are clicking from a set of tabs with overflow.
                  // We need to continue to track the current index.
                    var hiddenHash = {
                      nextTab: $(hash.el)
                    };

                    if (hiddenTabLeft(hiddenHash))
                    {
                      cache.shiftUL("left",$navUL,hash.index);
                    }
                    else if( hiddenTabRight(hiddenHash) )
                    {
                      var liOffsetLeft = getRelativeOffset($navUL,$(hash.el));
                      cache.shiftUL("right",$navUL,hash.index,liOffsetLeft);
                    }
                  };

                  setTimeout(delay,15);

                  cache.selectedTabIndex = hash.index;
                  checkArrows();
                }
                return false;
              };

              function hiddenTabRight(hash)
              {
                var tabOffsetLeft = getRelativeOffset($navUL,hash.nextTab);
                var tabWidth = hash.nextTab.width();

                var navContainerWidth = $unique.parents(".tabContainer:first")
                                               .width();

                if (tabOffsetLeft + tabWidth + options.buffer + cache.controlsWidth >= navContainerWidth)
                {
                  return true;
                }
                else
                {
                  return false;
                }
              }

              function hiddenTabLeft(hash)
              {
                var tabOffsetLeft = getRelativeOffset($navUL,hash.nextTab);
                var tabWidth = hash.nextTab.width();

                var ulOffsetLeft = getRelativeOffset($navUL.parent(),$navUL);

                // less than 0 because it is behind
                if ( ulOffsetLeft + tabOffsetLeft  < 0 )
                {
                  return true;
                }
                else
                {
                  return false;
                }
              }

              function getRelativeOffset($parent,$child)
              {
                var parentOffset = $parent.offset();
                if ($child === null)
                {
                  return parentOffset.left;
                }
                var childOffset = $child.offset();
                return childOffset.left - parentOffset.left;
              }

              function checkArrows()
              {
                if (cache.selectedTabIndex === 0)
                {
                  utils.disableArrow("left");
                  utils.enableArrows("right");
                  return;
                }
                if (cache.selectedTabIndex === cache.numOfTabs)
                {
                  utils.disableArrow("right");
                  utils.enableArrows("left");
                  return;
                }
                else
                {
                  utils.enableArrows("both");
                  return false;
                }
              }

              var utils =
              {
                calcNavWidth: function()
                {
                  return $unique.parent(".tabContainer")
                                .width();
                },
                calcTabItems: function()
                {
                  var totalWidth = 0;
                  var ulOffsetLeft = getRelativeOffset($navUL,null);
                  $unique.find("ul")
                         .css("left",0)
                         .data("offsetLeft",ulOffsetLeft);
                  var ulOffsetLeft = $unique.find("ul")
                                            .data("offsetLeft");

                  $unique.find("ul")
                         .find("li")
                         .each(
                           function(i)
                           {
                             var $this = $(this);
                             var width = $this.width();
                             if (i === 0)
                             {
                               // The first tab has padding of which we must keep track.
                               var padding = $this.padding();
                               totalWidth += padding.left + width;
                               $this.data("width",width + padding.left)
                                    .data("index",i);
                             }
                             else
                             {
                               totalWidth += width;
                               $this.data("width",width).data("index",i);
                             }

                             // You have to subtract the ul's offsetLeft to get accurate results for later.
                             $this.data("offsetLeft",getRelativeOffset($navUL,$this));
                           }
                         );

                  return totalWidth;
                },
                createIndexArray: function()
                {
                  var indexArray = [];
                  $unique.find("ul")
                         .find("li")
                         .each(
                           function(i)
                           {
                             var tabToShow = $(this).find("span")
                                                    .find("a")
                                                    .attr("href");
                             if (!tabToShow.match(/^#/))
                             {
                               var temp = tabToShow.split("#");
                               tabToShow = "#" + temp[1];
                             }
                             indexArray[i] = tabToShow;
                           }
                         );
                  utils.numOfTabs = indexArray.length - 1;
                  return indexArray;
                },
                appendControls: function()
                {
                  var w = $(options.controlsMarkup).appendTo(document.body)
                                                   .width();
                  $(document.body).find("> .tabControls")
                                  .remove();
                  var off = utils.calcNavWidth();

                  var a = options.tabNavigationClass;
                  $unique.append(options.controlsMarkup);

                  if (mcafee.ff2)
                  {
                    $unique.find(" .tabControls")
                           .width("51px");
                    w = 51;
                  }

                  $unique.find(".tabControls")
                         .css("left",(off - w));

                  // Have to add images separately because IE doesn't like it.
                  $unique.find(".leftArrow")
                         .append("<img src=\"img/arrow-red-left.png\"><img>");
                  $unique.find(".rightArrow")
                         .append("<img src=\"img/arrow-red-right.png\"><img>");
                },
                setSelectedTab: function()
                {
                  var $selected = $unique.find("ul")
                                         .find("li.selected");
                  var index = $unique.find("ul")
                                     .find("li")
                                     .index($selected);
                  if (index > 0)
                  {
                    $selected.prev()
                             .addClass("nextActive");
                  }
                  return index;
                },
                disableArrow: function(direction)
                {
                  $unique.find("." + direction + "TabControl")
                         .find("img")
                         .attr("src","img/arrow-gray-" + direction + ".png");
                  return true;
                },
                enableArrows: function(direction)
                {
                  if(direction === "both")
                  {
                    $unique.find(".leftTabControl")
                           .find("img")
                           .attr("src","img/arrow-red-left.png");
                    $unique.find(".rightTabControl")
                           .find("img")
                           .attr("src","img/arrow-red-right.png");
                  }
                  else
                  {
                    $unique.find("."+direction+"TabControl").find("img").attr("src","img/arrow-red-"+direction+".png");
                  }
                }
              }; // end utils

              // Check to see if it will overflow
              if (utils.calcNavWidth() <= (utils.calcTabItems() + options.buffer))
              {
                utils.appendControls();

                var cache =
                {
                  navWidth: utils.calcNavWidth(),
                  indexArray: utils.createIndexArray(),
                  selectedTabIndex: utils.setSelectedTab(),
                  numOfTabs: utils.numOfTabs,
                  controlsWidth: $unique.find(".tabControls").width(),
                  controlsOffsetLeft: getRelativeOffset($unique.parent(".tabContainer"),$unique.find(".tabControls") ),
                  shiftUL: function(direction,$el,index,offsetLeftParam)
                  {
                    // Calculate list element's offset.
                    var $li = $el.find("li:eq(" + index + ")");
                    var liOffsetLeft = offsetLeftParam || getRelativeOffset($navUL,$li);
                    var ulOffsetLeft = getRelativeOffset($navUL.parent(),$navUL);
                    var ulLeft = parseInt( $navUL.css("left"),10);
                    var buffer = (index === 0) ? 0 : options.buffer;

                    if (direction === "right")
                    {
                      // Get Total Width of all Tabs in Navigation
                      var totalNavTabWidth = 0;
                      $navUL.find("li")
                            .each(
                              function()
                              {
                                totalNavTabWidth += $(this).width();
                              }
                            );

                      // Get Nav Container Width
                      var navContainerWidth = $unique.parents(".tabContainer:first")
                                                     .width();

                      // Delta of the two:
                      var deltaOne = totalNavTabWidth - navContainerWidth;

                      // Get all prior tabs total.
                      var totalPriorTabWidth = 0;
                      var cachedIndex = index;
                      while (index--)
                      {
                        $navUL.find("li:eq("+index+")")
                              .each(
                                function()
                                {
                                  totalPriorTabWidth += $(this).width();
                                }
                              );
                      }

                      // Delta of priors with container:
                      var deltaTwo = navContainerWidth - totalPriorTabWidth;

                      var move = 0;

                      // Compare with tab controls:
                      if (cachedIndex === cache.numOfTabs) // last tab
                      {
                        move = -1*( deltaOne + cache.controlsWidth + options.buffer );
                      }
                      else if (deltaTwo <= cache.controlsWidth)
                      {
                        move = -1*(deltaOne + (deltaTwo <= 0 ? Math.abs(deltaTwo) : deltaTwo + options.buffer) );
                      }
                      else
                      {
                        move = -1*(deltaOne + options.buffer);
                      }
                      $el.animate(
                        {
                          "left": move
                        },
                        500
                      );
                    }
                    else
                    {
                      var move = liOffsetLeft ? ulLeft+liOffsetLeft : 0;
                      $el.animate(
                        {
                          "left": ( move )
                        },
                        500
                      );
                    }
                  }
                };

                function classSwitcher(hash)
                {
                  $navUL.find(".nextActive")
                        .removeClass("nextActive");
                  if (hash.elIndex === 0)
                  {
                    // We are clicking on the first tab.
                    hash.currentNavTab.removeClass("selected");
                    if (hash.currentIndex !== 1)
                    {
                      //hash.currentNavTab.addClass("nextActive");
                    }
                    hash.parentLI.addClass("firstActive selected")
                                 .removeClass("nextActive");
                    return;
                  }
                  else if (hash.elIndex === cache.numOfTabs)
                  {
                    // We are clicking on the last tab.
                    hash.currentNavTab.removeClass("selected");
                    hash.parentLI.addClass("lastActive selected");
                    hash.parentLI.prev("li")
                                 .addClass("nextActive");
                  }
                  else if (hash.elIndex === 1)
                  {
                    // We are clicking on the second tab.
                    if (hash.currentIndex === 0)
                    {
                      // The first tab is current
                      hash.currentNavTab.removeClass("firstActive selected")
                                        .addClass("nextActive");
                      hash.parentLI.addClass("selected");
                    }

                    if (hash.currentIndex === cache.numOfTabs)
                    {
                      // The last tab is current
                      hash.currentNavTab.removeClass("lastActive selected");
                      hash.parentLI.addClass("selected");
                    }
                    else
                    {
                      hash.currentNavTab.removeClass("selected");
                      hash.parentLI.prev("li")
                                   .addClass("nextActive");
                      hash.parentLI.addClass("selected");
                    }
                  }
                  else
                  {
                    // We are clicking on a tab within the nav set.
                    if (hash.currentIndex === 0)
                    {
                      // The first tab is current
                      hash.currentNavTab.removeClass("firstActive selected");
                      hash.parentLI.prev("li").addClass("nextActive");
                      hash.parentLI.addClass("selected");
                      return;
                    }

                    if (hash.currentIndex === cache.numOfTabs)
                    {
                      // The last tab is current
                      hash.currentNavTab.removeClass("lastActive selected");
                      hash.parentLI.prev("li")
                                   .addClass("nextActive");
                      hash.parentLI.addClass("selected").removeClass("nextActive");
                    }
                    else
                    {
                      // Find the nextActive tab and remove it.
                      hash.currentNavTab.removeClass("selected");
                      hash.parentLI.addClass("selected");
                      hash.parentLI.prev("li")
                                   .addClass("nextActive");
                    }
                  }
                }

                function tabContentSwitcher(hash)
                {
                  hash.tabContent.find(".tabItemCurrent")
                                 .removeClass("tabItemCurrent");
                  hash.tabContent.find("#" + cache.indexArray[hash.elNewIndex])
                                 .addClass("tabItemCurrent");
                  cache.selectedTabIndex = hash.elNewIndex;
                }

                // Attach click handlers to tabs.
                $navTabs.each(
                  function(i)
                  {
                    $(this).data("index",i)
                           .bind(
                             "click",
                             function(e)
                             {
                               var clickHash =
                               {
                                 event: e,
                                 el: this,
                                 index: $(this).data("index")
                               };
                               navTabsClick(clickHash);
                             }
                           );
                  }
                );

                if (cache.selectedTabIndex === 0)
                {
                  cache.leftDisabled = utils.disableArrow("left");
                }

                if (cache.selectedTabIndex === cache.numOfTabs)
                {
                  cache.rightDisabled = utils.disableArrow("right");
                }

                // Now bind click handlers to arrows.
                $unique.find(".leftArrow")
                       .parent()
                       .click(
                         function()
                         {
                           var $current = $navTabs.eq(cache.selectedTabIndex);
                           var $tabContent = $unique.siblings(".tabContent");

                           var $parentNav = $navUL.parent(".tabNavigation");
                           var parentOffsetLeft = getRelativeOffset($parentNav,null);

                           var newIndex = cache.selectedTabIndex - 1;
                           var $newSelectedTab = $navTabs.eq(newIndex);

                           var $first = $navTabs.eq(0);
                           var firstOffsetLeft = getRelativeOffset($navUL,$first);
                           var currentOffsetLeft = getRelativeOffset($navUL,$current);

                           // Where is the first tab?  Meaning is the first tab in view or not?
                           var $firstTab = $navUL.find("li:first");
                           var firstOffsetLeft = getRelativeOffset($navUL,$firstTab);

                           var firstTabDelta = firstOffsetLeft - parentOffsetLeft;
                           var firstFlag = false;
                           var lastFlag = false;

                           var controlsWidth = $unique.find(".tabControls").width();
                           var controlsOffsetLeft = getRelativeOffset($unique.find(".tabControls"),null);

                           var newSelectedTabOffsetLeft = getRelativeOffset($navUL,$newSelectedTab);
                           var newSelectedTabWidth = $newSelectedTab.width();

                           var leftHash =
                           {
                             nextTab: $newSelectedTab,
                             flipDirection: true
                           };

                           if (cache.selectedTabIndex === 0)
                           {
                             return false;
                           }

                           if (newIndex === cache.numOfTabs - 1)
                           {
                             lastFlag = true;
                           }

                           if (newIndex === 0)
                           {
                             firstFlag = true;
                           }

                           function leftClassSwitcher()
                           {
                             $navUL.find(".nextActive")
                                   .removeClass("nextActive");
                             $current.removeClass("selected");
                             $newSelectedTab.addClass("selected");

                             if (lastFlag)
                             {
                               $current.removeClass("lastActive");
                             }

                             if (firstFlag)
                             {
                               $newSelectedTab.addClass("firstActive");
                             }
                             else
                             {
                               $navTabs.eq((newIndex - 1))
                                       .addClass("nextActive");
                             }
                           }

                           function leftTabSwitcher()
                           {
                             $tabContent.find(".tabItemCurrent")
                                        .removeClass("tabItemCurrent");
                             $tabContent.find("#" + cache.indexArray[newIndex])
                                        .addClass("tabItemCurrent");
                             cache.selectedTabIndex = newIndex;
                           }

                           if (!hiddenTabLeft( leftHash ))
                           {
                             // Then the first tab is in view so do NOT shift the tabs UL, but update the tab in view and swap the class.
                             leftClassSwitcher();
                             leftTabSwitcher();
                           }
                           else
                           {
                             // Then the first tab is NOT in view so DO shift the tabs UL, update the tab in view and swap the class.
                             leftClassSwitcher();
                             leftTabSwitcher();
                             cache.shiftUL("left",$navUL,newIndex);
                           }
                           checkArrows();
                           return false;
                         }
                       );

                $unique.find(".rightArrow")
                       .parent()
                       .click(
                         function()
                         {
                           var $current = $navTabs.eq(cache.selectedTabIndex);
                           var $tabContent = $unique.siblings(".tabContent");
                           var newIndex = cache.selectedTabIndex + 1;
                           var $newSelectedTab = $navTabs.eq(newIndex);

                           // Where is the last tab?  Meaning is the first tab in view or not?
                           var $lastTab = $navUL.find("li:last");
                           var $parentNav = $navUL.parent(".tabNavigation");
                           var parentNavContainerOffsetLeft = getRelativeOffset($parentNav,null);
                           var lastOffsetLeft = getRelativeOffset($navUL,$lastTab);

                           var firstFlag = false;
                           var lastFlag = false;

                           var rightHash = {
                             nextTab: $newSelectedTab
                           };

                           if (cache.selectedTabIndex === cache.numOfTabs)
                           {
                             return false;
                           }

                           if (cache.selectedTabIndex === 0)
                           {
                             firstFlag = true;
                           }

                           if (newIndex === cache.numOfTabs)
                           {
                             lastFlag = true;
                           }

                           function rightClassSwitcher()
                           {
                             $navUL.find(".nextActive")
                                   .removeClass("nextActive");

                             if (lastFlag)
                             {
                               $current.removeClass("selected")
                                       .addClass("nextActive");
                               $newSelectedTab.addClass("lastActive");
                             }
                             else if (firstFlag)
                             {
                               $current.removeClass("selected firstActive")
                                       .addClass("nextActive");
                             }
                             else
                             {
                               $current.removeClass("selected")
                                       .addClass("nextActive");
                             }

                             $newSelectedTab.addClass("selected");
                           }

                           function rightTabsSwitcher()
                           {
                             $tabContent.find(".tabItemCurrent")
                                        .removeClass("tabItemCurrent");
                             $tabContent.find("#" + cache.indexArray[newIndex])
                                        .addClass("tabItemCurrent");
                             cache.selectedTabIndex = newIndex;
                           }

                           var controlsWidth = $unique.find(".tabControls")
                                                      .width();
                           var controlsOffset = $unique.find(".tabControls")
                                                       .offset();
                           var newSelectedTabOffsetLeft = getRelativeOffset($navUL,$newSelectedTab);
                           var newSelectedTabWidth = $newSelectedTab.width();

                           var controlsOffsetLeft = getRelativeOffset($unique.find(".tabControls"),null);

                           if (!hiddenTabRight( rightHash ) )
                           {
                             rightClassSwitcher();
                             rightTabsSwitcher();
                           }
                           else
                           {
                             var liOffsetLeft = getRelativeOffset($navUL,$newSelectedTab);

                             // Then the last tab is in NOT view so DO shift the tabs UL, update the tab in view and swap the class.
                             rightClassSwitcher();
                             rightTabsSwitcher();
                             cache.shiftUL("right",$navUL,newIndex,liOffsetLeft);
                           }

                           checkArrows();
                           return false;
                         }
                       ); // end right arrow click.

                // IE6-specific modifications
                if (mcafee.ie6)
                {
                  if ($(document.body).hasClass("searchResults"))
                  {
                    $unique.parent(options.tabContainerClass)
                           .parent()
                           .parent()
                           .css("overflow","hidden");
                  }
                  else
                  {
                    $unique.parent(options.tabContainerClass)
                           .parent()
                           .css("overflow","hidden");
                  }

                  $unique.css("width","100000px");
                }

              } // End overflow condition.
              else
              {
                $navTabs.click(
                  function(e)
                  {
                    var clickHash =
                    {
                      event: e,
                      el: this
                    };
                    navTabsClick(clickHash);
                  }
                );
              }
            }
          ); // end of each()
        } // end tabOverflow plugin
      }
    );
  }
)(jQuery);

