		
	
	$(document).ready(function(){
		
		/* Used on the feature pages to expand and collapse the really long details */
		$(".toggle-block").css("display","none");	
		$(".toggle-details").click(function () {
			$(".toggle-block").slideToggle("slow");
			if($(".toggle-details").text() == ("View more details")){
				$(".toggle-details").text("Fewer details");		
				$(".toggle-details").css("background","url(/images/arrow-up.png) no-repeat left");
			}else{
				$(".toggle-details").text("View more details");
				$(".toggle-details").css("background","url(/images/arrow-down.png) no-repeat left");
			}
			 
		});


		/* Colorbox hook */
			if(jQuery().colorbox) { $("a.colorbox").colorbox({transition:"none", opacity:"0.4"}); }
		
		/* Global Navigation */	
		
		$("ul.sf-menu").supersubs({
			minWidth:    5,
			maxWidth:    27,
			extraWidth:  0.1
		}).superfish({
			delay:       0,
			speed:       'fast',
			autoArrows:  true,
			dropShadows: true
		});
	
		$("ul.sf-menu #navProduct,ul.sf-menu #navProblem,ul.sf-menu #navCustomer,ul.sf-menu #navCommunity,ul.sf-menu #navSupplier,ul.sf-menu #navPartner,ul.sf-menu #navService,ul.sf-menu #navNews,ul.sf-menu #navResource").mouseover(function(){
			$(this).children(["a"]).addClass("navSelect");
		}).mouseout(function(){
			$(this).children(["a"]).removeClass("navSelect");
		});
		
		/* Removing Search Box Value */
		$("#globalsearch #search-box input").val("");

		/* Highlight active side menu */
			var pathArray = window.location.pathname.split('/'); /* Put the URL segments into an array */
			var path = location.pathname.substring(0);/* Get the path */
			if((pathArray[pathArray.length-1]).indexOf(".html") == -1){ /* If the last segment doesn't contain .html */
				var path = location.pathname.substring(0) + 'index.html'; /* Add index.html to the end of the path */
			}
			
			/* Add urls here that you don't want to highlight a menu item for */
			if ((pathArray[pathArray.length-1]) == "searchresults.html") exit;
			if ((pathArray[pathArray.length-1]) == "requestinfo-thanks.html") exit;

			$('#side-navigation a[href="' + path + '"]').parent().addClass('active'); /* Apply active class to the menu item that matches the URL */
			
			if (!$("#side-navigation li").is(".active")) { /* If no menu is active (happens when page isn't listed in side nav, such as leadership section) */
				
				/* Add the 'active' class to the side nav link that CONTAINS the next last URL segment */
				$("#side-navigation a[href*=" + pathArray[pathArray.length-2] + "]").parent().addClass('active');
			}
			if (!$("#side-navigation li").is(".active")) { /* If still no active item) */
				
				/* Go back one further in the url */
				$("#side-navigation a[href*=" + pathArray[pathArray.length-3] + "]").parent().addClass('active');
			}
	
		/* displaying registered message */
		if ($.cookie("registered") == ("yes")) {
			$('.registered').css("display","block");
			$('.registered-hide').css("display","none");
		}
	
	}); /* end document.ready */

 