/***************************************/
// jQuery Tabber
// By Jordan Boesch
// www.boedesign.com
// Dec 25, 2007 (Merry Christmas!)
/***************************************/

(function(jQuery){
		  
	$.extend($, {
		jtabber: function(params){
				
				// parameters
				var navDiv = params.mainLinkTag;
				var selectedClass = params.activeLinkClass;
				var hiddenContentDiv = params.hiddenContentClass;
				var showDefaultTab = params.showDefaultTab;
				var showErrors = params.showErrors;
				var effect = params.effect;
				var effectSpeed = params.effectSpeed;
				
				// If error checking is enabled
				if(showErrors){
					if(!$(navDiv).attr('titles')){
						alert("ERROR: The elements in your mainLinkTag paramater need a 'titles' attribute.\n ("+navDiv+")");	
						return false;
					}
					else if(!$("."+hiddenContentDiv).attr('id')){
						alert("ERROR: The elements in your hiddenContentClass paramater need to have an id.\n (."+hiddenContentDiv+")");	
						return false;
					}
				}
				
				// If we want to show the first block of content when the page loads
				if(!isNaN(showDefaultTab)){
					showDefaultTab--;
					$("."+hiddenContentDiv+":eq("+showDefaultTab+")").css('display','block');
					$(navDiv+":eq("+showDefaultTab+")").addClass(selectedClass);	
				}
				
				// each anchor
				$(navDiv).each(function(){
										
					$(this).click(function(){
						// once clicked, remove all classes
						$(navDiv).each(function(){
							$(this).removeClass();
						})
						// hide all content
						$("."+hiddenContentDiv).css('display','none');
						
						// now lets show the desired information
						$(this).addClass(selectedClass);
						var contentDivId = $(this).attr('titles');
						
						if(effect != null){
							
							switch(effect){
								
								case 'slide':
								$("#"+contentDivId).slideDown(effectSpeed);
								break;
								case 'fade':
								$("#"+contentDivId).fadeIn(effectSpeed);
								break;
								
							}
								
						}
						else {
							$("#"+contentDivId).css('display','block');
						}
						return false;
					})
				})
			
			}
	})
	
})(jQuery);	
 $(document).ready(function(){
           
        $.jtabber({
            mainLinkTag: "#pdnewnav a", // much like a css selector, you must have a 'title' attribute that links to the div id name
            activeLinkClass: "selected", // class that is applied to the tab once it's clicked
            hiddenContentClass: "hiddencontent", // the class of the content you are hiding until the tab is clicked
            showDefaultTab: 1, // 1 will open the first tab, 2 will open the second etc.  null will open nothing by default
            showErrors: true, // true/false - if you want errors to be alerted to you
            effect: 'fade', // null, 'slide' or 'fade' - do you want your content to fade in or slide in?
            effectSpeed: 'medium' // 'slow', 'medium' or 'fast' - the speed of the effect
        })
           
        })
		
		
		 $(document).ready(function(){
	$("#displayVersion a")
  .filter(":nth-child(2)")
    .css('background-image','none')
    .css('color','#cc6600');
	  })
		
	
		 
		 function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

 $(document).ready(function(){
		$('.priceBoxTop a:eq(1)').addClass('pdbuypackagebustyle'); 
		  })
		 
		 $(document).ready( function() {
   
    $('a.popup').click( function() {
        window.open( $(this).attr('href'),'','scrollbars=yes,width=870,height=650' );
        return false;
    })
   
   
})
	 
		 $(document).ready(function(){
$('.priceBoxBottom a').removeAttr("style");
	    $('iframe.pdcomparisonchart').attr('allowtransparency', 'true');
});
		 
		 
	//	 
//		 
//		 // PRELOADER:
//		 
//		 jQuery.preloadImages = function()
//{
//  for(var i = 0; i<arguments.length; i++)
//  {
//    jQuery("<img>").attr("src", arguments[i]);
//  }
//}
//
//$.preloadImages("http://atl.img.digitalriver.com/v2.0-img/page-builder/Symantec/images/pdpage2009_features_tab_bg_dark.jpg");
//
//


$(document).ready(function(){
      $("a.pd09comparebutton").hide(); 
	
      $("#pdnewnav a:eq(3)").hide(); 
	  $("a.pd09comparebutton").css("display", "none"); 

   // PUT THESE LINES BACK WHEN COMPARE CHART IS READY:   $(".pdccharton a.pd09comparebutton").show(); 
//	
//      $("div.pdccharton#pdnewnav a:eq(3)").show(); 
//	  $(".pdccharton a.pd09comparebutton").css("display", "block"); 
	  });

// JavaScript Document

$(document).ready(function(){
      $("a.pd09comparebutton").hide(); 
	  });

$(document).ready(function(){
      $("#pdnewnav a:eq(3)").hide(); 
	      $('a.pd09comparebutton').attr('style', 'display: none;');
		
		
	  });



 $(document).ready(function(){
		$('.priceBoxTop a:eq(0)').addClass('pdbuypackagebustyle'); 
		$('.priceBoxTop a:eq(1)').removeClass('pdbuypackagebustyle'); 
		
				// ADD IN THE ADD ON PACK LINK:
	/*var $ul = $("div.pdpage2010.nis2010 div#pdmoreinfo ul:last").prev().prev().prev().addClass('addonpackul');
		$('div.pdpage2010.nis2010 div#pdmoreinfo ul.addonpackul li:last').append(' <a href="javascript:;" onclick="MM_openBrWindow(\'http://www.symantecstore.com/dr/v2/ec_main.entry25?page=ParentalControlInfoES&SID=41185&client=Symantec\',\'addonpack\',\'status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=500\')">M&#225;s informaci&#243;n</a>'); */
		 
		 	// ADD IN THE 2005 PRODUCTS LINK:
var $oldversion = $("div.nis2010 div#pdsysreq p:first, div.nav2010 div#pdsysreq p:first").append('<br /><a href="javascript:;" onclick="MM_openBrWindow(\'http://www.symantecstore.com/dr/v2/ec_main.entry25?page=popup2007xp07FR&client=Symantec&sid=6715\',\'olderversion\',\'status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=500\')">Cliquez ici</a> si vous utilisez une version ant&#233;rieure de Windows.');
		
		 
		 
		  })

   
     $(document).ready(function(){
	       var alreadyloaded;
	 $('.pd09comparebutton').click(function(){
	    if( alreadyloaded ) return;
            alreadyloaded = true;
	 $("iframe.pdcomparisonchart").before("<div class='pdccloading'></div>");
	    $('iframe.pdcomparisonchart').attr('src', 'http://www.symantecstore.com/dr/v2/ec_main.entry25?page=compareproductsFR&client=Symantec&sid=27681');
		
		
		
		
		$("iframe.pdcomparisonchart").load(function(){
    $(".pdccloading").remove();
    $(".pdcomparisonchart").fadeIn("fast");
});
        });

	      });


// TOOLTIP CODE:


/*			
		Function: rzTooltip()
		Author: Francois Levesque ( cfabort (at) critical-web (dot) com )			
		
		Description: Creates a tooltip containing the matched object's title attribute. Will show on mouseover
		
		Usage: $("myElement").rzTooltip();			
*/

(function () {

	$.fn.rzTooltip=function () {

		rzTooltip_title='';
		
		// check to see if the tooltip exists
		if (!$("#rzTooltip").length) {
			// if not, create it and the iframe
			
			$("body").append("<div id='rzTooltip'><div id='rzTooltip_header'></div><div id='rzTooltip_body'></div></div>");
			$("#rzTooltip").css({ top: -1000, left: -1000, position: 'absolute', zIndex: 100 });
			$("body").append("<iframe id='rzTooltip_iframe'></iframe>");
			$("#rzTooltip_iframe").css({ top: -1000, left: -1000, position: 'absolute', zIndex: 50, opacity: 0 });
			
		}

		// loop over matched elements
		return this.each(function () {
			
			$(this).mouseover(function () {
				// apply mouseover event
				
				// shortcut var
				var tooltip=$("#rzTooltip");
				
				// make sure the tooltip is off-screen
				tooltip.css({
					top: -1000,
					left: -1000
				});

				// backup the elements title
				rzTooltip_title=$(this).attr("title");
				
				// create an array containing the different title strings, separated by a pipe (|)
				var title=rzTooltip_title.split("|");
			
				// empty the title attribute (override the brower's insight)
				$(this).attr("title", "");
				
				// populate the tooltip header
				$("#rzTooltip_header").html(title[0]);
				
				// empty the tooltip body
				$("#rzTooltip_body").empty();
				
				// populate the tooltip body by looping over the title array
				for (var i=1; i<title.length; i++)
					$("#rzTooltip_body").append("<p>" + title[i] + "</p>");
				
				// create browser-specific max width and height vars
				var maxWidth, maxHeight;
				if ($.browser.msie) {
					maxWidth=document.documentElement.scrollWidth;
					maxHeight=document.documentElement.scrollHeight;
				} else {
					maxWidth=Math.max($('html').width(), $(window).width()-30);
					maxHeight=Math.max($('html').height(), $(window).height()-30);
				}
				
				// get position (make sure the tooltip isn't out of bounds
				var dims={
					t: ($(this).offset().top + tooltip.height() > maxHeight - 10 ? $(this).offset().top+$(this).height()-tooltip.height() : $(this).offset().top),
					l: ($(this).offset().left + $(this).width() + tooltip.width() > maxWidth - 10 ? $(this).offset().left-tooltip.width()-10 : $(this).offset().left + $(this).width())
				};
				
				// place the tooltip
				tooltip.css({ top: dims.t, left: dims.l });
				
				// place and size the iframe to hide undesirable dropdowns in IE
				$("#rzTooltip_iframe").css({ top: dims.t, left: dims.l, height: tooltip.height(), width: tooltip.width() });

			}).mouseout(function () {
				// apply mouseout events
				
				// take the tooltip and iframe off-screen
				$("#rzTooltip,#rzTooltip_iframe").css({ top: -1000, left: -1000 });
				
				// reset the element's title
				$(this).attr("title", rzTooltip_title);
			});

		});
	};
})();
		
		/* JQUERY FOR TOOLTIPS:
*/

$(document).ready(function () {
   $(".tooltip[@title]").rzTooltip();
});




function gotosite(site) {
	if (site != "jag"){
		self.location = site;
	}
	else{
		document.legend_jag.url.selectedIndex = 0;
	}
}

var counter = 0;
function DisplayPlatform(platformImg){
   if (counter == 0){
	platformImg = platformImg.toLowerCase();
if (platformImg.indexOf(".gif") != -1 || platformImg.indexOf(".jpg") != -1 || platformImg.indexOf(".jpe") != -1 || platformImg.indexOf(".png") != -1){
	var startPoint = platformImg.indexOf('src="') + 5;
	var endPoint = platformImg.indexOf('"',startPoint);
	var platSrc = platformImg.substring(startPoint,endPoint);
	window.document.platform.src = platSrc;
	counter++;
}
   }
}


